18.314 Fall 2007 Problem Set 3. Due Tuesday, October 23. 1. Find the number of integers k in {1,...,1000} that are not divisible by 2, 3, or 5. 2. Prove the recurrence relation D(n) = (n-1) (D_{n-1} + D_{n-2}), where D(n) is the number of derangements of length n. (a) Prove this relation using the formula for D(n). (b) Give a combinatorial proof based on a bijection. 3. A fixed point in a permutation w_1 w_2 ... w_n in S_n is an index i such that w_i = i. Let F(n,k) be the number of permutations in S_n with exactly k fixed points. (a) Express the numbers F(n,k) in terms of the derangement numbers. (b) Which of the two numbers is bigger: the number of permutations in S_n without fixed points or the number of permutations in S_n with exactly 1 fixed point? 4. Calculate the expected value E = 1/n! \sum k F(n,k) (the sum over k=0,...,n) for the number of fixed points in a randomly chosen permutation. 5. Find an explicit formula for the sequence a(n) defined recursively by a(0) = 1, a(1) = 1 and a(n) = 7 a(n-1) - 12 a(n-2), for n >=2. 6. Find an explicit formula for the sequence b(n) defined recursively by b(0) = 0 and b(n) = n b(n-1) + n!, for n >=1. 7. One can write the sum 1^k + 2^k + ... + n^k as a linear combination A_1 C(n+1,2) + A_2 C(n+1,3) + ... + A_k C(n+1,k+1). (Here C(n,k) is "n choose k.") For example, 1 + 2 + ... + n = C(n+1,2) 1^2 + 2^2 + ... + n^2 = C(n+1,2) + 2 C(n+1,3) 1^3 + 2^3 + ....+ n^3 = C(n+1,2) + 6 C(n+1,3) + 6 C(n+1,4) (Check this!) Express the coefficients A_1, ..., A_k in terms of the Stirling numbers of the second kind. 8. There is an unlimited number of cereal boxes, each contains a coupon inside. There are n different types of coupons. All types of coupons are uniformly distributed, that is, the probability that a random cereal box contain a coupon of particular type equals 1/n. A man is trying to collect all n different types of coupons. Find the probability p(N,n) that that he needs to buy more than N cereal boxes to collect all n types of coupons. (Equivalently, p(N,n) is the probability that after the man buys N boxes he still does not have all types of coupons.) In other words, p(N,n) = (1/n)^N times the number of sequences (i_1,...,i_N) of integers in {1,...,n} such that at least one integer in {1,...,n} does not appear in (i_1,...,i_N). (Here the integer i_k represents the type of coupon in the k-th cereal box.) (a) Express the probability p(N,n) as a sum using the inclusion-exlusion principle. (b) Express the probability p(N,n) in terms of the Stirling numbers of the second kind. 9. (a) Find the number of ways to place 8 nonattacking rooks on the 8 x 8 chessboard with forbidden positions marked by X's below: _______________________________ | X | X | | | | | | | |___|___|___|___|___|___|___|___| | | X | X | | | | | | |___|___|___|___|___|___|___|___| | | | X | X | | | | | |___|___|___|___|___|___|___|___| | | | | X | X | | | | |___|___|___|___|___|___|___|___| | | | | | X | X | | | |___|___|___|___|___|___|___|___| | | | | | | X | X | | |___|___|___|___|___|___|___|___| | | | | | | | X | X | |___|___|___|___|___|___|___|___| | | | | | | | | X | |___|___|___|___|___|___|___|___| (b) Generalize part (a) to the n x n chessboard. Give a formula for the number of placements of n nonattacking rooks on the n x n chessboard with forbidden positions as above. 10. There are n couples (husbands and wives) at a party. Let G(n) be the number of ways in which these 2n people can sit at a round table so that no two men sit together, no two women sit together, and no person sits opposite to his/her spouse. Find a formula for the number G(n). (Your formula may involve a summation.) For example, for n=2, we have G(2) = 2*4 = 8: Mr Smith Mr Johnson ______ ______ / \ / \ | | | | Mrs Smith | TABLE | Mrs Johnson Mrs Smith | TABLE | Mrs Jonhson | | | | \______/ \______/ Mr Johnson Mr Smith times 4 cyclic rearrangements of the guests. 11. Let B be a subset of boxes in the m x n chessboard. Let C be complementary subset of boxes in the m x n chessboard. Let r_k(B) denote the number of ways to place k nonattacking rooks on some boxes in B. Show that r_k(C) = \sum (-1)^s C(m-s, k-s) C(n-s, k-s) (k-s)! r_s(B) where the sum is over s = 0,...,k. 12^*. Let F(n) be the number of permutations w_1 w_2 ... w_n in S_n without double descents, that is, there is no index 1 < i < n such that w_{i-1} > w_i > w_{i+1}. Prove the following formula for the exponential generating function: \sum F(n) x^n/n! = 1/ \sum (x^{3j}/(3j)! - x^{3j+1}/(3j+1)!), where the sums are over n >= 0 and j>=0.