Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 / 17
Table of contents 1 Basic counting principles 2 Pigeonhole Principle Tong-Viet (UKZN) MATH236 Semester 1, 2013 2 / 17
Basic counting principles Generalized Multiplication Principle Theorem (Multiplication Principle) Let S be a set of k-tuples (s 1, s 2,, s k ) of objects in which: the first object s 1 comes from a set of size n 1 for each choice of s 1, there are n 2 choices for object s 2 for each choice of s 2, there are n 3 choices for object s 3 for each choice of s 3, there are n 4 choices for object s 4 and, in general, for each choice of s i, 1 i k 1, there are n i+1 choices for object s i+1. Then the number of k-tuples in the set S is n 1 n 2 n k. Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 17
Basic counting principles The number of 4-digit odd numbers How many 4-digit odd numbers are there? Consider each number abcd as the tuple (a, b, c, d) such a number is odd if and only if d is odd, hence d {1, 3, 5, 7, 9} there are no other restriction on the remaining digits thus n 1 = 9 since a 0, the first digit is nonzero n 2 = n 3 = 10 and n 4 = 5 Then the number of 4-digit odd numbers is: 9 10 10 5 = 4500 Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 17
Basic counting principles The number of odd numbers less than 10, 000 How many odd numbers less than 10, 000 are there? We use Addition Principle and Multiplication Principle together For i {1, 2, 3, 4}, let N i be the set of all i-digit odd numbers We see that {N 1, N 2, N 3, N 4 } is a pairwise disjoint collection of sets By Addition Principle, the number of odd numbers less than 10, 000 is N 1 + N 2 + N 3 + N 4 Using the Multiplication Principle as in the previous example: n 1 = 5, n 2 = 9 5 = 45, n 3 = 9 10 5 = 450 and n 4 = 4500 Then the number of odd numbers less than 10, 000 is: 5 + 45 + 450 + 4500 = 5000 Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 17
Basic counting principles The number of k-tutples How many k-tuples can be chosen from a set of n elements if repetition is allowed? Consider the tuple (s 1, s 2,, s k ) in which each s i comes from a fixed set of n elements It is possible that s i = s j for some i j For each position in the k-tuple, we can choose any one of n different elements By the Multiplication Principle, there are n } n {{ n n} = n k such k-tuple k terms Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 17
Basic counting principles Power sets If S is a set, then we let 2 S denote the set of all subsets of S, which is also called the power set of S Let S = {1, 2, 3} 2 S = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 17
Basic counting principles Cardinality of Power sets Theorem Let S be a finite set. Then 2 S = 2 S. Proof. Let n = S and write S = {x 1, x 2,, x n }. For each subset A S, associate an n-tuple (a 1, a 2,, a n ), where for i {1, 2,, n} we set a i = 1 if x i A and a i = 0 if x i A Clearly, each subset corresponds to exactly one S -tuple and each S -tuple corresponds to one subset It follows that the number of subsets is equal to the number of such n-tuples Since each position a i can take a value from the set {0, 1} of size 2 There are exactly 2 n such n-tuples so that 2 S = 2 S as wanted. Tong-Viet (UKZN) MATH236 Semester 1, 2013 8 / 17
Pigeonhole Principle Pigeonhole Principle The Pigeonhole Principle in its simplest form states that: Theorem (Pigeonhole Principle) If n + 1 objects are placed into n boxes, then at least one box contains at least two objects. Proof. Suppose to the contrary that each box contains at most one object This implies that there are at most n objects This is a contradiction. Tong-Viet (UKZN) MATH236 Semester 1, 2013 9 / 17
Illustration Pigeonhole Principle Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 17
Pigeonhole Principle Pigeonhole Principle (cont.) Among 13 people, there are two who have their birthday in the same month There are 12 months, i.e., 12 boxes There are 13 = 12 + 1 objects (people) Place these people into boxes By Pigeonhole Principle, there are at least two persons in the same hole That is, two persons have their birthday in the same month Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 17
Pigeonhole Principle Pigeonhole Principle (cont.) Suppose we have n married couples. How many of the 2n people must be selected to guarantee that we have chosen at least one married couple? Construct n boxes, each box corresponds to one married couple When we choose someone, place that person into the box corresponding to the couple they are a member of The Pigeonhole Principle says that, once we ve chosen n + 1 people at least one box must contain 2 people, i.e., we ve chosen a married couple. Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 17
Pigeonhole Principle Pigeonhole Principle (cont.) We choose 101 of the integers 1, 2,, 200. Show that among the integers chosen, there are two having the property that one is divisible by the other. Proof. There are 100 odd integers in S := {1, 2,, 200} Every integer in S can be written in the form n 2 k, where n is an odd integer between 1 and 199 If we choose 101 numbers in S, then by the Pigeonhole Principle, two of the numbers we ve chosen are of the form n 2 k 1 and n 2 k 2 WLOG, assume k 1 k 2. Then n 2 k 2 divides n 2 k 1 Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 17
Pigeonhole Principle Pigeonhole Principle (cont.) Let S = {1, 2,, 8} be the set consisting of the first 8 positive integers. If 5 integers are selected from S, then at least one pair of the integers have a sum of 9. Proof. Let Y be the set consisting of pairs of integers that add up to 9 that is Y = {(1, 8), (2, 7), (3, 6), (4, 5)} Let X be any subset of S with X = 5 Place each element of X into a pair which it belongs to As there are 5 = 1 + 4 integers but there are only 4 pairs By Pigeonhole Principle, there are two integers which belong to the same pair, i.e., their sum must be 9 Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 17
Pigeonhole Principle Strong Pigeonhole Principle Theorem (Strong Pigeonhole Principle) Let n 1, n 2,, n k be positive integers. If n 1 + n 2 + + n k k + 1 objects are placed into k boxes, then there is an integer i {1, 2,, k} such that the ith box contains at least n i objects. Tong-Viet (UKZN) MATH236 Semester 1, 2013 15 / 17
Pigeonhole Principle Strong Pigeonhole Principle (cont.) Proof. Suppose that this is not the case. Then for each i {1, 2,, k}, the ith box contains at most n i 1 objects Thus the total number of objects is at most (n 1 1) + (n 2 1) + + (n k 1) = n 1 + n 2 + + n k k, which is a contradiction. Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 17
Pigeonhole Principle Strong Pigeonhole Principle (cont.) Suppose that we choose n 2 + 1 integers from the integers 1, 2,, n. Then at least one of the integers 1, 2,, n is chosen at least n + 1 times. Place n 2 + 1 integers into n boxes marked from 1 to n depending on its value Since n 2 + 1 = (n + 1) + (n + 1) + + (n + 1) n + 1, }{{} n terms the Strong Pigeonhole Principle implies that at least one box contains at least n + 1 objects that is, at least one of the integers 1, 2,, n is chosen at least n + 1 times Tong-Viet (UKZN) MATH236 Semester 1, 2013 17 / 17