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
MATH 5705: HOMEWORK 1 SOLUTIONS Chapter 2 Problem 22. If there are no ties, the result amounts to a permutation of the runners, of which there are 4! = 24. If exactly two runners tie there are 42 = 6 choices of who tied. There are then 3! = 6 orders in which the three groups (two individuals plus one pair) could finish. This contributes (6)(6) = 36 possibilities by the multiplication principle. If there is a three way tie, there are 4 choices for the person who did not tie and 2 possible orders (either the triple finished tied for first or tied for second). This is (4)(2) = 8 more possibilities. If there are two different two-ways ties, there are 42 = 6 choices for the pair that finish tied for first. Lastly, a 4-way tie represents one more possibility. In total, there are 24 + 36 + 8 + 6 + 1 = 75 possible outcomes. Problem 28. (a) To get to work by walking only 17 blocks, he must go East or North each time, and there must be exactly 9 East blocks and 8 North blocks followed. The only choice is in which order to do these. The number of possibilities is 17 = 24310 9 as he must choose at which times from 1 to 17 he will take the 9 East blocks. (b) Call the starting point the origin (0, 0) and the ending point (9, 8). The block in question is the one from (4, 3) to (5, 3). A path from (0, 0) to (9, 8) including this block can be broken into three parts which can be chosen independently (1) a length 7 path from (0, 0) to (4, 3) (2) the block from (4, 3) to (5, 3) (3) a length 9 path from (5, 3) to (9, 8) There is no flexibility for the second part. By considerations as in part (a), there are 7 choices for the first part and 94 choices for the second. As such, there are 4 7 9 = 4410 4 4 paths that include the block in question. The number of paths that avoid it, then is 24310 − 4410 = 19900. = 38760 ways to choose 6 of the 20 sticks. Problem 39. (a) There are 20 6 1 2 MATH 5705: HOMEWORK 1 SOLUTIONS (b) Number the sticks from 1 to 20, and let {i1 , . . . i6 } be such a selection with i1 < i2 < . . . < i6 . Define j1 , j2 , . . . , j6 by j1 j2 j3 j4 j5 j6 = i1 = i2 − 1 = i3 − 2 = i4 − 3 = i5 − 4 = i6 − 5 The effect of this is each pair of consecutive j ′ s is 1 closer together than the corresponding i’s (e.g. j4 − j3 = (i4 − i3 ) − 1). Since each pair of i′ s is at least 2 apart, the j ′ s are distinct and also in increasing order. Lastly j1 = i1 ≥ 1 and j6 = i6 − 5 ≤ 20 − 5 = 15. So we have 1 ≤ j1 < j2 < . . . < j6 ≤ 15. Moreover, any sequence of j ′ s with these properties arises from a unique choice of the i′ s, namely i1 i2 i3 i4 i5 i6 = j1 = j2 + 1 = j3 + 2 = j4 + 3 = j5 + 4 = j6 + 5 So if suffices to count the number of possible j ′ s, that is, the number of 6 element 15 subsets of {1, 2, . . . 15}. The answer is 6 = 5005. (c) Let {i1 , . . . i6 } be such a selection with i1 < i2 < . . . < i6 . Define j1 , j2 , . . . , j6 by j1 j2 j3 j4 j5 j6 = i1 = i2 − 2 = i3 − 4 = i4 − 6 = i5 − 8 = i6 − 10 Similar to the proof in part (b), this defines a bijection between the collection in question and the set of 6 element subsets {j1 < j2 < . . . < j6 } of {1, 2, . . . , 20 − 10}. = 210. The number of such is 10 6 Problem 46. (a) Number the people from 1 to 2n. There are 2n − 1 possible matches for person 1. Of the 2n − 2 remaining people, consider the lowest numbered person. There are then 2n − 3 possible matches for him. Continue in this manner. Whenever 2k people remain, there are always 2k − 1 ways to choose the partner for the lowest numbered such person regardless of what pairings have already been made. By the multiplication principle there are (2n − 1)(2n − 3) · · · (5)(3)(1) possible ways to pair everyone up. MATH 5705: HOMEWORK 1 SOLUTIONS 3 (b) There are 2n + 1 ways to choose the person not talking to anyone. Once this is done, 2n people remain who can be paired up in the manner described in part (a). As such there are (2n + 1)(2n − 1)(2n − 3)(2n − 5) · · · (3)(1) ways to pair up all but one of the people. Problem 54. For each i = 1, 2, . . . , n, exactly one of the three following possibilities occurs: (1) i ∈ A and i ∈ B (2) i ∈ / A and i ∈ B (3) i is in neither A nor B Ordinarily there would be a fourth option, namely i ∈ A and i ∈ / B. However, this would contradict the assumption of the problem A ⊆ B. Suppose we independently decide which of the three should happen for each i from 1 to n. This can be done in 3n different ways. The claim is that any such choices are possible and uniquely determine both A and B. Indeed, A must consist of exactly those i for which option 1 occurs. Similarly, B must consist of precisely those i for which either option 1 or 2 occurs. Any i ∈ A will have come from case 1 meaning that i ∈ B, so A ⊆ B as required. As such the number of pairs A, B with the desired properties is indeed 3n . Problem 60. I assume we are choosing an order (e.g. 3 bagels of type 1, 0 bagels of type 2, . . . ) at random from the set of legal orders, rather than choosing each bagel randomly one at a time. A legal order consists of nonnegative integers m1 , m2 , . . . , m6 with m1 + m2 + . . . + m6 = 15, where mi represents the number of bagels of the ith type. We have seen that the total number of such is 20 15 + 6 − 1 = 15504 = 5 6−1 If an order contains at least one bagel of each kind, then the flexibility is in deciding what the other 15−6 = 9 bagels are. Put another way, we need to choose nonnegative integers m1 − 1, m2 − 1, . . . , m6 − 1 with sum 9. The number of ways to do this is 14 9+6−1 = 2002. = 5 6−1 There are 2002 outcomes with at least one bagel of each type out of 15504 total outcomes, so the probability of at least one bagel of each type is 2002 ∼ = 0.129 15504 Suppose that Sesame bagels are type 1. Then to get at least 3 sesame bagels we need a solution to m1 +m2 +. . .+m6 = 15 with m1 ≥ 3 and mi ≥ 0 for i = 2, 3, 4, 5, 6. Equivalently, we need a 6-tuple of nonnegative integers m1 − 3, m2 , m3 , . . . , m6 with sum 15 − 3 = 12. The number of such is 12 + 6 − 1 17 = = 6188. 6−1 5 4 MATH 5705: HOMEWORK 1 SOLUTIONS So, the probability that there are at least 3 sesame bagels is 91 ∼ 6188 = = .399. 15504 228 Problem 64. (a) The total nunber of outcomes equals the total number of nstrings over the n-element set {1, 2, . . . , n}. This number is nn by the multiplication principle. Suppose now that such a sequence contains exactly n − 2 distinct integers. Put another way, there are only 2 terms of the sequence that are repeats of earlier terms. If these 2 terms are the same as each other, then that integer appears 3 times and (n − 2) − 1 = n − 3 other integers appear once each. If these 2 terms are distinct, then those two integers each appear twice, and the other (n − 2) − 2 = n − 4 integers all appear once. These two cases do not overlap, so count them each separately and add. First, suppose that one integer appears three times. A sequence of this sort can be selected by making the following independent choices: n possibilities) (1) Choose the n − 2 integers that appear at least once ( n−2 (2) Choose the one of those integers that appears 3 times (n − 2 possibilities) (3) Choose which three of the n locations in the sequence will contain the ren peated number ( 3 possibilities) (4) Choose a full permuation of the remaining n − 3 integers to indicate in what order they fill the remaining spaces ((n − 3)! possilities) By the multiplication principle, there are n(n − 1) n(n − 1)(n − 2) n(n − 1)(n − 2) (n − 2) (n − 3)! = n! 2! 3! 12 such sequences. Now suppose two integers each appear twice. To obtain such a sequence: n possibilities) (1) Choose the n − 2 integers that appear at least once ( n−2 n−2 (2) Choose the two of those numbers that appear twice ( 2 possibilities) (3) Choose the two places for the lower of those numbers ( n2 possibilities) (4) Choose among the remaining places two for the larger of those numbers ( n−2 2 possibilities) (5) Choose a full permutation of the remaining n − 4 integers to indicate in what order they fill the remaining spaces ((n − 4)! possibilities) The number of ways to do all this is n(n − 1) (n − 2)(n − 3) n(n − 1) (n − 2)(n − 3) n(n − 1)(n − 2)(n − 3) (n− 4)! = n!. 2! 2! 2! 2! 16 MATH 5705: HOMEWORK 1 SOLUTIONS 5 The total number of sequences with exactly n − 2 different integers is n(n − 1)(n − 2)(n − 3) n(n − 1)(n − 2) n! + n! 12 16 n(n − 1)(n − 2) 1 n−3 = n! + 4 3 4 3n − 5 n(n − 1)(n − 2) n! = 4 12 n(n − 1)(n − 2)(3n − 5) = n! 48 The probability that a given sequence has exactly n − 2 different integers is obtained by dividing by nn . n(n − 1)(n − 2)(3n − 5)n! 48nn