MAT 243 Final Exam SOLUTIONS, FORM A 1. [10 points] Michael Cow, a recent graduate of Arizona State, wants to put a path in his front yard. He sets this up as a tiling problem of a 2 n rectangle, where the tiles are 2 1 rectangles, which come in two colors (maroon and gold). Let T n be the number of tilings such that there are no vertically-oriented maroon tiles. Find (but do not solve) a recurrence for T n. Solution: During Fall 2014, I put a problem similar to this on Test 1 (where you had to find a recurrence relation), and I will not put one on the Final Exam. If you want to work on it, though, you should end up with the recurrence T n = T n 1 + 4 T n 2, n 3 T 1 = 1 T 2 = 5 For the rest of the problems, I WILL explain the solutions, though! 2. [10 points] Solve the linear homogeneous constant coefficient recurrence relation below. a n 6a n 1 + 9a n 2 = 0 a 0 = 2 a 1 = 12 Solution: Letting a n = r n, we obtain the following characteristic (auxiliary) equation: r 2 6r + 9 = 0 (r 3)(r 3) = 0 which has 3 as a solution with multiplicity 2. Hence, the general form for a n is a n = C 1 3 n + C 2 n 3 n. Substituting n = 0 and n = 1 gives conditions that are necessary for C 1 and C 2 : n = 0 : 2 = C 1 1 + C 2 0 1 = C 1 n = 1 : 12 = C 1 3 + C 2 1 3 = 6 + 3 C 2 so C 1 = 2 and C 2 = 2. Thus, a n = 2 3 n + 2 n 3 n. 2
MAT 243 Final Exam SOLUTIONS, FORM A 3. Recall that a standard deck of playing card consists of four suits (,,, ) and thirteen ranks (or kinds ) (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K), and that every card has one rank and one suit. The game of Rekop is played with a standard deck of playing cards, where each player receives four cards. The order that the cards are received does not matter. a. [5 points] How many hands are possible? Solution: Here, you are asked to choose r = 4 cards from a set of n = 52. The order of the cards does not matter, and you are not allowed to choose the same card more than once. Hence the number of hands is C(52, 4) = 270,725. b. [5 points] How many hands consist of two pairs (two cards of one rank, and two cards of another rank, such as 3 3 5 5 )? Solution: One of these two pairs hands is determined uniquely once you choose: (a) the ranks of the pairs, (b) the suits of the higher pair, and (c) the suits of the lower pair. (The example hand will be a result of the answers {3, 5}, {, }, and {, }, in that order. Note that you cannot choose the ranks one at a time; in that case, the example hand could be obtained with the answers 3, 5, {, }, and {, }, as well as the answers 5, 3, {, }, and {, }.) In choosing the ranks, you are choosing r = 2 ranks from n = 13 possibilities. The order does not matter (otherwise, you would be overcounting), and repetition is not allowed, so the number of ways to answer (a) is C(13, 2). The number of ways to answer (b) and (c) is C(4, 2), because the order of the suits does not matter, and repetition is not allowed. The total number of two pairs hands is thus C(13, 2) C(4, 2) C(4, 2) = 2808, by the multiplication principle. c. [5 points] How many hands consist of three of a kind (three cards of one rank and one of another rank, such as 8 8 8 A )? Solution: The sequence of decisions to be made to obtain a specific three of a kind is: (a) the rank of the three-of-a-kind, (b) the rank of the fourth card, (c) the suits of the three-of-a-kind, and (d) the suit of the fourth card. (The sample hand is a result of the answers 8, A, {,, } and.) The number of ways to answer (a) is 13, the number of ways to answer (b) is 12, the number of ways to answer (c) is C(4, 3), and the number of ways to answer (d) is 4 (which is also C(4, 1)). By the multiplication principle, the total number of three of a kind hands is 13 12 C(4, 3) 4 = 2496. 4. [10 points] Find the coefficient of x 7 in (2x 5) 70. Solution: According to the Binomial Theorem, 70 70 (2x 5) 70 = C(70, k) (2x) k ( 5) 70 k = [C(70, k) 2 k ( 5) 70 k ] x k. k=0 We want the term with x 7, which occurs when k = 7. The coefficient of x 7 is the value of the expression inside brackets when k = 7, which is C(70, 7) 2 7 ( 5) 63 (which is exactly 16,636,341,193,532,189,208,781,346,678,733,825,683,593,750,000,000,000,000, in case you re interested.) k=0 3
MAT 243 Final Exam SOLUTIONS, FORM A 5. Let R = {(1, 2), (1, 3), (2, 1), (2, 2), (3, 4), (4, 4)}. a. [10 points] Calculate R R. Solution: (x, y) R R iff there is a z such that (x, z) R and (z, y) R. For each ordered pair (x, z) R below, the possible ordered pairs (z, y) R are listed right after it, and the resulting (x, y) R R is listed to the far right: Combining the ordered pairs at the far right, we get (1, 2) : (2, 1), (2, 2), so (1, 1), (1, 2) R R (1, 3) : (3, 4) (1, 4) R R (2, 1) : (1, 2), (1, 3) (2, 2), (2, 3) R R (2, 2) : (2, 1), (2, 2) (2, 1), (2, 2) R (3, 4) : (4, 4) (3, 4) R R (4, 4) : (4, 4) (4, 4) R R R R = {(1, 1), (1, 2), (1, 4), (2, 1), (2, 2), (2, 3), (3, 4), (4, 4)}. b. [10 points] Which ordered pairs must be added to R so that the resulting relation is symmetric? Solution: In order for a relation R to be symmetric, you must have (y, x) R whenever (x, y) R. Given the ordered pairs already in R, that means you must also have the ordered pairs (2, 1), (3, 1), (1, 2), (2, 2), (4, 3), and (4, 4). The ordered pairs that need to be added are the ones not already in R, namely (3, 1), (4, 3). The resulting relation is symmetric, so we are done. (See Form B, though!) c. [10 points] Which ordered pairs must be REMOVED from R so that the resulting relation is irreflexive? Solution: A relation being irreflexive means (a, a) R for any a; thus, any such ordered pairs need to be removed. In this case, these are the ordered pairs (2, 2) and (4, 4). The resulting relation is irreflexive, so the answer is (2, 2), (4, 4). 4
MAT 243 Final Exam SOLUTIONS, FORM A 6. [10 points] Let D 70 = {1, 2, 5, 7, 10, 14, 35, 70} be the set of positive divisors of 70, and suppose that S is a subset of D 70. Prove that if S has at least five elements, then there are two elements of S whose product is 70. Solution: Set up four boxes in the following way: One box can have only 1 and 70 put into it; Another box can have only 2 and 35 put into it; Another box can have only 5 and 14 put into it; The final box can have only 7 and 10 put into it. Now choose a set S with five elements, where each element is an element of D 70. Distribute the elements of S among the boxes. The Pigeonhole Principle implies that some box has at least = 2 5 4 numbers in it. These two numbers are elements of S, and their product is 70, by how the boxes were set up. Thus, the assertion has been proven. 7. [15 points] Use inclusion-exclusion to count how many functions from S = {a, b, c, d} to T = {1, 2, 3} which are NOT onto. Do this by letting F i be the set of functions f from S to T such that f(x) i for all x S and finding F 1 F 2 F 3. You will also need the following information: The number of functions from A to B is B A (So, for example, the number of functions from S to T is 3 5 = 243.) Solution: This is one of those problems that you reason your way through, one step at a time. First of all, you are asked to find F 1 F 2 F 3. Inclusion-Exclusion implies that F 1 F 2 F 3 = F 1 + F 2 + F 3 F 1 F 2 F 1 F 3 F 2 F 3 + F 1 F 2 F 3. There are seven things to calculate here, so we look at them one at a time. First of all, the sets F i all contain functions. That means if you choose an element f T i, then f is an assignment of one of the numbers 1, 2, or 3 to each element of S. For instance, a single function can be represented by the four equations f(a) = 1; f(b) = 2; f(c) = 1; f(d) = 2. This function happens not to be in F 1, because f(a) = 1. It is not in F 2, either, because f(b) = 2. However, it IS in F 3, because none of f(a), f(b), f(c), f(d) equals 3. Now, F 1 is the set of all functions f from S to {1, 2, 3} such that f(x) 1 for any x S. This means f is really a function from S to {2, 3}. The fact presented above allows us to calculate F 1 ; it is just {2, 3} S = 2 4 = 16. Similarly, F 2 is the set of all functions from S to {1, 3}; it also has size 2 4 = 16. Lastly F 3 is the set of all functions from S to {1, 2}, and the number of such functions is 2 4 = 16 as well. So far, so good. Now for F 1 F 2 ; what does this mean? This is the set of all functions where f(x) 1 and f(x) 2. That just means you MUST assign 3 to every element of S! Thus, F 1 F 2 consists of just one function f, namely the one which has the following properties: f(a) = 3; f(b) = 3; f(c) = 3; f(d) = 3. Thus, F 1 F 2 = 1. (You can also use the formula that was supplied to obtain this number.) Now, F 1 F 3 = 1 as well, because (following the reasoning above), there is only one element f in F 1 F 3, the function that assigns 2 to every element of S. Similarly, F 2 F 3 = 1. Now for the final lap: What is F 1 F 2 F 3? Well, an element of this set is a function f which assigns one of 1, 2, or 3 to each element of S, except that f(x) 1, f(x) 2, and f(x) 3. Is this possible? No! So F 1 F 2 F 3 is empty, and F 1 F 2 F 3 = 0. Now you have enough data to finish the problem: F 1 F 2 F 3 = 16 + 16 + 16 1 1 1 + 0 = 45. 5
MAT 243 Final Exam SOLUTIONS, FORM 1 1. [10 points] Michael Cow, a recent graduate of Arizona State, wants to put a path in his front yard. He sets this up as a tiling problem of a 2 n rectangle, where the tiles are 2 1 rectangles, which come in two colors (maroon and gold). Let T n be the number of tilings such that there are no horizonally-oriented maroon tiles. Find (but do not solve) a recurrence for T n. Solution: During Fall 2014, I put a problem similar to this on Test 1 (where you had to find a recurrence relation), and I will not put one on the Final Exam. If you want to work on it, though, you should end up with the recurrence T n = 2 T n 1 + T n 2, n 3 T 1 = 2 T 2 = 5 For the rest of the problems, I WILL explain the solutions, though! 2. [10 points] Solve the linear homogeneous constant coefficient recurrence relation below. a n 8a n 1 + 16a n 2 = 0 a 0 = 1 a 1 = 8 Solution: Letting a n = r n, we obtain the following characteristic (auxiliary) equation: r 2 8r + 16 = 0 (r 4)(r 4) = 0 which has 4 as a solution with multiplicity 2. Hence, the general form for a n is a n = C 1 4 n + C 2 n 4 n. Substituting n = 0 and n = 1 gives conditions that are necessary for C 1 and C 2 : n = 0 : 1 = C 1 1 + C 2 0 1 = C 1 n = 1 : 8 = C 1 4 + C 2 1 4 = 4 + 4 C 2 so C 1 = 1 and C 2 = 3. Thus, a n = 1 4 n + 3 n 4 n. 2
MAT 243 Final Exam SOLUTIONS, FORM 1 3. Recall that a standard deck of playing card consists of four suits (,,, ) and thirteen ranks (or kinds ) (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K), and that every card has one rank and one suit. The game of Rekop is played with a standard deck of playing cards, where each player receives six cards. The order that the cards are received does not matter. a. [5 points] How many hands are possible? Solution: Here, you are asked to choose r = 6 cards from a set of n = 52. The order of the cards does not matter, and you are not allowed to choose the same card more than once. Hence the number of hands is C(52, 6) = 20,358,520. b. [5 points] How many hands consist of three pairs (two cards of one rank, two cards of another rank, and two cards of yet another rank, such as 3 3 5 5 10 10 )? Solution: One of these three pairs hands is determined uniquely once you choose: (a) the ranks of the pairs, (b) the suits of the higher pair, (c) the suits of the middle pair, and (d) the suits of the lower pair. (The example hand will be a result of the answers {3, 5, 10}, {, }, {, }, and {, }, in that order. Note that you cannot choose the ranks one at a time; in that case, the example hand could be obtained with the answers 3, 5, 10, {, }, {, }, and {, }, as well as the answers 5, 3, 10, {, }, {, }, and {, }.) In choosing the ranks, you are choosing r = 3 ranks from n = 13 possibilities. The order does not matter (otherwise, you would be overcounting), and repetition is not allowed, so the number of ways to answer (a) is C(13, 3). The number of ways to answer (b), (c), and (d) is C(4, 2), because the order of the suits does not matter, and repetition is not allowed. The total number of two pairs hands is thus C(13, 3) C(4, 2) C(4, 2) C(4, 2) = 61,776, by the multiplication principle. c. [5 points] How many hands consist of four of a kind (four cards of one rank and two of other ranks, such as 8 8 8 8 A K )? Solution: The sequence of decisions to be made to obtain a specific four of a kind is: (a) the rank of the four-of-a-kind, (b) the ranks of the remaining cards, (c) the suits of the four-of-a-kind, (d) the suit of the higher card which is not a four-of-a-kind, and (e) the suit of the lower card which is not a four-of-a-kind. (The sample hand is a result of the answers 8, {A, K}, {,,, },, and.) The number of ways to answer (a) is 13, the number of ways to answer (b) is C(12, 2), the number of ways to answer (c) is C(4, 4) (which is just 1), and the number of ways to answer (d) and (e) is 4 (which is also C(4, 1)). By the multiplication principle, the total number of four of a kind hands is 13 C(12, 3) 1 4 4 = 13,728. 4. [10 points] Find the coefficient of x 6 in (3x 4) 60. Solution: According to the Binomial Theorem, 60 60 (3x 4) 60 = C(60, k) (3x) k ( 4) 60 k = [C(60, k) 3 k ( 4) 60 k ] x k. k=0 We want the term with x 6, which occurs when k = 6. The coefficient of x 6 is the value of the expression inside brackets when k = 6, which is C(60, 6) 3 6 ( 4) 54 (which is exactly in case you re interested.) k=0 11,843,808,898,125,555,369,579,096,388,397,076,987,248,640, 3
MAT 243 Final Exam SOLUTIONS, FORM 1 5. Let R = {(1, 2), (2, 2), (2, 3), (2, 4), (3, 2)}. a. [10 points] Calculate R R. Solution: (x, y) R R iff there is a z such that (x, z) R and (z, y) R. For each ordered pair (x, z) R below, the possible ordered pairs (z, y) R are listed right after it, and the resulting (x, y) R R is listed to the far right: (1, 2) : (2, 2), (2, 3), (2, 4), so (1, 2), (1, 3), (1, 4) R R (2, 2) : (2, 2), (2, 3), (2, 4) (2, 2), (2, 3), (2, 4) R R (2, 3) : (3, 2) (2, 2) R R (2, 4) : (none) Combining the ordered pairs at the far right, we get (3, 2) : (2, 2), (2, 3), (2, 4) (3, 2), (3, 3), (3, 4) R R R R = {(1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)}. b. [10 points] Which ordered pairs must be added to R so that the resulting relation is transitive? Solution: In order for a relation R to be transitive, you must have (x, z) R whenever (x, y) R and (y, z) R. In other words, the elements of R R not already in R need to be added to R. This means (1, 3), (1, 4), (3, 3), and (3, 4) need to be added to R. BUT... and this is a big but... adding these elements will NOT NECESSARILY make the new relation transitive! In this case, if you look at all possible combinations, you see that adding these four ordered pairs will make a transitive relation, so the answer is (1, 3), (1, 4), (3, 3), (3, 4), but there are cases where the new relation will not be transitive. For example, if we had R = {(a, b), (b, c), (c, d)}, the first paragraph would tell us to add the ordered pairs (a, c) and (b, d) to get S = {(a, b), (a, c), (b, c), (b, d), (c, d)}. However, S is not transititive: (a, b) S and (b, d) S, but (a, d) S. So (a, d) would also have to be added to S to get T, and T turns out to be transitive. c. [10 points] Which ordered pairs must be REMOVED from R so that the resulting relation is antisymmetric? Solution: A relation being irreflexive means: You can only have (a, b) R and (b, a) R only if a = b; if you can find a b such that (a, b), (b, a) R, then you must remove one (or both) of them to get an antisymmetric relation. In this case, the relation is already antisymmetric, so the answer is none. (If antisymmetric was changed to asymmetric, you would have to remove any ordered pairs (a, a) which are in R, though. Hence, you would have to remove (2, 2) and only that ordered pair to get an asymmetric relation.) 4
MAT 243 Final Exam SOLUTIONS, FORM 1 6. [10 points] Let D 42 = {1, 2, 3, 6, 7, 14, 21, 42} be the set of positive divisors of 70, and suppose that S is a subset of D 42. Prove that if S has at least five elements, then there are two elements of S whose product is 42. Solution: Set up four boxes in the following way: One box can have only 1 and 42 put into it; Another box can have only 2 and 21 put into it; Another box can have only 3 and 14 put into it; The final box can have only 6 and 7 put into it. Now choose a set S with five elements, where each element is an element of D 42. Distribute the elements of S among the boxes. The Pigeonhole Principle implies that some box has at least = 2 5 4 numbers in it. These two numbers are elements of S, and their product is 42, by how the boxes were set up. Thus, the assertion has been proven. 7. [15 points] Use inclusion-exclusion to count how many functions from S = {a, b, c, d, e} to T = {1, 2, 3} which are NOT onto. Do this by letting F i be the set of functions f from S to T such that f(x) i for all x S and finding F 1 F 2 F 3. You will also need the following information: The number of functions from A to B is B A (So, for example, the number of functions from S to T is 3 5 = 243.) Solution: This is one of those problems that you reason your way through, one step at a time. First of all, you are asked to find F 1 F 2 F 3. Inclusion-Exclusion implies that F 1 F 2 F 3 = F 1 + F 2 + F 3 F 1 F 2 F 1 F 3 F 2 F 3 + F 1 F 2 F 3. There are seven things to calculate here, so we look at them one at a time. First of all, the sets F i all contain functions. That means if you choose an element f T i, then f is an assignment of one of the numbers 1, 2, or 3 to each element of S. For instance, a single function can be represented by the five equations f(a) = 1; f(b) = 2; f(c) = 1; f(d) = 2; f(e) = 2. This function happens not to be in F 1, because f(a) = 1. It is not in F 2, either, because f(b) = 2. However, it IS in F 3, because none of f(a), f(b), f(c), f(d), f(e) equals 3. Now, F 1 is the set of all functions f from S to {1, 2, 3} such that f(x) 1 for any x S. This means f is really a function from S to {2, 3}. The fact presented above allows us to calculate F 1 ; it is just {2, 3} S = 2 5 = 32. Similarly, F 2 is the set of all functions from S to {1, 3}; it also has size 2 5 = 32. Lastly F 3 is the set of all functions from S to {1, 2}, and the number of such functions is 2 5 = 32 as well. So far, so good. Now for F 1 F 2 ; what does this mean? This is the set of all functions where f(x) 1 and f(x) 2. That just means you MUST assign 3 to every element of S! Thus, F 1 F 2 consists of just one function f, namely the one which has the following properties: f(a) = 3; f(b) = 3; f(c) = 3; f(d) = 3; f(e) = 3. Thus, F 1 F 2 = 1. (You can also use the formula that was supplied to obtain this number.) Now, F 1 F 3 = 1 as well, because (following the reasoning above), there is only one element f in F 1 F 3, the function that assigns 2 to every element of S. Similarly, F 2 F 3 = 1. Now for the final lap: What is F 1 F 2 F 3? Well, an element of this set is a function f which assigns one of 1, 2, or 3 to each element of S, except that f(x) 1, f(x) 2, and f(x) 3. Is this possible? No! So F 1 F 2 F 3 is empty, and F 1 F 2 F 3 = 0. Now you have enough data to finish the problem: F 1 F 2 F 3 = 32 + 32 + 32 1 1 1 + 0 = 93. 5