1 / 86

Elementary Counting Technique s & Combinatorics

Elementary Counting Technique s & Combinatorics. Jim Skon. Consider:. How many license plates are possible with 3 letters followed by 3 digits? How many license plates are possible with 3 letters followed by 3 digits if no letter repeated?

sauda
Télécharger la présentation

Elementary Counting Technique s & Combinatorics

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. Elementary Counting Techniques & Combinatorics Jim Skon

  2. Consider: • How many license plates are possible with 3 letters followed by 3 digits? • How many license plates are possible with 3 letters followed by 3 digits if no letter repeated? • How many different ways can we chose from 4 colors and paint 6 rooms?

  3. Consider • How many different orders may 9 people be arranged in a line? • How many ways can I return your quizzes so that no one gets their own? • How many distinct function exist between two given finite sets A and B?

  4. Combinatorics • the branch of discrete mathematics concerned with determining the size of finite sets without actually enumerating each element.

  5. Combinatorics • The Sum Rule (task formulation): • Suppose that a task can be completed by performing exactly one task from a collection of disjoint subtasks: subtask1, subtask2, ... , subtaskn; • Now suppose each subtask has a choice of ways to perform it, e.g. • subtask1 can be performed t1 ways, • subtask2 can be performed t2 ways, • ... • subtaskn can be performed tn ways. • Then number the number of ways to perform the task is: t1 + t2 + ... + tn

  6. The Sum Rule • Example: • You have five novels, four magazines, and three devotional books. How many options do you have for taking one for your wait in the bank line? • You have 3 subtasks - pick a novel, pick a magazine, or pick a devotional book. The first can be done 5 ways, the second, 4 ways, and the third 3 ways. Thus: 5 + 4 + 3 = 12 ways to perform.

  7. The Sum Rule • Example: • Suppose either a CS faculty or a CS student must be chosen for a committee, and there are 4 CS faculty and 16 CS students. How many possible choices are there?

  8. The Sum Rule • Example: • Suppose a student can meet the humanities course requirement by taking either a religion, literature, or art course. There are 3 religion, 4 literature, or 4 art courses to chose from. How many possible choices are there?

  9. Combinatorics • The Product Rule (task formulation): • Suppose a task needs to be done, and the tasks consists of a sequence of n steps or subtasks: task = task1, task2, task3, ..., tasknwhere each task taskx has a certain number of ways (tx) in which it can be performed after the preceding tasks have been performed, e.g. • task1 = t1 ways, • task2 = t2 ways after task1 is complete, • task3 = t3 ways after task1 and task2 is complete, ... , • taskn = tn ways after task1 ... taskn-1 is complete Then the number of ways the task can be performed is: t1× t2× t3× ... × tn

  10. Example - Product Rule • How many different ways can we chose from 4 colors and paint 3 rooms? • Tasks: • 1 - paint room 1 - 4 ways to perform (4 colors) • 2 - paint room 2 - 4 ways to perform (4 colors) • 3 - paint room 3 - 4 ways to perform (4 colors) • Thus t1 = 4, t2 = 4, t3 = 4, and 4 × 4 × 4 = 64 ways to paint the rooms

  11. Example - Product Rule • How many different ways can we chose from 4 colors and paint 3 rooms, if no room is to be the same color? • tasks: • 1 - paint room 1 - 4 ways to perform (4 colors) • 2 - paint room 2 - 3 ways to perform (3 colors left) • 3 - paint room 3 - 2 ways to perform (2 colors left) • Thus t1 = 4, t2 = 3, t3 = 2, and 4 × 3 × 2 = 24 ways to paint the rooms

  12. Example - Product Rule • How many different orders may 9 people be arranged in? • There are nine tasks - picking the first person, picking the second, … • The first task has 9 choices, the second 8, ... and finally the ninth task has 1 choice: 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 362880

  13. Example - Product Rule • How many different 3 people can be selected from a group of 8 people to a president, vice-president, treasure of the group?

  14. Example - Product Rule • If student ID’s are two capital letters followed by three numeric digits, then how many ID’s are possible? • What if the two letters must be distinct? • What if the letters and the numbers must all be distinct?

  15. Combinatorics • The Product Rule (set formulation): • If A and B are finite sets, then: |A ´ B| = |A| × |B| • The cardinality of the Cartesian product of two sets is the product of the their cardinalities. • Note that ANY ordered list of items is trivially equivalent to a Cartesian product.

  16. Example - Product Rule Let A = {a, b, c, d, e}, B = {1, 3, 5, 7} • How many pairs (x, y) exist where xÎ A and yÎ B? • A ´ B has cardinality |A| × |B| = 5 × 4 = 20

  17. Example - Product Rule • How many license plates are possible with 3 letters followed by 3 digits? 26×26×26×10×10×10 = 17576000

  18. Combinatorics • The Sum Rule (set formulation): If A and B are disjoint finite sets, then: |A È B| = |A| + |B|The cardinality of the union of two disjoint sets is the sum of their cardinalities.

  19. Example - The Sum Rule Let A = {a, b, c, d, e}, B = {1, 3, 5, 7} • How many ways can one element be chosen? |A È B| = |A| + |B| = 5 + 4 = 9.

  20. Example - The Sum Rule • You have five novels, four magazines, and three devotional books. • How many options do you have for taking one for your wait in the bank line?

  21. Example • Suppose that you own 3 pairs of shoes, 6 pairs of socks, 4 pairs of pants, and 6 shirts. • How many different outfits can you make out of these articles of clothing? (An outfit consists of one pair of shoes, one pair of socks, one pair of pants, and one shirt.)

  22. Example • Consider the following road map. a) How many ways are there to travel from A to B, and back to A, without going through C? b) How many ways are there to go from A to C, stopping once at B? c) How many ways are there to go from A to C, making at most one intermediate stop? A B C

  23. Example • A certain apartment complex has 26 television antennas. Each pair of apartments shares a common antenna. How many apartments are there in the complex?

  24. Example • Two cards are drawn from a deck of cards, one at a time. How many outcomes are possible a) if the order in which the cards are draw matters? b) if the order in which the cards are drawn does not matter?

  25. Example • Suppose that you flip a coin 5 times and record the sequence of heads and tails. • How many possibilities are there for this sequence?

  26. Example • How many integers between 0 and 1,000,000 contain the digit 9? • (Hint, it is easier to count the number of integers that do not contain the digit 9.)

  27. 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.

  28. 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.

  29. 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.

  30. 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. • Proof: Suppose that none of the k boxes contains more then one object. Then the maximum number of objects would be k. This is a contradiction, since there is at least k + 1 objects.

  31. The Pigeonhole Principle • Among 367 people, there must be at least 2 with the same birthday, since there is only 366 possible birthdays. • In a collection of 10 numbers, at least 2 must have the same most significant digit. • In a collection of 11 numbers, at least 2 must have the same least significant digit.

  32. The Pigeonhole Principle • How many people must we have in the same room to be sure that at least two have the same birthday?

  33. The Pigeonhole Principle • Are there two people in Ohio with the same number of hairs? • Are there two people at MVNC the same birthday? • Are there two people at MVNC with birthdays on July 14?

  34. The Pigeonhole Principle • The Generalized Pigeonhole Principle: If N objects are placed into k boxes, then there is at least one box containing at least N/k objects.

  35. Generalized Pigeonhole Principle • If N objects are placed into k boxes, then there is at least one box containing at least N/k objects.

  36. Generalized Pigeonhole Principle • If N objects are placed into k boxes, then there is at least one box containing at least N/k objects.

  37. Generalized Pigeonhole Principle • If N objects are placed into k boxes, then there is at least one box containing at least N/k objects.

  38. Generalized Pigeonhole Principle • Proof: Suppose that none of the boxes contains more than N/k - 1 objects. Then the total number of objects is at most: k (N/k - 1). But since N/k < (N/k + 1), we get the following:k (N/k - 1) < k (((N/k + 1) - 1) = N, thusk (N/k - 1) < Nwhich is a contradiction since there is a total of N objects.

  39. Generalized Pigeonhole Principle • Among 100 people there are at least 100/12 = 9 people with the same birthday month.

  40. Generalized Pigeonhole Principle • In MVNC there are at least 1500/366 = 5 people with the same birthday.

  41. Generalized Pigeonhole Principle • In a class of 44 students, how many will receive the same grade on a scale {A, B, C, D, F}.

  42. Generalized Pigeonhole Principle • How many people must we survey, to be sure at least 50 have the same political party affiliation, if we use the three affiliations {Democrat, Republican, neither}? • (Make N/3 = 50)

  43. Generalized Pigeonhole Principle • What is the least number of area codes needed to guarantee that 25,000,000 phones in a state have distinct 10 digit numbers. (Assume that telephone numbers are of the form NXX-NXX-XXXX, where N is a a digit from 2-9, and X represents any digit.)

  44. Generalized Pigeonhole Principle • Let n be a positive integer. • Show that in any set of n consecutive integers there is exactly one divisible by n.

  45. Generalized Pigeonhole Principle • A computer network consists of 6 computers. • Each computer is is directly connected with zero or more of the other computers. • Show that there is at least two computers with the same numbers of connections.

  46. Generalized Pigeonhole Principle • Show that if seven integers are selected from the first eight positive integers, there must be pair of these integers with a sum equal to to 9. • Is this still true if four integers are chosen instead of five?

  47. Generalized Pigeonhole Principle • What is the minimum number of students MVNC must have to be assured that at least 40 come from the same state?

  48. Generalized Pigeonhole Principle • How many students must attend MVNC to assure use that at least two have the same 3 letter initials?

  49. Permutations and Combinations • Consider: How many ways can we choose r things from a collection of n things? pick Pick 4 from 9 colored balls

  50. Permutations and Combinations • Consider: How many ways can we choose r things from a collection of n things? • This statement is ambiguous in several ways: • Are the n things distinct or indistinguishable? • Do the selected items form a set (unordered collection) or a sequence (ordered)? • May the same item be selected from the r items more then once? (Are repetitions permitted?).

More Related