0% found this document useful (0 votes)
9 views

Week 10 DM

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Week 10 DM

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Discrete Mathematics - Week 10

1. There are four students, Lily, Mark, Nathan, and Olivia, each with a preferred sub-
ject. Lily likes History, Mark likes Physics, Nathan likes Chemistry, and Olivia likes
Mathematics. In how many ways can these subjects be arranged such that no one
gets their favorite subject?

(a) 0
(b) 1
(c) 2
(d) 3

Correct Answer: (d)


Solution: We use the principle of inclusion-exclusion to calculate the number of ways
in which no student gets their favorite subject. We calculate the number of ways
where at least one student gets their favorite subject and subtract from the total
arrangements:
1. Total number of arrangements of 4 subjects is 4!. 2. Subtract cases where at least
one student gets their favorite subject using inclusion-exclusion.

        
4 4 4 4
N = 4! − 3! − 2! + 1! − 0! = 24 − (24 − 12 + 4 − 1) = 3
1 2 3 4

2. How many onto functions are possible from a set of 5 elements to a set of 3 elements?

(a) 150
(b) 180
(c) 240
(d) 200

Correct Answer: (c)


Solution:
Let |A| = 5 and |B| = 3.
The number of onto functions from A to B are:
       
3 5 3 5 3 5 3
·3 − ·2 + ·1 − · 05 = 240
0 1 2 3
Lecture 391: Formula for Number of Onto Functions.

3. How many integer solutions are there for the equation

a + b + c = 12,

where a < 3, b < 6, c < 5?


(a) 4
(b) 3
(c) 2
(d) 1

Correct Answer: (b)


Solution:
The total number of possible solutions for the equation a + b + c = 12 without any
restrictions is:
   
(3 + 12 − 1) 14
N= = = 91.
12 2

However, this count includes cases where the variables exceed their specified limits.
We need to subtract those over-counted cases.
Let: - C1 : solutions where a ≥ 3, - C2 : solutions where b ≥ 6, - C3 : solutions where
c ≥ 5.
Now, we calculate each over-counted case:
For N (C1 ) (where a ≥ 3):

a′ = a − 3 (i.e., subtract 3 from a)

a′ + b + c = 9,
Number of solutions is:
   
(3 + 9 − 1) 11
N (C1 ) = = = 55.
9 2

Similarly:    
(3 + 6 − 1) 8
N (C2 ) = = = 28,
6 2
   
(3 + 7 − 1) 9
N (C3 ) = = = 36.
7 2

Now, calculate the intersections:


   
(3 + 3 − 1) 5
N (C1 ∩ C2 ) = = = 10,
3 2
   
(3 + 1 − 1) 3
N (C2 ∩ C3 ) = = = 3,
1 2
   
(3 + 4 − 1) 6
N (C1 ∩ C3 ) = = = 15.
4 2

For N (C1 ∩ C2 ∩ C3 ), there are no solutions since:

a + b + c ≥ 3 + 6 + 5 = 14 > 12.
Finally, using the principle of inclusion-exclusion, we get:

N (C1 ∩C2 ∩ C3 ) = N −[N (C1 )+N (C2 )+N (C3 )]+[N (C1 ∩C2 )+N (C2 ∩C3 )+N (C1 ∩C3 )]−N (C1 ∩C2 ∩C3 ).

N (C1 ∩ C2 ∩ C3 ) = 91 − [55 + 28 + 36] + [10 + 3 + 15] − 0 = 3.

So, the number of integer solutions is 3. Lecture 389: Example 12 Integer solutions
of an equation.

4. In how many ways can 4 roses, 6 tulips, and 5 lilies be arranged in a row, such that
no consecutive 4 flowers of the same type are together?

15! 11! 7!
 
(a) 4!·6!·5! − 3!·6! + 3!·4! − 3!
15! 11! 7!
 
(b) 4!·6!·5! − 3 3!·6! + 3 3!·4! − 3!
15! 11! 7!
 
(c) 4!·6!·5! − 3 3!·6! + 3 3!·4! − 5!
15! 11! 7!
 
(d) 6!·5! − 3 5! + 3 4! − 3!

Correct Answer: (b)


15!
Solution: The number of ways to arrange all flowers, N = 4!·6!·5! (using the multino-
mial theorem).
The number of arrangements where flowers of the same type are together is: N (C1 ) =
11!
N (C2 ) = N (C3 ) = 3!·6! .
The number of arrangements where two types of flowers are together is: N (C1 C2 ) =
7!
N (C2 C3 ) = N (C1 C3 ) = 3!·4! .
The number of arrangements where all three types are together is: N (C1 C2 C3 ) = 3!.
N (C1 , C2 , C3 ) = N − [N (C1 ) + N (C2 ) + N (C3 )] + [N (C1 C2 ) + N (C2 C3 ) + N (C1 C3 )] −
N (C1 C2 C3 )
15! 11! 7!
 
N (C1 , C2 , C3 ) = 4!·6!·5! − 3 3!·6! + 3 3!·4! − 3!
Lecture 381: Example 4 Arranging 3 x’s, 3 y’s and 3 z’s.

5. On a 3 × 3 garden grid:

I) One flower can be planted in 9 ways.


II) Two flowers can be planted in 92 ways such that they do not overshadow each


other (non-overlapping flowers).


III) Three flowers can be planted in 6 ways such that they do not overshadow each
other (non-overlapping flowers).

Which of the following statements are true? (Select all that apply)

(a) I and II
(b) II and III
(c) I and III
(d) All of the above
Correct Answer: (c) I and III
Solution: Two flowers can be planted in 12 ways.

6. Find the number of positive integers between 0 to 150 that are either odd or the cube
of an integer.

(a) 86
(b) 77
(c) 80
(d) 89

Correct Answer: (b)


Solution: Required numbers = n(Odd numbers) + n(Cube of integers) – n(Odd num-
ber and cube of an integer). From 1 to 150, there are 75 odd numbers and 75 even
numbers. The cubes of integers up to 150 are 1, 8, 27, 64, 125 = 5 numbers. The
odd numbers that are also cubes of integers are 1, 27, 125 = 3 numbers. Hence, the
required numbers = 75 + 5 − 3 = 77

7. Find the number of integer solutions to the equation


x1 + x2 + x3 − 9 = 0 where 0 ≤ x1 ≤ 3, 0 ≤ x2 ≤ 5, and 0 ≤ x3 ≤ 4.

(a) 8
(b) 10
(c) 12
(d) 15

Correct Answer: (b)


Solution: Total possible Solutions (N ) = 3+9−1 = 11
 
9 9 = 55.
Let C1 be the condition x1 ≥ 4
⇒ 3+5−1 7

5 = 5 = 21
Let C2 be the condition x2 ≥ 6
⇒ 3+3−1 5

3 = 3 = 10
Let C3 be the condition x3 ≥ 5
3+4−1 6

⇒ 4 = 4 = 15
N (C1 , C2 ) = 0, N (C2 , C3 ) = 0, N (C1 , C3 ) = 3+0−1

0 = 1, N (C1 , C2 , C3 ) = 0.
Solutions with given conditions = 55 − (21 + 10 + 15) + (0 + 0 + 1) − 0 = 10.

8. Seven students are called for a game. They each have a uniquely colored notebook,
and the notebooks are placed in a box. Each student is asked to pick a notebook at
random (they cannot see the color). In how many ways can these 7 students pick
the notebooks so that no one picks their own notebook (each student picks someone
else’s notebook)?

(a) 1854
(b) 3600
(c) 1855
(d) 1400

Correct Answer: (a)


Solution: The number of derangements (permutations where no element appears in
its original position) of 7 items is given by:
 
1 1 1 1 1 1 1 1
N = 7! − + − + − + − = 1854
0! 1! 2! 3! 4! 5! 6! 7!
which can be also written as
7 × 1e

9. For some alphabets a,b,c, . . . (n − 1)th alphabet, (n)th alphabet, there are 130962
derangements, where a,b,c,d appear in the first 4 positions. What is the value of n?

(a) 13
(b) 8
(c) 11
(d) 12

Correct Answer: (d)


Solution: Given that, a,b,c, and d are found at the first 4 positions and also are
deranged So, for the first 4 alphabets, D(4) = 4!e , for the remaining (n − 4) alphabets,
(n−4)!
D(n − 4) = e
Therefore, the total number of derangements is the product of D(4) and D(n − 4)
D(4) × D(n − 4) = 130962
(4)!
e × D(n − 4) = 130962
D(n − 4) = 130962×e
4!
D(n − 4) = 14, 832.98 ≈ D(8)
⇒n−4=8
⇒ n = 12
Lecture 399: Example 18 finding total number of items.
10. Let |A| = 18, |B| = 22, |C| = 30, |A ∩ B| = 8, |B ∩ C| = 10, |A ∩ C| = 12, and
|A ∩ B ∩ C| = 9. Then, |A ∪ B ∪ C| is

(a) 49
(b) 53
(c) 61
(d) 65

Correct Answer: (a)


Solution: Using the inclusion-exclusion principle,
|A ∪ B ∪ C| = 18 + 22 + 30 − 8 − 10 − 12 + 9 = 49.

You might also like