Combinatorics and Probability Problems and Solutions, Assignments of Computer Science

Solutions to various combinatorics and probability problems, including combinations of committees, poker hands, and number arrangements. It also covers the concept of double counting and the stars and bars technique.

Typology: Assignments

Pre 2010

Uploaded on 03/28/2010

koofers-user-ehl
koofers-user-ehl 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 21: HW2 Solutions
August 14, 2007
1 6.4
6. a) From 15 people there are 15
6ways to choose a committee of 6. b) Either
none of the two members can be on the council, or one of them can giving
2
013
6+2
113
5. c) Either both the members must be on the council
together or none of them giving 13
4+13
6. d) i) We choose a group of
3 men, then a group of 3 women and use the multiplication rule to figure
out the total number of combinations of men and women giving 8
37
3. ii)
This is equivalent to saying the total number of committees minus those
groups that contain NO women (i.e. only men) which is 15
68
6. e) We
need two from each class and use the multiplication rule to find the total
number of combinations giving 3
24
23
25
2.
8. a) From 12 questions we can choose 10 so there are 12
10ways to choose our 10
questions. b) i) We choose 4 among the proof questions and 6 among the
non-proofs giving 5
47
6. ii) We take the total number of 10 question ways
and subtract out those sets that have no questions that require proofs
but there are 0 sets of 10 questions where none of the questions require
proofs because there are only 7 non-proof questions giving us 12
10. iii) 3
is the minimum amount of proofs that you could do seeing that there are
only 7 non-proof questions. So to have at most 3 proof questions you must
choose all the non-proof questions then choose exactly 3 of the proof ones
giving 5
3ways. d) We can either do both of 1 and 2 or neither giving us
10
8+10
10.
11. NOTE: to convert these to probabilities, just divide all the answers given
by the total number of ways to choose a 5 card poker hand, which is 52
5.
Also note that we are only considering disjoint sets i.e. the calculations for
straights will NOT include straight flushes. a) For a royal flush the only
freedom we have is the suits. We can choose 4
1different suits, but once
that is fixed the cards must then be AKQJT (Note that T is my notation
for the card with value 10), so we have 4
1. b) Again we can choose the
suit, 4
1and now we can choose the highest card in the straight (after
choosing that, the rest of the cards must be fixed). The highest card can
be anywhere from a 5 to an K (not royal flush) giving 9 possibilities. So
1
pf3

Partial preview of the text

Download Combinatorics and Probability Problems and Solutions and more Assignments Computer Science in PDF only on Docsity!

CSE 21: HW2 Solutions

August 14, 2007

  1. a) From 15 people there are

6

ways to choose a committee of 6. b) Either none of the two members can be on the council, or one of them can giving( 2 0

6

1

5

. c) Either both the members must be on the council together or none of them giving

4

6

. d) i) We choose a group of 3 men, then a group of 3 women and use the multiplication rule to figure out the total number of combinations of men and women giving

3

3

. ii) This is equivalent to saying the total number of committees minus those groups that contain NO women (i.e. only men) which is

6

6

. e) We need two from each class and use the multiplication rule to find the total number of combinations giving

2

2

2

2

  1. a) From 12 questions we can choose 10 so there are

10

ways to choose our 10 questions. b) i) We choose 4 among the proof questions and 6 among the non-proofs giving

4

6

. ii) We take the total number of 10 question ways and subtract out those sets that have no questions that require proofs – but there are 0 sets of 10 questions where none of the questions require proofs because there are only 7 non-proof questions giving us

10

. iii) 3 is the minimum amount of proofs that you could do seeing that there are only 7 non-proof questions. So to have at most 3 proof questions you must choose all the non-proof questions then choose exactly 3 of the proof ones giving

3

( ways. d) We can either do both of 1 and 2 or neither giving us 10 8

10

  1. NOTE: to convert these to probabilities, just divide all the answers given by the total number of ways to choose a 5 card poker hand, which is

5

Also note that we are only considering disjoint sets i.e. the calculations for straights will NOT include straight flushes. a) For a royal flush the only freedom we have is the suits. We can choose

1

different suits, but once that is fixed the cards must then be AKQJT (Note that T is my notation for the card with value 10), so we have

1

. b) Again we can choose the suit,

1

and now we can choose the highest card in the straight (after choosing that, the rest of the cards must be fixed). The highest card can be anywhere from a 5 to an K (not royal flush) giving 9 possibilities. So

we have

1

1

. c) We must choose one of the 13 values for our 4-of-a-kind and then we must choose any of the 48 remaining cards for our 5th card. This gives

1

1

. d) We must choose a denomination for the 3-of-a- kind part of the full house

1

, then choose 3 of those 4 cards of that denomination

3

, we then must choose a 2nd denomination that was not the first

1

and choose 2 of the 4 cards of that denomination

2

. Putting it all together gives

1

3

1

2

. e) We must first choose the suit for our flush

1

and then choose 5 of the 13 cards of that suit

5

. We then must subtract out those flushes that are straight flushes (calculated in (a)+(b)) giving us the answer of

1

5

1

1

. f) For a straight (including straight flushes) we must first choose a highest card for our straight like in the straight flush example giving us

1

. This now fixes the numbers in the straight be we have freedom over suits for each so we have the answer of

1

1

. This overcounts straight flushes so we subtract them out to get our final answer of

1

1

1

1

g) We must choose a value for the 3-of-a-kind

1

and now choose which 3 suits of that denomination we shall have

3

, now we pick 2 different denomination and their suits ( 12 2

1

. Putting it all together gives

1

3

2

1

. h) The one pair calculation is very similar to the 3-of-a-kind one.

1

2

3

1

. i) We first count the set of hands that have no repeated denominations which is the same as choosing 5 of the 13 denominations and then choosing each card’s suit which is

5

1

. From this total we subtract those hands that are straights of any kind giving a final answer of

5

1

1

1

  1. a) There are 50 even integers in the set and b) 50 odd integers in the set. c) Two numbers sum to an even number when either they were both originally even or both originally odd. This gives

2

2

. d) For an odd sum we must have one number be even and the other be odd, so we first choose one even number and then choose one odd number giving( 50 1

1

  1. a) We have 1 H, 1 U, 3 L, 2 A, 1 B, 2 O. Using theorem 6.4.2 (pg. 345) there are (^) 1!1!3!2!1!2!10! ways for HULLABALOO to be arranged. b) We first fix the first and last letters to be U and L respectively leaving 1 H, 2 L, 2 A, 1 B, 2 0 remaining. This gives us (^) 1!2!2!1!2!8! ways. c) In a 10 letter string there are 9 places in which we could put HU so that they are next to each other. The remaining 8 letters (3 L, 2 A, 1 B, 2 0) can be put in any order giving

1

  1. You are double counting every 2 pair hand here. Choosing an A at step one and then a K at step 3 is the same as choosing a K at step 1 and an A at step 3. This symmetry results in every 2 pair hand being counted twice so the result stated needs to be divided by 2.