Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
26) Let h n denote the number of such colorings, where h 0 = 1. Since this problem is a permutation problem (ordering matters here), we use the exponential generating function. We want to color a 1 × n chessboard using the colors red, blue, green and orange. Since even numbers of squares are to be colored red and also even numbers of squares are to be colored green, then their exponential generating function is 2 4 1+ x + x +⋯ 2! 4! Since there is no restriction how we suppose to use the colors blue and orange, then their generating function is 2 3 1+x+ x + x +⋯ 2! 3! Then the generating function for this problem is 2 2 4 2 3 1+ x + x +⋯ 1+x+ x + x +⋯ 2! 4! 2! 3! 2 = 1 e x + e −x e x 2 2 2 = 1 e 2x + 1 2 1 = e 4x + 2e 2x + 1 4 2 Ju A st L An of sw er g e = ∞ ∞ = 1 4 1+∑ = 1 4 n n+1 1+∑ 4 +2 n! n=0 ∞ 4nxn + 2 ∑ 2nxn n! n! n=0 xn n=0 ∞ n n+1 = 1 +∑ 4 +2 4n! 4 xn n=0 Hence h n for n ≥ 1 is given by the coefficent of x n multiply by n!, i.e. h n = 4 n +2 n+1 4 . 27) Let h n be the number of ways creating an n digit numbers with the requirements: all digits are odd, 1 and 3 each occur a nonzero, even number of times. This problem also a permutation problem, hence we use the exponential generating function. The set of odd digit numbers are 1, 3, 5, 7, 9. For each 1 and 3, we want them to appear nonzero, even number of times. Hence the exponential generating function for each of this number is x2 + x4 + ⋯ 2! 4! For the other numbers ( 5, 7 and 9 ) there is no restriction, hence the exponential generating function for each of them is 2 1+x+ x +⋯ 2! Now the exponential generating function for this problem is x2 + x4 + ⋯ 2 1 + x + x2 + ⋯ 2! 4! 2! 2 2 4 = 1 + x + x + ⋯ − 1 e x 3 2! 4! = 1 e x + e −x − 1 e 3x 2 1 = e 4x + 1 e 2x − e 3x 2 2 g e = ∞ = 1 2 n = ∑ n=0 Therefore h n = 4n 2 + 2n 2 ∑ n=0 4nxn + 1 n! 2 ∞ ∑ n=0 4n + 2n − 3n 2 2 3 ∞ 2nxn − ∑ 3nxn n! n! n=0 xn . n! − 3 n = 2 ⋅ 4 n−1 + 2 n−1 − 3 n . Ju A st L An of sw er 51) We want to solve reccurence relation h n = 3h n−1 − 4n, n ≥ 1 h0 = 2 Let gx = h 0 + h 1 x + h 2 x + ⋯ + h n x n + ⋯. Note that from the above we have 3h n−1 − h n = 4n. So now we want to create two series. In one series we want the coefficient of x n to be 3h n−1 − h n and on the other series coefficient of x n is 4n. To create the first series note that 2 3xgx = 3h 0 x + 3h 1 x 2 + 3h 2 x 3 + ⋯ + 3h n−1 x n + ⋯ Hence 3xgx − gx = −h 0 + 3h 0 − h 1 x + 3h 1 − h 2 x 2 + ⋯ + 3h n−1 − h n x n + ⋯ 3x − 1gx = −2 + 3h 0 − h 1 x + 3h 1 − h 2 x 2 + ⋯ + 3h n−1 − h n x n + ⋯ (since h 0 = 2 ) By the reccurence relation, this series equal to − 2 + 4x + 4 ⋅ 2x 2 + 4 ⋅ 3x 3 + ⋯ + 4nx n + ⋯ = −2 + 4x + 2x 2 + ⋯ + nx n + ⋯. Note that 1 1−x d 1 dx 1 − x 1 1 − x 2 x 1 − x 2 = 1 + x + x2 + x3 + ⋯ = 1 + 2x + 3x 2 + 4x 3 + ⋯ = 1 + 2x + 3x 2 + 4x 3 + ⋯ = x + 2x 2 + ⋯ + nx n + ⋯ Hence 4x + 4 ⋅ 2x 2 + 4 ⋅ 3x 3 + ⋯ + 4nx n + ⋯ = 4 Now since 3h n−1 − h n = 4n, then x − 1 x 2 3x − 1gx = −2 + 4x 1 − x 2 −21 − x 2 + 4x 1 − x 2 1 =− 2x 2 − 8x + 2 x − 1 2 3x − 1gx = Now 2x 2 − 8x + 2 1 − 3x1 − x 2 2 1 = − 1 + 2 x 3x − 1 −1 x − 1 gx = ∞ ∞ ∞ n=0 n=0 = 2 ∑n + 1x n + ∑ x n − ∑ 3 n x n n=0 ∞ ∑2n + 1 + 1 − 3 n x n Ju A st L An of sw er = n=0 ∞ = ∑2n + 3 − 3 n x n . n=0 Therefore h n = 2n + 3 − 3 n .