Docsity

Homework 2 Solutions - Combinatorics | MAT 145, Assignments of Mathematics

Toggle sidebar
bg1
MAT 145: Homework Solutions #2
Prepared by Maya Ahmed
April 11, 2003
1. Brualdi 3.3
In how many ways can a poker hand (5 cards) be dealt? How many different poker
hands are there?
Answer:
There are a total of 52 cards, so there are 52 choices for the first card. After the first
card is chosen there are 51 choices for the second card. Similarly there are 50 cards
for the 3 rd card, 49 choices for the 4 th card and 48 choices for the 5 th card. Hence
there are 52 ×51 ×50 ×49 ×48 poker hands.
Any five cards of the 52 cards can form a poker hand, hence there are 52
5different
poker hands.
2. Brualdi 3.5
Determine the largest power of 10 that is a factor of the following numbers (equivalently,
the number of terminal 0’s, using ordinary base 10 representation):
(a) 50!
Answer:
Since 10 = 2 ·5, we will search for factors of 50! that are divisible by 5 and 2.
Among all integers between 1 and 50, multiples of 5 appear once every five numbers.
Thus the total number of the multiples of 5 in this range is 50/5 = 10. All these 10
multiples of 5 contribute at least one factor of 5 in 50!. Now, we notice that 25 has two
factors of 5. And 25 appears twice (50/25 = 2) in the range. Thus we have to include
two more factors of 5 in our count. Altogether, we have
50
5+50
25 = 12
factors of 5. Since every other number is even, we immediately know there are more
than 50/2 = 25 factors of 2 in 50!. Therefore, we conclude that there are exactly 12
powers of 10 = 2 ·5 in 50!.
(b) 1000!
1
pf3
pf4
pf5

Partial preview of the text

Download Homework 2 Solutions - Combinatorics | MAT 145 and more Assignments Mathematics in PDF only on Docsity!

MAT 145: Homework Solutions

Prepared by Maya Ahmed

April 11, 2003

  1. Brualdi 3.

In how many ways can a poker hand (5 cards) be dealt? How many different poker hands are there? Answer: There are a total of 52 cards, so there are 52 choices for the first card. After the first card is chosen there are 51 choices for the second card. Similarly there are 50 cards for the 3 rd card, 49 choices for the 4 th card and 48 choices for the 5 th card. Hence there are 52 × 51 × 50 × 49 × 48 poker hands. Any five cards of the 52 cards can form a poker hand, hence there are

5

different poker hands.

  1. Brualdi 3.

Determine the largest power of 10 that is a factor of the following numbers (equivalently, the number of terminal 0’s, using ordinary base 10 representation): (a) 50! Answer: Since 10 = 2 · 5, we will search for factors of 50! that are divisible by 5 and 2. Among all integers between 1 and 50, multiples of 5 appear once every five numbers. Thus the total number of the multiples of 5 in this range is 50/5 = 10. All these 10 multiples of 5 contribute at least one factor of 5 in 50!. Now, we notice that 25 has two factors of 5. And 25 appears twice (50/25 = 2) in the range. Thus we have to include two more factors of 5 in our count. Altogether, we have

50 5

factors of 5. Since every other number is even, we immediately know there are more than 50/2 = 25 factors of 2 in 50!. Therefore, we conclude that there are exactly 12 powers of 10 = 2 · 5 in 50!. (b) 1000!

Answer: Since multiples of 5 appear every five numbers, there are 1000/5 = 200 multiples of 5 in the range from 1 through 1000. Every multiple of 5 in this range contributes at least one factor of 5 in 1000!. As before, we know that every multiple of 25 contributes at least two factors of 5. So we have to take into account 1000/25 = 40 more factors of 5 in 1000!, because already one factor of 5 has been counted. (To avoid double counting, we add the number of multiples of 25 instead of two times of that.) Actually, every multiple of 125 = 5^3 has at least three factors 5. Thus we have to add yet 1000/125 = 8 more factors into account. Finally, the largest power of 5 that does not exceed 1000 is 625 = 5^4 , so we need to take one more factor of 5 in our computation. Altogether, there are 1000 5

factors of 5 in 1000!. Clearly every even number contributes at least one factor of 2, so 1000! contains at least 500 factors of 2. Thus the total number of factors of 10 = 2 · 5 is exactly 249.

  1. Brualdi 3.

In how many ways can six men and six ladies be seated at a round table if the men and ladies are to sit in alternate seats? Answer: Let the six men be A 1 , A 2 , A 3 , A 4 , A 5 , A 6. After seating A 1 at the “head of the table” (see page 59 of text book), there are 5! ways to seat the other 5 men, and 6! ways to seat the six women such that the men and women are in alternate seats. So there are a total of 5!6! ways of seating six men and six ladies at a round table if the men and ladies are to sit in alternate seats.

  1. Brualdi 3.

In how many ways can 15 people be seated at a round table if B refuses to sit next A? What if B only refuses to sit on A’s right? Answer: The total number of ways 15 people can sit around a round table is (15 − 1)! = 14! (see Theorem 3.2.2). Now consider the arrangements where we make B sit to the right of A. Then there are thirteen more seats to fill and hence giving us a total of 13! ways of doing this. So the number of ways 15 people can be seated at a round table if B only refuses to sit on A’s right is 14! − 13! = 13 · 13!. this answers the second part of the question. Now we consider arrangements where B is sitting to the left of A and there are 13! ways of doing this. So the number of ways 15 people can be seated at a round table if B refuses to sit next A (both to the right or left of A, talk of hating someone!) is 13 · 13! − 13! = 12 · 13!.

of column and so on. So for the case, when there is no rook in the (1, 1) square we have 7^2

3

3! ways to place 5 rooks such that they do not attack each other. Hence the total number of ways 5 indistinguishable rooks can be placed on a 8 × 8 chess board so that no rook can attack another and neither the first row nor the first column is empty is

4

4! + 7^2

3

  1. Brualdi 3.

Determine the number of 10-permutations of the multiset

S = { 3 .a, 4 .b, 5 .c}.

Answer: (See example on page 70 for a similar problem.)

  1. Brualdi 3.

How many integral solutions of

x 1 + x 2 + x 3 + x 4 = 30

satisfy x 1 ≥ 2 , x 2 ≥ 0 , x 3 ≥ − 5 , x 4 ≥ 8? Answer: We need to reformulate this problem in new variables so that we are solving for variables greater than or equal to 0 (See example on page 74). So let y 1 = x 1 − 2 , y 2 = x 2 , y 3 = x 3 + 5, y 4 = x 4 − 8. Then y 1 + y 2 + y 3 + y 4 = x 1 − 2 + x 2 + x 3 + 5 + x 4 − 8 = x 1 + x 2 + x 3 + x 4 − 5 Thus we want to solve the equation y 1 + y 2 + y 3 + y 4 = 25, such that yi ≥ 0 for all i. Now we can apply Theorem 3.5.1 and we get that the number of nonnegative solutions of the equation

y 1 + y 2 + y 3 + y 4 = 25

is

25

25

which is also the number of integral solutions of

x 1 + x 2 + x 3 + x 4 = 30

such that x 1 ≥ 2 , x 2 ≥ 0 , x 3 ≥ − 5 , x 4 ≥ 8.

  1. Brualdi 3.

There are twenty identical sticks lined up in a row occupying twenty distinct places:

||||||||||||||||||||

and six of them are to be chosen. (a) How many choices are there? Answer: There are

6

choices. (b) How many choices are there if no two of the chosen sticks can be consecutive? Answer: Choose 6 sticks. Let the position of the chosen sticks be 1 ≤ r 1 < r 2 < r 3 < r 4 < r 5 < r 6 ≤ 20. Now the remaining 14 sticks are between these six sticks. Let a 1 be the number of sticks between r 1 and 1, let a 2 be the number of sticks between r 2 and r 1 and so on. Thus a 1 = r 1 − 1 , a 2 = r 2 − r 1 , a 3 = r 3 − r 2... a 6 = r 6 − r 5 , a 7 = 20 − r 6. Since we do not choose consecutive sticks, ai ≥ 1; i = 2,... 6 and a 1 ≥ 0 , a 7 ≥ 0. Also a 1 + a 2 + a 3 + a 4 + a 5 + a 6 + a 7 = 14. Now we make a change of variable (like problem 31). Let bi = ai − 1; i = 2,... , 6, let b 1 = a 1 , b 7 = a 7. Then the required answer is the number of nonnegative integral solutions of the equation b 1 + b 2 + b 3 + b 4 + b 5 + b 6 + b 7 = 9, which is

9

9

Thus there are

9

choices such that no two of the chosen sticks are consecutive. (c) How many choices are there if there must be at-least two sticks between each pair of chosen sticks? Answer: This is similar to part (b), but we need two sticks between any pair of chosen sticks. So now ai ≥ 2 , i = 2,... , 6. So we make the variable change bi = ai − 2; i = 2,... , 6, let b 1 = a 1 , b 7 = a 7. Therefore the required answer is the number of nonnegative integral solutions of the equation( b 1 + b 2 + b 3 + b 4 + b 5 + b 6 + b 7 = 4. Thus the answer is 4+7− 1 4

4