Dscusson 11 Summary 11/20/2018 1 Quz 8 1. Prove for any sets A, B that A = A B ff B A. Soluton: There are two drectons we need to prove: (a) A = A B B A, (b) B A A = A B. (a) Frst, we prove A = A B B A. Let x B, then by the defnton of unon of sets, x A B. Then snce A B = A, we have x A. Therefore, B A. (b) Then, we prove B A A = A B. Let x A, then x A B, so A A B. Then let x A B, whch s equvalent to x A or x B. Then snce B A, t proves x A or x A, whch means x A. Therefore A B A. Combnng the conclusons above, we have A = A B. The arguments above prove A = A B B A. 2. Suppose that gcd(a, b) = 1 and p s prme. Prove that p 2 ab mples that p 2 a or p 2 b. Soluton: Snce gcd(a, b) = 1, accordng to the fact that gcd(a, b)lcm(a, b) = ab, we know lcm(a, b) = ab. Then snce every number can be wrtten as the product of a seres of prmes, we can rewrte a and b as followng and therefore Also, snce lcm(a, b) = k a = p a and b = ab = pmax(a,b) (p a+b )., we know p b, a + b = max(a, b ) for = 1, 2,..., k. 1
Now assume the power of p n a and b are a k and b k respectvely, we know a k + b k = max(a k, b k ). So ether a k = 0 or b k = 0. Also, snce p 2 ab, we know that a k + b k 2, and then { { a k = 0 a k 2 or b k 2 b k = 0. Therefore, ether p 2 b or p 2 a. 2 The Multplcaton Prncple 2.1 Smple Cases (two tasks) A procedure conssts of two ndependent tasks. Then the number of ways to perform ths procedure s n 1 n 2, where n 1 and n 2 are the number of ways to perform each task. Eg. 1. A new smartphone has 3 dfferent colors and 4 dfferent memory szes. How many possbltes for the combnatons of the color and the memory sze are there? Soluton: 3 4 = 12. 2.2 The General Multplcaton Prncple For a procedure conssts of m 2 ndependent tasks T 1, T 2,..., T m, the number of ways to perform the procedure s m =1 n = n 1 n 2... n m, where n s the number of ways to perform T, wth = 1, 2,..., m. Eg. 2. The automoble lcense plate of a certan state conssts of 3 numbers followed by 3 letters. How many dfferent lcense plates are avalable under ths system? Soluton: For the frst 3 dgts, each dgt has 10 optons. For the last 3 dgts, each dgt has 26 optons. } {{ } Numbers Therefore, the total number of possbltes s } {{ } Letters 10 10 10 26 26 26 = 10 3 26 3 = 17, 576, 000 2.3 Theorem 8.5 and 8.7 For the fnte nonempty sets A, B, A = m and B = n, the number of functons from A to B s n m. For the fnte nonempty sets A, B, A = m and B = n (m n), the number of one-to-one functons from A to B s n! (n m)!. 2
Eg. 3. Determne the number of possbltes for the followng problem: (a) 10 students take a course requrng 1 of 3 dfferent textbooks. Each student only bought one of the textbooks, then how many dfferent possbltes for the textbooks are there? (b) 3 students are to attend a meetng and there are 5 seats. How many dfferent possbltes for ther seatng are there? Soluton: The dfference for the two cases s that dfferent students can buy the same textbook, but they cannot take the same seat durng the meetng. Therefore, the frst stuaton s a general functon and the second s a one-toone functon. (a) The number of possbltes s 3 10 = 59049. (b) The number of possbltes s 5! 2! = 60. 3 The Addton Prncple 3.1 Smple Cases (two tasks) A procedure conssts of two tasks and s performed f ether of them s performed. The number of dfferent ways to perform the task s n 1 +n 2, where n 1 and n 2 are the number of ways to perform each task. Eg. 4. Determne the number of ways to travel from cty A to cty B under the followng crcumstances: 1. You can ether drve or fly to cty B from cty A. There are 3 dfferent flghts avalable and 2 dfferent paths for drvng. 2. You determne to take plane to cty B and there s no drect flght avalable so you need to connect at cty C. There are 3 dfferent flghts from A to C and 2 dfferent flghts from C to B. Soluton: In the frst stuaton, you only need to choose one of the travelng methods so the addton prncple apples to ths scenaro. In the second stuaton, you need to choose an opton for both of the ctes, so the multplcaton prncple apples to ths scenaro. (a) The number of combnatons s 3 + 2 = 5. (b) The number of possbltes s 3 2 = 6. 3.2 The General Addton Prncple For a procedure conssts of m 2 tasks T 1, T 2,..., T m, and no two can be performed at the same tme, the number of ways to perform the procedure s 3
m =1 n = n 1 + n 2 + + n m, where n s the number of ways to perform T wth = 1, 2,..., m. Eg. 5. How many dfferent 10-bt strngs begn wth 1011 or 0110? Soluton: Such a sequence can have the followng type: 1 0 1 1 or 0 1 1 0 For the frst type, there are 6 dgts to be flled and each has 2 optons, so the number of combnatons s 2 6 = 64. The second type s smlar to the frst type, wth 64 possble combnatons. Therefore, the total number of strngs s 64 + 64 = 128. 4 The prncple of Incluson-Excluson A procedure conssts of two tasks. n 1 s the number of ways to perform task 1, and n 2 s the number of ways to perform task 2. n 12 s the number of ways to perform both tasks smultaneously. The total number of ways to perform the procedure s For two fnte sets A and B, Partcularly f two sets are dsjont, n 1 + n 2 n 12. A B = A + B A B. A B = A + B. Eg. 6. There are two semnars last week and 55 Students went to the two semnars n total. We know 30 students went to the frst semnar and 34 students went to the second semnar. How many students went to both semnars? Soluton: Assume the number of students went to both semnars s n, then the number of students attended the semnars n total s 30 + 34 n = 55. We can solve n = 9. Therefore, 9 students went to both semnars. If A 1, A 2,..., A n are n 2 fnte sets, then A = A A A j + ( 1) n+1 1 n 1 n 1 <j n 1 n Eg. 7. Each of the four sets A 1, A 2, A 3 and A 4 contans four elements. The ntersecton of every of these sets (2 4) conssts of 5 elements. What s A 1 A 2 A 3 A 4? A 4
Soluton: Based on the formula above, A 1 A 2 A 3 A 4 = A 1 4 1 <j<k 4 1 <j 4 A A j + A A j A k A 1 A 2 A 3 A 4 = 4 4 6 (5 2) + 4 (5 3) (5 4) = 5 5 The pgeonhole Prncple If a set S wth n elements s dvded nto k parwse dsjont subsets S 1, S 2,..., S k, then at lease one of them has at least n/k A set S wth n elements s parttoned nto k parwse dsjont subsets S 1, S 2,..., S k, where S n for a postve nteger n for = 1, 2,..., k. Then each subset of S wth at least 1 + k (n 1) =1 elements contans at least n elements of S for some nteger wth 1 k. Eg. 8. How many people must be present to guarantee that (a) at least two have the same brthday? (b) at least two of ther brthdays are n the same month? (c) at least three of ther brthdays are n one of the months January, February, March, Aprl or at least four of ther brthdays are n one of the remanng months? Soluton: (a) There are 366 days n a year consderng the leap years. Assume there are n people, then accordng to the Pgeonhole Prncple, at least n/366 have the same brthday. n/366 = 2, so n > 366 and there must be at least 367 people. (b) Snce there are 12 months, smlar to the prevous queston, there must be at least 13 people. (c) Accordng to the Pgeonhole Prncple, the number of people should be at least (3 1) 4 + (4 1) 8 + 1 = 33. 5