1 / 28

(CSC 102)

(CSC 102). Discrete Structures. Lecture 27. Counting Rules and Probability. Previous Lecture. Counting Elements Difference Rule Inclusion/Exclusion Rule Pigeon Hole Principle Generalized Pigeon Hole Principle. Today’s Lecture. Counting Elements of Disjoint Sets

Download Presentation

(CSC 102)

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. (CSC 102) Discrete Structures Lecture 27

  2. Counting Rules and Probability

  3. Previous Lecture • Counting Elements • Difference Rule • Inclusion/Exclusion Rule • PigeonHolePrinciple • Generalized Pigeon Hole Principle

  4. Today’s Lecture • Counting Elements of Disjoint Sets • Counting the Number of Integers • Relation between Permutations and Combinations • Probability • Axioms of Probability • Expected Value

  5. Pigeon Hole Principle Selecting a Pair of Integers with a Certain Sum Let A = {1, 2, 3, 4, 5, 6, 7, 8}. a. If five integers are selected from A, must at least one pair of the integers have a sum of 9? b. If four integers are selected from A, must at least one pair of the integers have a sum of 9? Solution: a. Yes. Partition the set A into the following four disjoint subsets: {1, 8}, {2, 7}, {3, 6}, and {4, 5} Observe that each of the integers in A occurs in exactly one of the four subsets and that the sum of the integers in each subset is 9. Thus if five integers from A are chosen, then by the pigeonhole principle, two must be from the same subset. It follows that the sum of these two integers is 9.

  6. Cont… More formally, by the pigeonhole principle, since P is not one-to-one, there are integers aiand ajsuch that P(ai ) = P(aj ) and ai= aj . But then, by definition of P, aiand ajbelong to the same subset. Since the elements in each subset add up to 9, ai+ aj= 9.

  7. Cont… b. The answer is no. This is a case where the pigeonhole principle does not apply; the number of pigeons is not larger than the number of pigeonholes. For instance, if you select the numbers 1, 2, 3, and 4, then since the largest sum of any two of these numbers is 7, no two of them add up to 9. Generalized Pigeonhole Principle For any function ffrom a finite set Xwith nelements to a finite set Ywith melements and for any positive integer k, if k < n/m, then there is some y ∈ Y such that yis the image of at least k + 1 distinct elements of X.

  8. Applying the Generalized Pigeonhole Principle Show how the generalized pigeonhole principle implies that in a group of 85 people, at least 4 must have the same last initial. Solution: In this example the pigeons are the 85 people and the pigeonholes are the 26 possible last initials of their names. Note that 3 < 85/26 ≈ 3.27. Consider the function L from people to initials defined by the following arrow diagram

  9. Applying the Generalized Pigeonhole Principle Since 3 < 85/26, the generalized pigeonhole principle states that some initial must be the image of at least four (3 + 1) people. Thus at least four people have the same last initial.

  10. Counting Elements of Disjoint Sets

  11. Example

  12. Counting the Number of Integers There are two distinct methods that can be used to select r objects from a set of n elements. In an ordered selection, it is not only what elements are chosen but also the order in which they are chosen that matters. An ordered selection of r elements from a set of n elements is an r-permutation of the set. In an unordered selection, on the other hand, it is only the identity of the chosen elements that matters. An unordered selection of r elements from a set of n elements is the same as a subset of size r or an r-combination of the set.

  13. Cont… Unordered Selections How many unordered selections of two elements can be made from the set {0,1,2,3}? Solution: An unordered selection of two elements from {0,1,2,3} is the same as a 2-combination, or subset of size 2, taken from the set. These can be listed systematically:

  14. Relation of P(n , r) and Solution The number of 2-permutations of the set {0,1,2,3} is P(4,2), which equal 12. Now the act of constructing a 2-permutation of {0,1,2,3} can be thought of as a two-step process: Step 1: Choose a subset of two elements from {0,1,2,3}. Step 2: Choose an ordering for the two-element subset.

  15. Relations

  16. C( n , r)

  17. Example

  18. Cont…

  19. Cont…

  20. Probability

  21. Example 1. A typical PIN (personal identification number) is a sequence of any four symbols chosen from the 26 letters in the alphabet and the ten digits, with repetition allowed. If all PINs are equally likely, what is the probability that a PIN chosen at random contains no repeated symbol? Solution: There are 1,413,720 PINs with no repeated symbol, and there are 1,679,616 PINs in all. Thus the probability that a PIN chosen at random contains no repeated symbol is 1,413,720/1,679,616 ≈ 0.8417. In other words, approximately 84% of PINs have no repeated symbol.

  22. Cont…. 2. If letters of the word COMPUTER are randomly arranged in a row, what is the probability that the letters CO remain next to each other (in order) as a unit

  23. Probability Axioms

  24. Cont…

  25. General Rule Example: Suppose a card is chosen at random from an ordinary 52-card deck. What is the probability that the card is a face card (jack, queen, or king) or is from one of the red suits (hearts or diamonds)? Sol: Let A be the event that the chosen card is a face card, and let B be the event that the chosen card is from one of the red suits. The event that the card is a face card or is from one of the red suits is A ∪ B

  26. Expected Value For example: Suppose that 500,000 people pay $5 each to play a lottery game with the following prizes: a grand prize of $1,000,000, 10 second prizes of $1,000 each, 1,000 third prizes of $500 each, and 10,000 fourth prizes of $10 each. What is the expected value of a ticket?

  27. Expected Value Solution: Each of the 500,000 lottery tickets has the same chance as any other of containing a winning lottery number, and so pk = 1/500,000 for all k = 1,2,3,...,500000.

  28. Lecture Summary • Counting Elements of Disjoint Sets • Counting the Number of Integers • Relation between Permutations and Combinations • Probability • Axioms of Probability

More Related