Chapter 2. Permutations and Combinations

Similar documents
More Probability: Poker Hands and some issues in Counting

Counting and Probability Math 2320

Week 3-4: Permutations and Combinations

Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ.

Theory of Probability - Brett Bernstein

Discrete Structures Lecture Permutations and Combinations

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

Probability and Counting Techniques

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

CISC 1400 Discrete Structures

Multiple Choice Questions for Review

2.5 Sample Spaces Having Equally Likely Outcomes

Chapter 1. Probability

STAT 430/510 Probability Lecture 3: Space and Event; Sample Spaces with Equally Likely Outcomes

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

3 The multiplication rule/miscellaneous counting problems

4.1 Sample Spaces and Events

Math 166: Topics in Contemporary Mathematics II

Topics to be covered

Combinatorial Proofs

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

Probability. The MEnTe Program Math Enrichment through Technology. Title V East Los Angeles College

Chapter 1. Probability

Intermediate Math Circles November 1, 2017 Probability I

Fundamentals of Probability

November 6, Chapter 8: Probability: The Mathematics of Chance

3 The multiplication rule/miscellaneous counting problems

Review I. October 14, 2008

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

CHAPTER 8 Additional Probability Topics

MAT104: Fundamentals of Mathematics II Counting Techniques Class Exercises Solutions

13.3 Permutations and Combinations

Section : Combinations and Permutations

November 11, Chapter 8: Probability: The Mathematics of Chance

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability

CHAPTER 9 - COUNTING PRINCIPLES AND PROBABILITY

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

DISCRETE STRUCTURES COUNTING

Section Summary. Permutations Combinations Combinatorial Proofs

Week 1: Probability models and counting

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

Classical vs. Empirical Probability Activity

CS1800: Intro to Probability. Professor Kevin Gold

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Mat 344F challenge set #2 Solutions

The probability set-up

{ a, b }, { a, c }, { b, c }

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

Most of the time we deal with theoretical probability. Experimental probability uses actual data that has been collected.

8.2 Union, Intersection, and Complement of Events; Odds

Counting Methods and Probability

Compound Probability. Set Theory. Basic Definitions

Section Introduction to Sets

7.1 Experiments, Sample Spaces, and Events

Principle of Inclusion-Exclusion Notes

Poker Hands. Christopher Hayes

n! = n(n 1)(n 2) 3 2 1

Statistics Intermediate Probability

Such a description is the basis for a probability model. Here is the basic vocabulary we use.

Math 227 Elementary Statistics. Bluman 5 th edition

November 8, Chapter 8: Probability: The Mathematics of Chance

Probability Theory. Mohamed I. Riffi. Islamic University of Gaza

Answer each of the following problems. Make sure to show your work.

Chapter 1: Sets and Probability

The probability set-up

Counting. Chapter 6. With Question/Answer Animations

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Basic Probability Models. Ping-Shou Zhong

Poker: Further Issues in Probability. Poker I 1/29

Unit 9: Probability Assignments

Elementary Combinatorics

Counting in Algorithms

If you roll a die, what is the probability you get a four OR a five? What is the General Education Statistics

Probability: Terminology and Examples Spring January 1, / 22

Chapter 3: Elements of Chance: Probability Methods

1. For which of the following sets does the mean equal the median?

Contemporary Mathematics Math 1030 Sample Exam I Chapters Time Limit: 90 Minutes No Scratch Paper Calculator Allowed: Scientific

With Question/Answer Animations. Chapter 6

4.4: The Counting Rules

Poker: Probabilities of the Various Hands

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

Define and Diagram Outcomes (Subsets) of the Sample Space (Universal Set)

CIS 2033 Lecture 6, Spring 2017

Fundamental Counting Principle

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

INDIAN STATISTICAL INSTITUTE

7.1 Chance Surprises, 7.2 Predicting the Future in an Uncertain World, 7.4 Down for the Count

7.4 Permutations and Combinations

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself

Math 1313 Section 6.2 Definition of Probability

Contents 2.1 Basic Concepts of Probability Methods of Assigning Probabilities Principle of Counting - Permutation and Combination 39

Finite Math - Fall 2016

Math 42, Discrete Mathematics

Bayes stuff Red Cross and Blood Example

Sec$on Summary. Permutations Combinations Combinatorial Proofs

Math 102 Practice for Test 3

Poker: Probabilities of the Various Hands

CS 237: Probability in Computing

Transcription:

2. Permutations and Combinations Chapter 2. Permutations and Combinations In this chapter, we define sets and count the objects in them. Example Let S be the set of students in this classroom today. Find S, the cardinality (number of elements) of S. 1/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles Section 2.1. Basic Counting Principles To count S we could use... 2/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles The Addition Principle Dividing students into male students M and female students F, we have S = M + F. 3/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles The Addition Principle Definition A partition of S is a collection of subsets S 1,...,S m of S such that each element of S is in exactly one: 1 S = S 1 S 2 S m 2 S i S j = for i j. The Addition Principle If S 1,...,S m is a partition of S, then S = S 1 + S 2 + + S m We will see a more sophisticated version of this, called the Inclusion-Exclusion Principle, in Chapter 6. 4/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles The Multiplication Principle If the students in S were sitting in c columns of r rows each, then S = r c. The Multiplication Principle If the elements of S are ordered pairs (a,b), where a can be any of x different values, and for each a, b can be any of y different values, then S = x y. 5/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles The Subtraction Principle If R is the set of students registered in the class, and taking attendence, we know the set A of students that are absent, then S = R A. 6/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles The Subtraction Principle Definition If A is a subset of some universe U, then the complement of A is A = U \ A = {u U u A}. (Note that the notation A is ambiguous, as it doesn t specify U.) The Subtraction Principle If A is a subset of some universe U, then A = U A. 7/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles The Division Principle Example: If we knew that there were u students in the university, and right now, they were evenly distributed among c classes, then S = u/c. The Division Principle If S is partitioned into m parts of the same size, then the size of any part P is P = S /m. 8/ 44

2. Permutations and Combinations 2.1. Basic Counting Principles A more typical example Example 1: How many two digit numbers consist of two different digits? [answer] 9/ 44

2. Permutations and Combinations 2.2. Permutations of Sets Section 2.2. Permutations of Sets Question How many ways can we order two elements of the set {1,2,3}? Six ways: 12 13 21 23 31 32 Question How many ways can we order three elements of the set {1,2,3}? Six ways: 123 132 213 231 312 321 10/ 44

2. Permutations and Combinations 2.2. Permutations of Sets Definition An r-permutation of a set is an ordering of r of its elements. P(n,r) denotes the number of r-permutations of an n element set. So we saw that P(3,2) = P(3,3) = 6 11/ 44

2. Permutations and Combinations 2.2. Permutations of Sets What is: P(3, 1) P(n, 1) P(n, n) P(n,n 1) P(n,r) [Answers] 12/ 44

2. Permutations and Combinations 2.2. Permutations of Sets Recall factorial notation Theorem For positive integers r n, n! = n (n 1) (n 2) 2 1 P(n,r) = n! (n r)!. 13/ 44

2. Permutations and Combinations 2.2. Permutations of Sets Some Permutation Problems 1 How many three letter words can we make from the letters {a,b,c,d,e}? 2 How many ways can we arrange 7 men and 3 women in a line so that no two women stand beside each other? 3 How many ways can we arrange 10 people in a line if Jack and Jill cannot stand beside each other. 4 How many ways can we arrange 10 people around a round table? 14/ 44

2. Permutations and Combinations 2.2. Permutations of Sets Circular r-permutations That last question was asking for the number of circular permutations of an n-element set. Theorem The number of circular r-permutations of an n element set is P(n,r) r = n! r (n r)!. 15/ 44

2. Permutations and Combinations 2.2. Permutations of Sets 1 How many ways can we arrange 10 people around a round table, Jack and Jill cannot be sat together? 2 How many ways can we arrange 5 couples around a round table so that all couples sit together? 3 How many ways can we arrange 5 couples around a round table if all couples are diametrically opposite? 16/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Section 2.3. Combinations of Sets Combinations are permutations where we don t care about order. Example Whereas there were six 2-permutations of {1,2,3}: 12 13 21 23 31 32 there are only three 2-combinations: {1,2} {1,3} {2,3} The combination {2,1} is the same as {1,2}. We usually say r-subset instead of r-combination. 17/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Notation The number of r-subsets of an n set is denoted ( ) n r and read n choose r. What are ( n 0), ( n 1), ( n n), ( 0 r), ( 3 5)? 18/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Theorem For all 0 r n, [proof] ( ) n = P(n,r) r P(r,r) = n! r!(n r)!. Corollary For all 0 r n, ( ) ( ) n n =. r n r [proof] 19/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Example (x + 1) 4 = (x + 1)(x + 1)(x + 1)(x + 1) = x 4 + x 3 + x 2 + x 1 + In general (x + y) n = n i=0 ( ) n x i y n i i 20/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Some permutation questions 1 How many triangles are determined by 12 points in general position in the plane? 2 How many eight-letter words can be constructed using the 26 letters of the alphabet if each word contains three, four or five vowels? 1 If no letter can be used twice? 2 If letters can be re-used? 21/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Some more results Theorem (Pascal s Formula) For all 1 r n 1, Proof: ( ) n = r ( n 1 r ) + ( n 1 r ). ( ) n r = the number r subsets of an n set = the number of r subsets not containing element 1 = + the number of r subsets containing element 1 ( ) ( ) n 1 n 1 + r r 1 22/ 44

2. Permutations and Combinations 2.3. Combinations of Sets Theorem For n 0, 2 n = ( ) n + 0 ( ) n + + 1 ( ) n. n [proof] 23/ 44

2. Permutations and Combinations 2.4. Permutations of Multisets Section 2.4. Permutations of Multisets Recall the question from Section 2.3: How many eight-letter words can be constructed using the 26 letters of the alphabet if each word contains three, four or five vowels? 1 If no letter can be used twice? 2 If letters can be re-used? Here we were choosing letters from the set ALPHABET, and distiguished between choosing elements with replacement and without replacement. Another way of looking at this is to say that each element occurs in the set multiple times. This doesn t happen in a set. A multiset is like a set, except that elements need not be distinct. In this section we look at r permutations of multisets. 24/ 44

2. Permutations and Combinations 2.4. Permutations of Multisets Notation by Examples We compactly represent the multiset {a, a, a, b, c, c} by {3 a,1 b,2 c}. If a occurs an infinite number of times in the above set, we write { a,1 b,2 c}. 25/ 44

2. Permutations and Combinations 2.4. Permutations of Multisets Question: How many 3-permutations are there of the set [answer] { a, b, c, d}? Theorem If S is a multiset containing k distinct elements with infinite repetition, then there are k r r-permutations of S. Corollary If S is a multiset containing k distinct elements each with repetition at least r, then there are k r r-permutations of S. 26/ 44

2. Permutations and Combinations 2.4. Permutations of Multisets Question: How many permutations are there of the following set? {3 a,10 b,7 c,2 d} Theorem Let S be a multiset containing k distinct elements, the i th of which has repetition a i. That is, S = {n 1 a 1,n 2 a 2,...,n k a k }. Then there are permutations of S. n! n 1!n 2!... n k! 27/ 44

2. Permutations and Combinations 2.4. Permutations of Multisets Question: Santa has 10 presents to distribute among three children. Lucy was good, so she gets six of them, and Reid was bad, so only gets one. Hong-cheon gets the other three. How many ways can Santa distribute the presents. [answer] 28/ 44

2. Permutations and Combinations 2.4. Permutations of Multisets Theorem The number of ways to partition n distinct items into sets of sizes n 1,n 2,...,n k respectively, where n = n 1 + + n k is n! n 1!n 2!... n k! = ( ) ( n n n1 n 1 n 2 ) ( n n1 n 2 n 3 ) ( n n1...n k 1 n k ). 29/ 44

2. Permutations and Combinations 2.5. Combinations of Multisets Section 2.5. Combinations of Multisets Question: You want to make a fruit basket containing 12 pieces of fruit. You can choose from apples, mangos, plums and those little yellow melons. How many ways can you make up the fruit basket? Fruits of the same type are indistiguishable! 30/ 44

2. Permutations and Combinations 2.5. Combinations of Multisets Theorem The number of r-submultisets of a 1,..., a k is ( ) r + k 1 = k 1 ( r + k 1 r ). 31/ 44

2. Permutations and Combinations 2.5. Combinations of Multisets Question: You want to make a fruit basket containing 12 pieces of fruit. You can choose from apples, mangos, plums and those little yellow melons. How many ways can you make up the fruit basket which has at least once piece of each type of fruit? 32/ 44

2. Permutations and Combinations 2.5. Combinations of Multisets Question: What is the number of non-negative integer solutions of the equation: x 1 + x 2 + x 3 + x 4 = 20? How about x 1 + x 2 + x 3 + x 4 20? How about subject to the conditions that x 1,x 2 1 and x 3 5? 33/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Section 2.6. Finite Probability The counting techniques we have looked at allow us to calculate the odds in many games of chance. Example A man in an alley offers the following game. You flip a coin three times. If you get all heads or all tails he gives you three dollars. Otherwise, you give him one. Should you play the game? 34/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Debate about the wisdom of playing games with a man in the alley, aside... There are 8 possible outcomes. You win in 2. So your odds of winning are 1/4. You pay 1 dollar. You can win 3. 1 = 3/4 dollars per one dollar player. So the payout ratio is 3/1. Your expected return on one dollar is 1/4 3/1 = 3/4 dollars, so you shouldn t play. 35/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity The Setting An experiment E is a random choice of one outcome from a finite sample space S. Each outcome is equally likely. An event E is a subset of S. The probability Prob(E) of an event is Prob(E) = E S. 36/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Example In an experiment you roll two dice. What is the probability of the event that the dice sum up to 7? The sample space is set S of possible rolls (a,b) where a is the number on the first die, and b is the number on the second: S = {(1,1),(1,2),...,(1,6),(2,1),...,(6,6)} The event that the dice sum to 7 is E = {(1,6),(2,5),... (6,1). The probability that the dice add up to 7 is Prob(E) = 7 36.19444 37/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Poker A deck of cards: 38/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Poker A deck of cards consists of 52 cards. Each of four suits: Clubs (C), Hearts (H), Spades (S), Diamonds (D). Occur with each ranks 1 ( = Ace), 2, 3,...,10, J, Q, K. 39/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Each player is dealt a hand of five cards. The player with the highest hand wins. The hands, in increasing value, are: 1 Pair : two cards having the same rank 2 2 pairs : two cards of one rank, and two of another 3 3 of a kind: three cards of the same rank 4 Straight : five cards of consecutive ranks ( The ace is treated as either 1 or 14. ) 5 Flush : five cards of the same suit 6 Full house : three cards of one rank, two of another 7 Four of a kind: four cards of the same rank 8 Straight flush: a straight and a flush 40/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Question: What is the probability of getting a Full House? 41/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Question: What is the probability of getting none of the above hands? 42/ 44

2. Permutations and Combinations 2.6. Finilte Probabliity Question: You are playing a variation of poker in which you can see three of your opponents cards. He is showing 6,8 and 10 of clubs. You have 3 aces. What are the chances you will win? 43/ 44

2. Permutations and Combinations 2.7. Exercises Section 2.7. Exercises HW: 2, 6, 10, 21, 39, 47, 63 44/ 44