Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:"β€” Presentation transcript:

1 Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:
Combinatorial proofs. CMPSC 360 5/11/2019

2 1st rule of counting If an object can be formed by a succession of π‘˜ choices, where there are 𝑛 1 ways of making the first choice, and for every way of making the 1st choice, there are 𝑛 2 ways of making the 2nd choice, and for every way of making the 1st and 2nd choices there are 𝑛 3 ways of making the 3rd choice, and so on up to the 𝑛 π‘˜ -th choice, then the number of distinct objects that can be made in this way is 𝑛 1 β‹… 𝑛 2 β‹… 𝑛 3 ⋅…⋅ 𝑛 π‘˜ . 5/11/2019

3 2nd rule of counting Suppose an object can be formed by a succession of choices, and the order in which the choices are made does not matter. Let A be the set of possible objects if the order of choices matters. Let B the set of possible objects if it does not. Suppose we can map all objects from A to objects in B is that exactly 𝑑 elements of A are mapped to every element of B. Then |𝐡|= 𝐴 𝑑 . 5/11/2019

4 Typical counting problems
Order 𝑛 elements: 𝑛! ways. Choose π‘˜ out of 𝑛 without replacement, ordered: 𝑛! π‘›βˆ’π‘˜ ! ways. Choose π‘˜ out of 𝑛 without replacement, unordered: 𝑛 π‘˜ = 𝑛! π‘˜! π‘›βˆ’π‘˜ ! ways. Choose π‘˜ out of 𝑛 with replacement, ordered: 𝑛 π‘˜ ways. Choose π‘˜ out of 𝑛 with replacement, unordered: ??? 5/11/2019

5 I-clicker question (frequency: BC)
How many undirected graphs with vertex sets 1,2,…,𝑛 are there? 𝑛 2 2 𝑛 2 𝑛 π‘›βˆ’1 /2 2 𝑛 π‘›βˆ’1 2 𝑛 2 5/11/2019

6 I-clicker question (frequency: BC)
How many directed graphs with vertex sets 1,2,…,𝑛 are there? 𝑛 2 2 𝑛 2 𝑛 π‘›βˆ’1 /2 2 𝑛 π‘›βˆ’1 2 𝑛 2 5/11/2019

7 Typical counting problems
Order 𝑛 elements: 𝑛! ways. Choose π‘˜ out of 𝑛 without replacement, ordered: 𝑛! π‘›βˆ’π‘˜ ! ways. Choose π‘˜ out of 𝑛 without replacement, unordered: 𝑛 π‘˜ = 𝑛! π‘˜! π‘›βˆ’π‘˜ ! ways. Choose π‘˜ out of 𝑛 with replacement, ordered: 𝑛 π‘˜ ways. Choose π‘˜ out of 𝑛 with replacement, unordered: 𝑛+π‘˜βˆ’1 π‘˜ ways. 5/11/2019

8 A combinatorial proof To prove an equality of the form LHS=RHS:
Find a counting question you can answer in two ways. Argue that the first way gives LHS. Argue that the second way gives RHS. Conclude that LHS=RHS. It is like playing Jeopardy!. Ex.1. 𝑛 π‘˜+1 = π‘›βˆ’1 π‘˜ + π‘›βˆ’2 π‘˜ +…+ π‘˜ π‘˜ Ex.2. 𝑛 π‘˜ = π‘›βˆ’1 π‘˜βˆ’1 + π‘›βˆ’1 π‘˜ 5/11/2019


Download ppt "Discrete Math for CS CMPSC 360 LECTURE 27 Last time: Counting. Today:"

Similar presentations


Ads by Google