lecture07

# lecture07 - COMPSCI 102 Discrete Mathematics for Computer...

This preview shows pages 1–15. Sign up to view the full content.

COMPSCI 102 Discrete Mathematics for Computer Science

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
+ + ( ) + ( ) = ? Counting II: Recurring Problems and Correspondences Lecture7
A B 1-1 onto Correspondence (just “correspondence” for short)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Correspondence Principle If two finite sets can be placed into 1-1 onto correspondence, then they have the same size
If a finite set A has a k-to-1 correspondence to finite set B, then |B| = |A|/k

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The number of subsets of an n-element set is 2 n .
Sometimes it is easiest to count the number of objects with property Q, by counting the number of objects that do not have property Q.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The number of subsets of size r that can be formed from an n-element set is: n! r!(n-r)! = n r
A choice tree provides a “choice tree representation” of a set S, if 1. Each leaf label is in S, and each element of S is some leaf label 2. No two leaf labels are the same

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Product Rule (Rephrased) Suppose every object of a set S can be constructed by a sequence of choices with P 1 possibilities for the first choice, P 2 for the second, and so on. IF 1. Each sequence of choices constructs an object of type S 2. No two different sequences create the same object There are P 1 P 2 P 3 …P n objects of type S AND THEN
How Many Different Orderings of Deck With 52 Cards? What object are we making? Ordering of a deck Construct an ordering of a deck by a sequence Construct an ordering of a deck by a sequence of 52 choices: of 52 choices: 52 possible choices for the first card; 51 possible choices for the second card; : : 1 possible choice for the 52 nd card. By product rule: 52 × 51 × 50 × … × 2 × 1 = 52!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The Sleuth’s Criterion There should be a unique way to create an object in S. In other words: For any object in S, it should be possible to reconstruct the (unique) sequence of choices which lead to it.
The three big mistakes people make in associating a choice tree with a set S are: 1. Creating objects not in S 2. Leaving out some objects from the set S 3. Creating the same object two different ways

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
DEFENSIVE THINKING ask yourself: Am I creating objects of the right type?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 62

lecture07 - COMPSCI 102 Discrete Mathematics for Computer...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online