1 / 29

Main Menu (Click on the topics below)

Click on the picture. Main Menu (Click on the topics below). Pigeonhole Principle Example Example Example Example Example Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle. Pigeonhole Principle. Sanjay Jain, Lecturer, School of Computing.

purity
Download Presentation

Main Menu (Click on the topics below)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Click on the picture Main Menu (Click on the topics below) Pigeonhole Principle Example Example Example Example Example Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle

  2. Pigeonhole Principle Sanjay Jain, Lecturer, School of Computing

  3. If we place m balls in n boxes, m > n, then at least one box gets  2 balls. Another formulation: Consider a function f from A to B, where #(A) > #(B), and A, B are finite. Then f cannot be 1—1. Pigeonhole Principle

  4. END OF SEGMENT

  5. In a group of 13 people, there are at least 2 who are born in the same month. S = set of people (13 elements) M = months of the year (12 elements) f: S —> M f(x)= the month x was born. Since #(S) > #(M), by pigeonhole principle, f cannot be 1—1. That is, there exist x, y in S, x y, such that f(x)=f(y) In other words, x and y are born in the same month. Example

  6. END OF SEGMENT

  7. Let A={1,2,3,…,8} If we pick 5 integers from A, then there exist 2 integers among the selected integers, which add up to 9. Proof: A1={1,8}; A2={2,7}; A3={3,6}; A4={4,5} B: set of numbers picked. C={1,2,3,4} f: B --> C, if xB, is a member of Ai then f(x)=i. Since #(B) > #(C), by pigeonhole principle, f cannot be 1 —1. Thus, there exist a, b, in B such that f(a) = f(b). But then a+b = 9 Example

  8. END OF SEGMENT

  9. In a set of four numbers, two are same mod 3. Proof: A = Set of 4 numbers. B={0,1,2} f: A —> B where f(x)=x mod 3. Now #(A) > #(B). So f cannot be 1 —1. Thus, there exists distinct x, y in A, such that f(x) = f(y). In other words, x mod 3 = y mod 3. Example

  10. END OF SEGMENT

  11. There are 600 students. Each of them takes 3 compulsory modules, and 1 of 2 electives. In each module they can get a grade of A, B, C, or D. Show that there are 2 students with identical grade sheet. Example

  12. Proof: A= set of students (600) B= set of grade sheets. How many grade sheets are there? T1: select the elective. T2: select the grade for module 1 T3: select the grade for module 2 T4: select the grade for module 3 T5: select the grade for module 4 T1 can be done in two ways. Each of T2 to T5 can be done in four ways. Using multiplication rule, the number of elements of B = 2*4*4*4*4 = 512 Example

  13. A= set of students (600) B= set of grade sheets. (512) Example f: A —> B where f(x)=grade sheet of x. Since #(A) > #(B), f cannot be 1 — 1 Thus, there exist distinct x, y in A such that f(x) = f(y) In other words, x and y have the same grade sheets.

  14. END OF SEGMENT

  15. Example Suppose there are 19 people in a party. Suppose friendship relation is mutual. Show that there are 2 persons in the party with same number of friends

  16. Example A= set of people in the party. B={0,1,2…,18} f: A —> B where f(x) = number of friends of x #(A) = 19, #(B) = 19. We cannot apply pigeonhole principle yet. Note that, either for all x, f(x)0, or for all x, f(x)18 Why? Suppose for all x, f(x) 0 is false. Then there is an a such that f(a)=0. Thus a has no friends. Then, a is not a friend of anyone. Thus, for all x, f(x)18

  17. Example A= set of people in the party. B={0,1,2…,18} f: A —> B where f(x) = number of friends of x #(A) = 19, #(B) = 19. We cannot apply pigeonhole principle yet. Note that, either for all x, f(x)0, or for all x, f(x)18 Let B’=B - {w}, where w = 0 or 18, based on which of above cases holds. Note that #(B’)=18. Thus f: A—> B’ cannot be 1—1. Therefore, there exist distinct x and y in A, such that f(x)=f(y). In other words, there are two people in A, with the same number of friends.

  18. END OF SEGMENT

  19. Example Let X={1,2,….,2n} Let S be a subset of X containing n+1 elements. Then, there exist distinct x and y in S, such that x divides y.

  20. Example Suppose the elements of S are s1, s2, …,sn+1 Let si=2riwi, where wi is odd. Let B= set of odd numbers  2n. Note that #(B)=n Let f:S—> B where f(si)=wi Thus, f cannot be1— 1 (by PH principle) Thus, there exist distinct i and j, such that f(si)= f(sj) In other words, wi= wj. si=2riwi, sj=2rjwj Now if, ri>rj then, sj divides si otherwise, si divides sj.

  21. END OF SEGMENT

  22. w denotes the largest integer w. For example: 6.9 = 6; -9.2 = -10; 9 = 9 w denotes the smallest integer  w. For example: 6.9 =7; -9.2 = -9; 9 = 9 Floors and Ceilings

  23. END OF SEGMENT

  24. Generalized Pigeonhole Principle If I place m balls in n boxes, then at least one box will get  m/n balls. If I place m balls in n boxes, then at least one box will get  m/n balls. For any function f from a finite set X to a finite set Y, if #(X) > k* #(Y), then there exists a y in Y such that y is the image of at least k+1 distinct elements of X.

  25. END OF SEGMENT

  26. B1 B5 B2 B4 B3 Example Suppose I place 26 letters of English alphabet in a circle. Then there exists a consecutive sequence of 5 consonants. 21 consonants ---> balls. B1,…, B5 boxes. At least one box will get  21/5 =5 balls. Thus there are 5 consecutive consonants.

  27. END OF SEGMENT

  28. Proof of Pigeonhole Principle Recall the pigeonhole principle: For any function f from a finite set X to a finite set Y, if #(X) > #(Y), then f is not 1—1. Proof: Suppose f is 1—1. Let Y={y1, y2,…, ym} f -1(y)={x  X | f(x)=y} f -1(y1), f -1(y2), …,f -1(ym) are pairwise disjoint, whose union is X. Therefore by Addition Rule, #(X) = #(f -1(y1)) + #(f -1(y2)) + … + #(f -1(ym) )  1+ 1+……+1 = m #(X)  #(Y) a contradiction. Thus f is not 1—1.

  29. END OF SEGMENT

More Related