advanced discrete structure homework 2 solution

30
Advanced Discrete Structure Homework 2 Solution Simon Chang

Upload: others

Post on 18-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Advanced Discrete Structure Homework 2 Solution

Advanced Discrete Structure

Homework 2 Solution

Simon Chang

Page 2: Advanced Discrete Structure Homework 2 Solution

Question 1

Use binomial expansions or combinatorial

arguments to evaluate the following sums:

(a) ๐‘š๐‘˜

๐‘š๐‘˜=0

๐‘›๐‘Ÿ+๐‘˜

(b) (โˆ’1)๐‘˜ ๐‘›๐‘˜

๐‘›๐‘Ÿโˆ’๐‘˜

๐‘Ÿ๐‘˜=0

(c) 2๐‘˜ ๐‘›๐‘˜

๐‘›๐‘˜=0

Page 3: Advanced Discrete Structure Homework 2 Solution

Question 1

(a) ๐‘š๐‘˜

๐‘š๐‘˜=0

๐‘›๐‘Ÿ+๐‘˜

โ†’ the coefficient of ๐‘ฅ๐‘Ÿ in 1 + ๐‘ฅโˆ’1 ๐‘š 1 + x n

1 + ๐‘ฅโˆ’1 ๐‘š 1 + x n =1 + x

x

m

1 + x n

=1 + x m+n

xm

โ†’ the coefficient of ๐‘ฅ๐‘Ÿ: ๐‘š+๐‘›๐‘š+๐‘Ÿ

Page 4: Advanced Discrete Structure Homework 2 Solution

Question 1

(b) (โˆ’1)๐‘˜ ๐‘›๐‘˜

๐‘›๐‘Ÿโˆ’๐‘˜

๐‘Ÿ๐‘˜=0

โ†’ the coefficient of ๐‘ฅ๐‘Ÿ in 1 โˆ’ ๐‘ฅ ๐‘› 1 + ๐‘ฅ ๐‘›

1 โˆ’ ๐‘ฅ ๐‘› 1 + ๐‘ฅ ๐‘› = 1 โˆ’ ๐‘ฅ2 ๐‘›

โ†’ the coefficient of ๐‘ฅ๐‘Ÿ:

โˆ’1 ๐‘Ÿ/2

๐‘›

๐‘Ÿ/2, r is even

0 r is odd

Page 5: Advanced Discrete Structure Homework 2 Solution

Question 1

(c) 2๐‘˜ ๐‘›๐‘˜

๐‘›๐‘˜=0

1 + 2๐‘ฅ ๐‘›

= 1 + 21๐‘›

1๐‘ฅ + 22

๐‘›

2๐‘ฅ2 +โ‹ฏ+ 2๐‘›

๐‘›

๐‘›๐‘ฅ๐‘›

When ๐‘ฅ = 1:

2๐‘˜๐‘›

๐‘˜

๐‘›

๐‘˜=0

= 1 + 2๐‘ฅ ๐‘› = 3๐‘›

Page 6: Advanced Discrete Structure Homework 2 Solution

Question 2

Find the coefficient of ๐‘ฅ12 in ๐‘ฅ + 3

1 โˆ’ 2๐‘ฅ + ๐‘ฅ2

Page 7: Advanced Discrete Structure Homework 2 Solution

Question 2

๐‘ฅ + 3

1 โˆ’ 2๐‘ฅ + ๐‘ฅ2=

๐‘ฅ + 3

1 โˆ’ ๐‘ฅ 2

= ๐‘ฅ + 3 1 + ๐‘ฅ + ๐‘ฅ2 +โ‹ฏ 2

The coefficient of ๐‘ฅ12:

1 ร—11 + (2 โˆ’ 1)

2 โˆ’ 1+ 3 ร—

12 + (2 โˆ’ 1)

2 โˆ’ 1

= 1 ร— 12 + 3 ร— 13 = 51

Page 8: Advanced Discrete Structure Homework 2 Solution

Question 3 (a)

Find the ordinary generating function of the

sequence (๐‘Ž0, ๐‘Ž1, ๐‘Ž2, โ€ฆ ) where ๐‘Ž๐‘Ÿ is the number

of ways in which the sum r will show when two

distinct dice are rolled, with the first one showing

even and the second one showing odd.

Page 9: Advanced Discrete Structure Homework 2 Solution

Question 3 (a)

๐‘ฅ2 + ๐‘ฅ4 + ๐‘ฅ6 ๐‘ฅ1 + ๐‘ฅ3 + ๐‘ฅ5

Page 10: Advanced Discrete Structure Homework 2 Solution

Question 3 (b)

Find the ordinary generating function of the

sequence (๐‘Ž0, ๐‘Ž1, ๐‘Ž2, โ€ฆ ) where ๐‘Ž๐‘Ÿ is the number

of ways in which the sum r will show when 10

distinct dice are rolled, with five of them showing

even and the other five showing odd.

Page 11: Advanced Discrete Structure Homework 2 Solution

Question 3 (b)

E for even, O for odd:

EEEEEOOOOO: ๐‘ฅ2 + ๐‘ฅ4 + ๐‘ฅ6 5 ๐‘ฅ1 + ๐‘ฅ3 + ๐‘ฅ5 5

EOEOEOEOEO: ๐‘ฅ2 + ๐‘ฅ4 + ๐‘ฅ6 5 ๐‘ฅ1 + ๐‘ฅ3 + ๐‘ฅ5 5

EEOOEOEOOE: ๐‘ฅ2 + ๐‘ฅ4 + ๐‘ฅ6 5 ๐‘ฅ1 + ๐‘ฅ3 + ๐‘ฅ5 5

โ‹ฎ

The sum: 10!

5!5!๐‘ฅ2 + ๐‘ฅ4 + ๐‘ฅ6 5 ๐‘ฅ1 + ๐‘ฅ3 + ๐‘ฅ5 5

Page 12: Advanced Discrete Structure Homework 2 Solution

Question 4

How many ways are there to collect $24 from 4

children and 6 adults if each person gives at

least $1, but each child can give at most $4 and

each adult at most $7?

Page 13: Advanced Discrete Structure Homework 2 Solution

Question 4

๐‘ฅ + ๐‘ฅ2 +โ‹ฏ+ ๐‘ฅ4 4 ๐‘ฅ + ๐‘ฅ2 +โ‹ฏ+ ๐‘ฅ7 6

= x10 1 + ๐‘ฅ + ๐‘ฅ2 + ๐‘ฅ3 4 1 + ๐‘ฅ + ๐‘ฅ2 +โ‹ฏ+ ๐‘ฅ6 6

= x101 โˆ’ x4

1 โˆ’ x

41 โˆ’ x7

1 โˆ’ x

6

=๐‘ฅ10 1 โˆ’ ๐‘ฅ4 4 1 โˆ’ ๐‘ฅ7 6

1 โˆ’ ๐‘ฅ 10

Page 14: Advanced Discrete Structure Homework 2 Solution

Question 4

1 โˆ’ ๐‘ฅ4 4 = 1 โˆ’ 4๐‘ฅ4 + 6๐‘ฅ8 โˆ’ 4๐‘ฅ12 + ๐‘ฅ16 1 โˆ’ ๐‘ฅ7 6 = 1 โˆ’ 6๐‘ฅ7 + 15๐‘ฅ14 โˆ’ 20๐‘ฅ21 + 15๐‘ฅ28 โˆ’ 6๐‘ฅ35 + ๐‘ฅ42

1 ร— 1 ร—14 + 9

9+ 1 ร— โˆ’6 ร—

7 + 9

9

+1 ร— 15 ร—0 + 9

9+ โˆ’4 ร— 1 ร—

10 + 9

9

+ โˆ’4 ร— โˆ’6 ร—3 + 9

9+ 6 ร— 1 ร—

6 + 9

9

+ โˆ’4 ร— 1 ร—2 + 9

9

Page 15: Advanced Discrete Structure Homework 2 Solution

Question 5

Find the exponential generating function with:

(a) ๐‘Ž๐‘Ÿ = 1/(๐‘Ÿ + 1)

(b) ๐‘Ž๐‘Ÿ = ๐‘Ÿ!

Page 16: Advanced Discrete Structure Homework 2 Solution

Question 5

(a) ๐‘Ž๐‘Ÿ =1

๐‘Ÿ + 1

1 +1

2

๐‘ฅ

1!+

1

3

๐‘ฅ

2!+โ‹ฏ = 1 +

๐‘ฅ

2!+

๐‘ฅ2

3!+โ‹ฏ

=1 +

๐‘ฅ1!+๐‘ฅ2

2!+๐‘ฅ3

3!+ โ‹ฏ โˆ’ 1

๐‘ฅ=๐‘’๐‘ฅ โˆ’ 1

๐‘ฅ

Page 17: Advanced Discrete Structure Homework 2 Solution

Question 5

(b) ๐‘Ž๐‘Ÿ = ๐‘Ÿ!

1 + 1!๐‘ฅ

1!+ 2!

๐‘ฅ2

2!+ โ‹ฏ = 1 + ๐‘ฅ + ๐‘ฅ2 +โ‹ฏ

=1

1 โˆ’ ๐‘ฅ

Page 18: Advanced Discrete Structure Homework 2 Solution

Question 6

Find the number of n-digit strings generated from

the alphabet {0, 1, 2, 3, 4} whose total number

of 0's and 1's is even.

Page 19: Advanced Discrete Structure Homework 2 Solution

Question 6

The number of 0โ€™s and 1โ€™s are both even:

1 +๐‘ฅ2

2!+๐‘ฅ4

4!+ โ‹ฏ

2

1 + ๐‘ฅ +๐‘ฅ2

2!+๐‘ฅ3

3!+ โ‹ฏ

3

=๐‘’๐‘ฅ + ๐‘’โˆ’๐‘ฅ

2

2

ex 3 =e5x + e3x + ex

4

Page 20: Advanced Discrete Structure Homework 2 Solution

Question 6

The number of 0โ€™s and 1โ€™s are both odd:

๐‘ฅ +๐‘ฅ3

3!+๐‘ฅ5

5!+ โ‹ฏ

2

1 + ๐‘ฅ +๐‘ฅ2

2!+๐‘ฅ3

3!+ โ‹ฏ

3

=๐‘’๐‘ฅ โˆ’ ๐‘’โˆ’๐‘ฅ

2

2

ex 3 =e5x โˆ’ e3x + ex

4

Page 21: Advanced Discrete Structure Homework 2 Solution

Question 6

The sum:

e5x โˆ’ e3x + ex

4+e5x โˆ’ e3x + ex

4=e5x + ex

2

The coefficient of ๐‘ฅ๐‘›

๐‘›! is:

5๐‘› + 1

2

Page 22: Advanced Discrete Structure Homework 2 Solution

Question 7 (Challenge)

Show that the number of partitions of n is equal

to the number of partitions of 2n into n parts.

(Hint: Use Ferrers graph.)

Page 23: Advanced Discrete Structure Homework 2 Solution

Question 7 (Challenge)

To divide 2n objects into n groups:

โ— โ— โ— โ‹ฎ โ— โ—

โ— โ— โ— โ— โ— โ— โ— โ— โ— โ— โ— โ— โ‹ฎ โ—

n

n

Page 24: Advanced Discrete Structure Homework 2 Solution

A Interesting Fact about Ferrโ€™s Graph

The number of partitions with no one larger than k

= The number of partitions with no more than k groups

Page 25: Advanced Discrete Structure Homework 2 Solution

Question 8 (Challenge)

Show that for any s > 1,

1

๐‘›๐‘ 

โˆž

๐‘›=1

โ‰ก 1

1 โˆ’ ๐‘โˆ’๐‘ ๐‘ ๐‘๐‘Ÿ๐‘–๐‘š๐‘’

The sum of the left-hand side is popularly known

as the Riemann zeta function, ฮถ(s), and the overall

identity is known as the Euler product formula.

Page 26: Advanced Discrete Structure Homework 2 Solution

Question 8 (Challenge)

๐œ ๐‘  = 1 +1

2๐‘ +1

3๐‘ +1

4๐‘ +โ‹ฏ

1

2๐‘ ๐œ ๐‘  =

1

2๐‘ +1

4๐‘ +1

6๐‘ +1

8๐‘ +โ‹ฏ

1 โˆ’1

2๐‘ ๐œ ๐‘  = 1 +

1

3๐‘ +1

5๐‘ +1

7๐‘ +โ‹ฏ

Page 27: Advanced Discrete Structure Homework 2 Solution

Question 8 (Challenge)

1 2 3 4 5 6 7 8 9 10

11 12 13 14 15 16 17 18 19 20

21 22 23 24 25 26 27 28 29 30

31 32 33 34 35 36 37 38 39 40

โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ

Page 28: Advanced Discrete Structure Homework 2 Solution

Question 8 (Challenge)

1 โˆ’1

2๐‘ ๐œ ๐‘  = 1 +

1

3๐‘ +1

5๐‘ +1

7๐‘ +โ‹ฏ

1

3๐‘ 1 โˆ’

1

2๐‘ ๐œ ๐‘  =

1

3๐‘ +1

9๐‘ +

1

15๐‘ +

1

21๐‘ +โ‹ฏ

1 โˆ’1

3๐‘ 1 โˆ’

1

2๐‘ ๐œ ๐‘  =

1

5๐‘ +1

7๐‘ +

1

11๐‘ +

1

13๐‘ +โ‹ฏ

Page 29: Advanced Discrete Structure Homework 2 Solution

Question 8 (Challenge)

1 2 3 4 5 6 7 8 9 10

11 12 13 14 15 16 17 18 19 20

21 22 23 24 25 26 27 28 29 30

31 32 33 34 35 36 37 38 39 40

โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ

Page 30: Advanced Discrete Structure Homework 2 Solution

Question 8 (Challenge)

Repeating this:

โ‹ฏ 1โˆ’1

11๐‘ 1 โˆ’

1

7๐‘ 1 โˆ’

1

5๐‘ 1 โˆ’

1

3๐‘ 1 โˆ’

1

2๐‘ ๐œ ๐‘  = 1

And we can get:

๐œ ๐‘  =1

1 โˆ’12๐‘ 

1 โˆ’13๐‘ 

1 โˆ’15๐‘ 

1 โˆ’17๐‘ 

1 โˆ’111๐‘ 

โ‹ฏ

= 1

1 โˆ’ ๐‘โˆ’๐‘ ๐‘ ๐‘๐‘Ÿ๐‘–๐‘š๐‘’