Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting.

Slides:



Advertisements
Similar presentations
Counting. Counting in Algorithms How many comparisons are needed to sort n numbers? How many steps to compute the GCD of two numbers ? How many steps.
Advertisements

5.3 Permutations and Combinations
7.5 Inclusion/Exclusion. Definition and Example- 2 sets |A  B| =|A| + |B| - |A ∩ B| Ex1: |A|=9, |B|=11, |A∩B|=5, |A  B| = ?
Math 221 Integrated Learning System Week 2, Lecture 1
Counting Principles The Fundamental Counting Principle: If one event can occur m ways and another can occur n ways, then the number of ways the events.
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
Chapter 11 Counting Methods © 2008 Pearson Addison-Wesley. All rights reserved.
1 Permutations and Combinations CS/APMA 202 Epp section 6.4 Aaron Bloomfield.
1 The game of poker You are given 5 cards (this is 5-card stud poker) The goal is to obtain the best hand you can The possible poker hands are (in increasing.
Permutations and Combinations
Permutations and Combinations. Random Things to Know.
Precalculus – MAT 129 Instructor: Rachel Graham Location: BETTS Rm. 107 Time: 8 – 11:20 a.m. MWF.
Chapter 8 Counting Principles: Further Probability Topics Section 8.2 Combinations.
P ERMUTATIONS AND C OMBINATIONS Homework: Permutation and Combinations WS.
Chapter 11: Counting Methods
Poker Solutions.
Counting. Techniques for counting Rule 1 Suppose we carry out have a sets A 1, A 2, A 3, … and that any pair are mutually exclusive (i.e. A 1  A 2 =
3.8 Counting Techniques: Combinations. If you are dealt a hand in poker (5 cards), does it matter in which order the cards are dealt to you? A  K  J.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
6.1 Probability exercises. Def Def: If S is a finite sample space of equally likely outcomes, and E is an event, that is, a subset of S, then the probability.
Binomial Coefficients, Inclusion-exclusion principle
-2 Combinations. Combination-order doesn’t matter; can have repition or not Graphing calculator n#,math,PRB 3,r#,enter.
10.3 – Using Permutations and Combinations Permutation: The number of ways in which a subset of objects can be selected from a given set of objects, where.
Section 10-3 Using Permutations and Combinations.
Homework Homework due now. Reading: relations
15.1 Inclusion/Exclusion OBJ:  to use the inclusion- exclusion principle to solve counting problems involving intersections and unions of sets.
3.4 Counting Principles I.The Fundamental Counting Principle: if one event can occur m ways and a second event can occur n ways, the number of ways the.
Find the value of 5 P 3. Counting Methods – Part 3.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.6,
Some other set notation We will use the notation to mean that e is an element of A. We will use the notation to mean that e is not an element of A.
CS Lecture 11 To Exclude Or Not To Exclude? + -
6.7 Permutations and Combinations. Fundamental Counting You have the following clothes to choose from: 1 black and1 blue pair of jeans 1 yellow, 1 green,
I CAN: Use Permutations and Combinations
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science V. AdamchikCS Spring 2006 Lecture 6Feb 2, 2005Carnegie.
8.6 Counting Principles. Listing Possibilities: Ex 1 Eight pieces of paper are numbered from 1 to 8 and placed in a box. One piece of paper is drawn from.
Discrete Math Section 15.3 Solve problems using permutations and combinations Read page Combinations and permutations.
CS Lecture 8 Developing Your Counting Muscles.
MAT 142 Lecture Video Series. Combinatorics and Probability.
L14: Permutations, Combinations and Some Review EECS 203: Discrete Mathematics.
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Math 1320 Chapter 7: Probability 7.4 Probability and Counting Techniques.
Probability Intro. Coin toss u Toss two coins 10 times keeping track of the results (head/tails) u Now toss 3 coins 10 times u Make a chart of all the.
Counting Principles Ex. Eight pieces of paper are numbered 1 to 8 and placed in a box. One piece of paper is drawn from the box, its number is written.
Chapter 10 Counting Methods.
MAT 142 Lecture Video Series
L14: Permutations, Combinations and Some Review
Developing Your Counting Muscles
Bell Ringer Damian thinks he can beat Mr. Haupt in a game of 5 card draw poker. Damian is dealt a full house, so he doesn’t discard any of his cards.
Random Sampling Playing cards are our participants
To Exclude Or Not To Exclude?
CS 2210 Discrete Structures Counting
Discrete Math for CS CMPSC 360 LECTURE 4 Last time and recitations:
Mathematics for Computer Science MIT 6.042J/18.062J
Discrete Math for CS CMPSC 360 LECTURE 32 Last time: Review. Today:
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
Discrete Math for CS CMPSC 360 LECTURE 44 Last time:
Permutations and Combinations
Basic Counting.
Discrete Math for CS CMPSC 360 LECTURE 13 Last time:
Basic Counting Lecture 9: Nov 5, 6.
Counting II: Recurring Problems And Correspondences
Combinations.
Section 6.4 Counting and Combinations with Multiple Cases
Using Permutations and Combinations
Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:
Counting II: Recurring Problems And Correspondences
Using Permutations and Combinations
Discrete Math for CS CMPSC 360 LECTURE 34 Last time:
10.3 – Using Permutations and Combinations
Presentation transcript:

Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Combinatorial proofs. Today: More counting. Inclusion-Exclusion Principle. CMPSC 360 11/12/2018

I-clicker question (frequency: BC) In a standard deck of 52 cards, how many different ``full house'' poker hands are there? (A full house consists of five cards with three of them having one value and two having a differnt value; the order of cards doesn't matter, so {5♥,5♦, 5♠, Q♥, Q♣} and {5♦,5♥,Q♥, 5♠,  Q♣} are the same full house hand.) 13⋅6⋅6⋅4 13⋅12⋅6⋅4 13 2 ⋅11⋅ 6 2 ⋅2 52 5 None of the above 11/12/2018

Inclusion-Exclusion Principle For any two sets A and B, 𝐴∪𝐵 = 𝐴 + 𝐵 − 𝐴∩𝐵 . Example. A 3-card hand is dealt off of a standard 52-card deck. How many different such hands are there for which all 3 cards are red or all three cards are face cards? (A face card is J,K or Q of any suit.) 11/12/2018

Inclusion-Exclusion Principle For any two sets A and B, 𝐴∪𝐵 = 𝐴 + 𝐵 − 𝐴∩𝐵 . For any three sets A ,B, and C, 𝐴∪𝐵∪𝐶 = 𝐴 + 𝐵 + 𝐶 − 𝐴∩𝐵 − 𝐵∩𝐶 − 𝐴∩𝐶 + 𝐴∩𝐵∩C . Example. How many integers in 1,2,…,100 are divisible by 2, 3 or 5? 50+33+20-16-10-6+3=103-32=3=68 11/12/2018

Inclusion-Exclusion Principle For any three sets 𝐴 1 , 𝐴 2 ,…, 𝐴 𝑛 , 𝐴 1 ∪ 𝐴 2 ∪…∪ 𝐴 𝑛 = 𝐴 1 |+ 𝐴 2 +…+| 𝐴 𝑛 − 𝐴 1 ∩ 𝐴 2 − 𝐴 2 ∩ 𝐴 3 −…− 𝐴 𝑛−1 ∩ 𝐴 𝑛 + 𝐴 1 ∩ 𝐴 2 ∩ 𝐴 3 + 𝐴 1 ∩𝐴 2 ∩ 𝐴 4 +…+ 𝐴 𝑛−2 ∩ 𝐴 𝑛−1 ∩ 𝐴 𝑛 −…+……… ±| 𝐴 1 ∩ 𝐴 2 ∩⋯∩ 𝐴 𝑛 | 50+33+20-16-10-6+3=103-32=3=68 11/12/2018