MATH 302 Discrete Mathematics Extra

advertisement

MATH 302 Discrete Mathematics

Extra-credit Assignment

Solution

Please show your argument and computation. Calculators and computers are not permitted.

1. Determine the number of terminal 0s in 50! using ordinary base 10 representation.

Solution. In 50! the prime 5 appears b 50 / 5 c + b 50 / 25 c = 12 times. Hence the answer is 12.

2. Prove the identity n

X k

2 k =1 n k

= n ( n + 1)2 n − 2

Solution. From Binomial Theorem

(1 + x ) n

= n

X k =0 n k x k

.

.

Take derivative with respect to x , and then multiply by x , nx (1 + x ) n − 1

= n

X k k =0 n k x k

.

Take derivative with respect to x again, n (1 + x ) n − 1

+ n ( n − 1) x (1 + x ) n − 2

= n

X k

2 k =0 n k x k − 1

.

Let x = 1, we have n

X k

2 k =0 n k

= n 2 n − 1

+ n ( n − 1)2 n − 2

= n ( n + 1)2 n − 2

.

3. Let F ( n ) be the n th Fibonacci number. Prove that

F ( n ) = n − 1

0

+ n − 2

1

+ n − 3

2

+ · · · + n − t t − 1 where t = b n +1

2 c .

Solution. Use induction on n . For n = 1 or 2, it is easy to check both sides of the expression are 1.

Let t ( n ) = b n +1

2 c . Assume for i = 1 , 2 , . . . , n ,

F ( j ) = t ( j )

X k =1 n k

− k

1

.

We shall prove the equation for n + 1. Note that F ( n + 1) = F ( n ) + F ( n − 1).

(a) If n is even, t ( n ) = t ( n − 1) = n

2 and t ( n + 1) = n

2

+ 1. Then

F ( n + 1) =

= n n

0

0

1

+

+

+ n −

1 n n

1

1

0

2

2

+

+ n −

2

3

+ · · · + n n

2

− n

2

− 1

+ n −

2 n

2

1

3

+ · · ·

+ · · · +

+ n − n n − n

2 n

2

− 2

+ 1

2

− 1 n

2

= t ( n +1)

X n + 1 − k − 1 k

.

k =1

+

+ n − n

2

(b) If n is odd, t ( n ) = t ( n + 1) = n +1

2

, and t ( n − 1) = n − 1

2

. Then

F ( n + 1) =

= n n

0

0

1

+

+

+ n −

1 n n

1

1

0

2

2

+

+ n − 3

2

+ · · · + n − n +1

2 n +1

2

− 1

+ n −

2 n

2

1

3

+

+

· · ·

· · ·

+

+ n − n − 1 − n − 1

2 n − 1

2 n +1

+ 1

1

2 n − 1

2

= t ( n +1)

X n + 1 − k − 1 k

.

k =1

1 − n

2 n −

− 1 n

2 n

2

The equation is true in both cases.

4. Words of length n , using only the three letters a, b, c , are to be transmitted over a communication channel subject to the condition that no word in which two a ’s appear consecutively is to be transmitted. Determine the number of words allowed by the communication channel.

Solution. A word of length n can start with a , or b , or c . If it starts with b or c , then the following is an allowed word of length n − 1. If it starts with a , then the second letter must be b or c , and the following is an allowed word of length n − 2. Hence h n

= 2 h n − 1

+ 2 h n − 2 h

1

= 3 , h

2

= 8 .

Solving the recurrence relation yields

√ h n

=

2 +

2

3

3

(1 +

3) n

+

− 2 +

2

3

3

(1 −

3) n

.

2

5. There are 100 people at a party. Each person has an even number (possibly zero) of acquaintances. Prove that there are three people at the party with the same number of acquaintances.

Solution. The possible number of acquaintances for any particular guest is 0 to 98, there are 50 even numbers. If there are no three with the same number of acquaintances, then there are exactly two people with 2 i acquaintances, for each i = 0 , 1 , . . . , 49. However, if there are two guests with 0 acquaintances, then the largest number of acquaintances one can have is 97 < 98. Contradiction.

3

Download