Homework 11 - Section 4.3: P (N, R) N!/ (N R) !

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Homework 11 - Section 4.

3
4. Let S = {1, 2, 3, 4, 5}
a) List all the 3-permutations of S.
b) List all the 3-combinations of S.
For permutations, order matters. The number of r-permutations from a set
of n elements is
P (n, r) = n!/(n r)!
For combinations, order doesnt matter. The number of r-combinations from
a set of n elements is
C(n, r) = n!/r!(n r)!
P (5, 3) = 60
C(5, 3) = 10
123
124
125
134
135
145
234
235
245
345

(132
(142
(152
(143
(153
(154
(243
(253
(254
(354

213
214
215
314
315
415
324
325
425
435

231
241
251
341
351
451
342
352
452
453

6. a) C(5, 1) =

b) C(5, 3)

312
412
512
413
513
514
423
523
524
534

321)
421
521)
431)
531)
541)
423)
532)
542)
543)

5!
5!
=
=5
1!(5 1)!
4!

5!
120
=
= 10
3!(5 3)!
12

c) C(8, 4) =

8 7 6 5 4!
8!
=
= 70
4!(8 4)!
4! 4!

d) C(8, 8) =

8!
8!
=
=1
8!(8 8)!
8!

e) C(8, 0) =

8!
8!
=
=1
0!(8 0)!
8!

f) C(12, 6) =

12!
= 924
6!(12 6)!

20. How many bit strings of length ten


a) have exactly three 0s?
The set being drawn from is a set of ten string positions: {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 }
How many ways can three different index positions (that correspond to the
0s) be selected from this set, where the order does not matter, but an element
cannot be selected more than once?
The formula to use here is the one for combination without repetition.
C(10, 3) = 120
b) have more 0s than 1s?
There are more 0s than 1s if there are fewer than five 1s.
What if theres no 1s? C(10, 0)
What if theres one 1? C(10, 1)
+C(10, 2) + C(10, 3) + C(10, 4) = 386
c) have at least seven 1s?
C(10, 7) + C(10, 8) + C(10, 9) + C(10, 10) = 176

d) have at least three 1s?


As above, or take the number of strings that do not have three 1s.
C(10, 0) + C(10, 1) + C(10, 2) = 56
Subtract this from the number of possible strings. The remaining strings will
all fulfill the condition.
21 0 possible strings = 1024 56 = 968

Homework 11 - Section 4.5


16. How many solutions are there to the equation
x1 + x2 + x3 + x4 + x5 + x6 = 29
where xi , i = 1, 2, 3, 4, 5, 6, is a nonnegative integer such that
a) xi > 1 for i = 1, 2, 3, 4, 5, 6?
The set being drawn from is the set of six variables: {x1 , x2 , x3 , x4 , x5 , x6 }.
Once an element is taken from the set, it is replaced.
And we dont care about order (taking x1 , x2 , x1 is the same as the order
x2 , x1 , x1 . In both instances, x1 = 2 and x2 = 1).
So, this is a problem of combination with repetition. There are
C(n + r 1, r) r-combinations from a set with n elements when repetition is
allowed.
There are also constraints on each variable. This just means that the problem has to be expressed in a different way. For (a), if every variable is at
least 2, that takes up 12 of the possible 29. That leaves 17 elements to select.

C(6 + 17 1, 17) = C(22, 17) = 26, 334


b) x1 1, x2 2, x3 3, x4 4, x5 5, x6 6?
The restrictions use up 22 of the total, leaving a free total of 7.
C(6 + 7 1, 7) = C(12, 7) = 792
c) x1 5
Subtract the number of solutions that violate this constraint (x1 6) from
the total number of possible solutions so we can do this part like the last two.
C(6 + 29 1, 29) C(6 + 23 1, 23) = 179, 976
d) x1 < 8 and x2 > 8?
A Venn diagram may be helpful.
Take the number of solutions where x2 9 = C(6 20 1, 20) = 53, 130
Subtract from that the further number of solutions where the restriction on
x1 is violated (x1 8).
53, 130 C(6 12 1, 12) = 46, 942
22. How many ways are there to distribute 12 indistinguishable balls into six
distinguishable bins?
The set of elements is the six bins: {b1 , b2 , b3 , b4 , b5 , b6 }. Select an element
from the set 12 times. The elements are not removed from the set. The order
of selection doesnt matter.
The formula to use is that for combination with repetition:
C(6 + 12 1, 12) = 6188

24. How many ways are there to distribute 15 distinguishable objects into
five distinguishable boxes so that the boxes have one, two, three, four, and
five objects in them respectively?
Theorem 4 gives the following: The number of ways to place n distinguishable objects into k distinguishable bins such that ni objects are placed into
box i, i = 1, 2, ..., k equals
n!
.
n1 !n2 !...nk !
However, note that this theorem specifies that box 1 contains 1 object, box
2 contains 2 objects,... thats not the only acceptable case. What that theorem really gives is the number of ways to arrange those objects into subsets
of those sizes. For this problem, you can imagine the objects arranged into
acceptable size piles before placing them into the boxes.
We have the number of arrangements of objects into piles. How many different ways can these be arranged into five boxes?
Since order matters, and we cant use a box more than once, this is a problem
of permutation without repetition. There are P (5, 5) = 5! possible ways to
arrange them into boxes.
15!5!
= 4, 540, 536, 000
1!2!3!4!5!

Homework 11 - Section 5.1


2. What is the probability a die comes up six when it is rolled?
1 out of 6 possible outcomes = 1/6
4. Probability of a randomly selected day of the year, which has 366 days
for some reason, being in April.
30 out of 366 possible outcomes = 30/366
6. What is the probability that a card selected from a deck is an ace or heart?
13 + 3 = 16 out of 52 possible outcomes = 16/52
18. What is the probability that a five-card poker hand contains a straight
flush (five sequential cards of the same suit)?
For each of the 4 suits, there are 10 (or 9 if you dont consider the ace low
and high) possible straights.
How many hands can be dealt? C(52, 5)
40/C(52, 5) = 1/64974

CSE 260 - Spring Semester 2006


Discrete Structures in Computer Science and Engineering
Quiz-11 Friday, April 21, 2006
1. Give the number of bit (0 or 1) strings of length 10.
2. Give the number of bit strings of length 10 that contain less than three
1s.
3. How many different possible orderings of four elements are there?
4. How many nonnegative integer solutions are there to the equation x1 +
x2 + x3 = 10?
5. What is the probability that a five-card poker hand contains five hearts?

You might also like