1 / 24

Counting Principle and Pigeon Hole Principle

Counting Principle and Pigeon Hole Principle. K.RAJAM ASSOCIATE PROFESSOR MATHEMATICS MSEC. Combinatorics. Combinatorics, study of arrangements of objects is an important part of Discrete Mathematics.

suet
Download Presentation

Counting Principle and Pigeon Hole Principle

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. Counting Principle and Pigeon Hole Principle K.RAJAM ASSOCIATE PROFESSOR MATHEMATICS MSEC

  2. Combinatorics • Combinatorics, study of arrangements of objects is an important part of Discrete Mathematics. • It deals with the art of counting and enumeration of specified objects, patterns and designs. • Techniques of counting are important in Mathematics and Computer Science. • Permutations and Combinations provide us with elegant methods of counting without actual counting.

  3. Basic Counting Principle What does it represent? Counting

  4. Basic Counting Principle There are two fundamental principle of counting • The Addition Rule (Sum Rule) • The Multiplication Rule (Product Rule)

  5. Basic Counting Principle The Sum Rule: If a task can be done either in one of n1 waysor in one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1+n2 ways.

  6. Basic Counting Principle The Product Rule: Suppose that a procedure can be broken down into a sequence of two tasks. If there aren1 ways to do the first task and for each of these ways of doing the first task, there are n2 ways to do the second task, then there are n1n2 ways to do the procedure.

  7. Examples Example:1 A new company with just 2 employees, Sankar and Patel rents a floor of a building with 12 offices. How many ways are there to assign different offices to 2 employees? Solution: Assuming an office to Sankar can be done in 12 ways. Assuming an office to Patel different from the office assigned to Sankar can be done in 11 ways. • By Product Rule • there are 12  11 = 132 ways

  8. Examples Example:2 A student can choose a computer project from one of the 3 lists. The 3 list contains 31, 24 and 37 projects. No projects is on more than one list. How many possible projects are there to choose from the 3 lists. Solution: Given 3 list contains 31, 24 and 37 projects and no project is on more than one list • By Sum Rule • there are 31+24+37 = 92 ways

  9. Examples Example:3 How many different license plates are there that containing exactly three English letters ? Solution: There are 26 possibilities to pick the first letter, then 26 possibilities for the second one, and 26 for the last one. So there are 262626 = 17576 different license plates.

  10. Examples Example:4 How many 1 – 1 function s are there from a set with m elements to a set with n elements? Solution: When m>n, there are no 1 – 1 functions from a set with m elements to a set with n elements Let us assume m ≤ n Suppose the element in the domain are a1,a2, … ,am There are n ways to choose the value of the function at a1 Since the function is 1 – 1, the value of the function at a2 can be picked in n – 1 ways. In general, value of the function at ak can be chosen in n – k+1 ways. • By Product Rule • there are n(n-1)(n-2) … (n-m+1) 1 – 1 functions from a set with m elements to a set with n elements

  11. Examples Example:5 What is the value of the ‘k’ after the following code has been executed k:=0 for i1:= 1 to n1 for i2:= 1 to n2 . . . . . . . . . for im:= 1 to nm k:=k+1 Answer: By the product rule, n1 . n2. n3. … nm

  12. Examples Example:6 What is the value of the ‘k’ after the following code has been executed k:=0 for i1:= 1 to n1 k:=k+1 for i2:= 1 to n2 k:=k+1 . . . . . . . . . for im:= 1 to nm k:=k+1 Answer: By the sum rule, n1 + n2+ n3 + … +nm

  13. The Pigeonhole Principle If n pigeons are accommodated in m pigeon holes and n >m, then at least one pigeon hole will contain two or more pigeons. (OR) If n objects are put in m boxes and n>m then atleast 1 box will contain 2 or more objects

  14. The Pigeonhole Principle • If k + 1 or more objects are placed in k boxes, then there is at least one box containing two or more objects.

  15. GeNERLaIZED Pigeonhole Principle If n pigeons are accommodated in m pigeon holes and n >m, then one of the pigeon holes must contain at least pigeons, where denotes the smallest integer ≥x

  16. GeNERLAIZED Pigeonhole Principle Example: 1 In any group of 367 or more people, at least 367/365= 2 of them must have been born on the same date. Example: 2 Among 100 people there are at least 100/12 = 9 people with the same birthday month. Example:3 In a class of 47 students, how many will receive the same grade on a scale {S,A, B, C, D, E}. Answer: 47/6 =8

  17. GeNERLAIZED Pigeonhole Principle Example: 4 Prove that in any group of 5 people, atleast 3 must be mutual friends or atleast 3 must be mutual strangers. Example: 5 If we select 10 points in the interior of an equilateral triangle of length 1. Prove that there must be atleast 2 points whose distance is less than 1/3.

  18. Principle of Inclusion-Exclusion (PIE) Theorem: Let A1,A2, …,An be finite sets, then |A1 A2 ...An|= i|Ai| - i<j|Ai  Aj| + i<j<k|Ai  Aj  Ak| - … +(-1)n+1 |A1A2...An| Each summation is over • all i, • pairs i,j with i<j, • triples with i<j<k, etc.

  19. PIE Theorem: Example • To illustrate, when n=2, we have |A1 A2| =|A1| + |A2| - |A1 A2| • To illustrate, when n=3, we have |A1 A2 A3|= |A1|+ |A2| +|A3| - [|A1A2|+|A1A3|+|A2A3|] +|A1  A2  A3|

  20. PIE Theorem: Example • To illustrate, when n=4, we have |A1A2A3A4|= |A1|+|A2|+|A3|+|A4| - [|A1A2|+|A1A3|+|A1A4| +|A2A3|+|A2A4|+|A3A4|] + [|A1A2A3|+|A1A2A4| +|A1A3A4|+|A2A3A4|] - |A1 A2 A3 A4|

  21. Application of PIE: • How many integers between 1 and 300 (inclusive) are • Divisible by at least one of 3,5,7? • Divisible by 3 and by 5 but not by 7? • Divisible by 5 but by neither 3 or 7? • Let A = {nZ | (1  n  300) (3|n)} B = {nZ | (1  n  300) (5|n)} C = {nZ | (1  n  300) (7|n)} • How big are these sets? We use the floor function |A| = 300/3 = 100 |B| = 300/5 = 60 |C| = 300/7 = 42

  22. Application of PIE: Example • How many integers between 1 and 300 (inclusive) are divisible by at least one of 3,5,7? Answer: |AB C| • By the principle of inclusion-exclusion |AB C|= |A|+|B|+|C|-[|AB|+|AC|+|BC|]+|ABC| • How big are these sets? We use the floor function |A| = 300/3 = 100 |AB| = 300/15 = 20 |B| = 300/5 = 60 |AC| = 300/21 = 100 |C| = 300/7 = 42 |BC| = 300/35 = 8 |ABC| = 300/105 = 2 • Therefore: |AB C| = 100 + 60 + 42 - (20+14+8) + 2 = 162

  23. Application of PIE: Example • How many integers between 1 and 300 (inclusive) are divisible by 3 and by 5 but not by 7? Answer: |(A  B)\C| • By the definition of set-minus |(A  B)\C| = |A  B| - |A  B  C| = 20 – 2 = 18 • Knowing that |A| = 300/3 = 100 |AB| = 300/15 = 20 |B| = 300/5 = 60 |AC| = 300/21 = 100 |C| = 300/7 = 42 |BC| = 300/35 = 8 |ABC| = 300/105 = 2

  24. Application of PIE: Example • How many integers between 1 and 300 (inclusive) are divisible by 5 but by neither 3 or 7? Answer: |B\(A C)| = |B| - |B  (A C)| • Distributing B over the intersection |B  (A  C)| = |(B  A)  (B  C)| = |B  A| + |B  C| - | (B  A) (B  C) | = |B  A| + |B  C| - | B  A C | = 20 + 8 – 2 = 26 • Knowing that |A| = 300/3 = 100 |AB| = 300/15 = 20 |B| = 300/5 = 60 |AC| = 300/21 = 100 |C| = 300/7 = 42 |BC| = 300/35 = 8 |ABC| = 300/105 = 2

More Related