280 likes | 329 Views
Learn about counting elements, difference rule, and more in discrete structures. Explore applying the Pigeonhole Principle for probability calculations and counting pairs of integers. Discover axioms of probability and expected value.
E N D
(CSC 102) Discrete Structures Lecture 27
Previous Lecture • Counting Elements • Difference Rule • Inclusion/Exclusion Rule • PigeonHolePrinciple • Generalized Pigeon Hole Principle
Today’s Lecture • Counting Elements of Disjoint Sets • Counting the Number of Integers • Relation between Permutations and Combinations • Probability • Axioms of Probability • Expected Value
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.
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.
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.
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
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.
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.
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:
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.
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.
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
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
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?
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.
Lecture Summary • Counting Elements of Disjoint Sets • Counting the Number of Integers • Relation between Permutations and Combinations • Probability • Axioms of Probability