Developing Your Counting Muscles

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science for Some.
Advertisements

Counting Chapter 6 With Question/Answer Animations.
Great Theoretical Ideas in Computer Science.
Discrete Structures & Algorithms More Counting. + + ( ) + ( ) = ? Counting II: Recurring Problems and Correspondences.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 10Feb 12, 2004Carnegie.
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 9Feb 10,
Basics of Probability. Trial or Experiment Experiment - a process that results in a particular outcome or “event”. Simple event (or sample point), E i.
Counting II: Pascal, Binomials, and Other Tricks Great Theoretical Ideas In Computer Science A. Gupta D. Sleator CS Fall 2010 Lecture 8Sept. 16,
CompSci 102 Discrete Math for Computer Science March 22, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
Generalized Permutations and Combinations
Binomial Coefficients, Inclusion-exclusion principle
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Great Theoretical Ideas in Computer Science.
Section 10-3 Using Permutations and Combinations.
Chapter 6, Counting and Probability
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
COMPSCI 102 Discrete Mathematics for Computer Science.
Discrete Mathematics for Computer Science. + + ( ) + ( ) = ? Counting II: Recurring Problems and Correspondences Chapter 9 slides 1-54.
Great Theoretical Ideas in Computer Science.
COMPSCI 102 Discrete Mathematics for Computer Science.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
Counting Discrete Mathematics. Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter passwords are there?”
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 7Sept 20, 2005Carnegie.
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 9Feb 10,
CS Lecture 11 To Exclude Or Not To Exclude? + -
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science V. AdamchikCS Spring 2006 Lecture 6Feb 2, 2005Carnegie.
CS Lecture 8 Developing Your Counting Muscles.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 6Sept 15,
CS Lecture 6 How To Count Without Counting.
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.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
Section 6.3. Section Summary Permutations Combinations.
Example A standard deck of 52 cards has 13 kinds of cards, with four cards of each of kind, one in each of the four suits, hearts, diamonds, spades, and.
Chapter 10 Counting Methods.
L14: Permutations, Combinations and Some Review
The Pigeonhole Principle
Introduction to Discrete Mathematics
CSC 321: Data Structures Fall 2015 Counting and problem solving
CSE15 Discrete Mathematics 04/19/17
Counting Methods and Probability Theory
Generalized Permutations and Combinations
COCS DISCRETE STRUCTURES
Counting III: Pascal’s Triangle, Polynomials, and Vector Programs
To Exclude Or Not To Exclude?
CS100: Discrete structures
Counting I: Bijection and Choice Trees
Counting I: One-To-One Correspondence and Choice Trees
Basic Counting.
COUNTING AND PROBABILITY
Great Theoretical Ideas in Computer Science
Counting Discrete Mathematics.
Basic Counting Lecture 9: Nov 5, 6.
Permutations and Combinations
Counting III: Pascal’s Triangle, Polynomials, and Vector Programs
Counting II: Recurring Problems And Correspondences
Great Theoretical Ideas in Computer Science
Counting Methods and Probability Theory
Discrete Mathematics for Computer Science
Introduction to Discrete Mathematics
Counting II: Recurring Problems And Correspondences
Applied Combinatorics, 4th Ed. Alan Tucker
Counting I: Choice Trees and Correspondences
Permutations and Combinations
Presentation transcript:

Developing Your Counting Muscles Great Theoretical Ideas In Computer Science Developing Your Counting Muscles Lecture 8 CS 15-251

Addition Rule Let A and B be two disjoint, finite sets. The size of AB is the sum of the size of A and the size of B.

Correspondence Principle If two finite sets can be placed into 1-1 onto correspondence, then they have the same size.

Product Rule Suppose that all objects of a certain type can be constructed by a sequence of choices with P1 possibilities for the first choice, P2 for the second, and so on. IF 1) Each sequence of choices constructs some object AND 2) Each object has exactly one sequence that constructs it THEN there are P1P2P3…Pn objects of that type.

The Sleuth’s Criterion Condition (2) of the product rule: For any object it should be possible to reconstruct the sequence of choices that lead to it.

The number of subsets of size r that can be formed from an n-element set is:

How many sequences of seven letters contain at least 2 of the same letter? 267 – 26*25*24*23*22*21*20

Counting Poker Hands…

52 Card Deck 5 card hands 4 possible suits:  13 possible ranks: 2,3,4,5,6,7,8,9,10,J,Q,K,A

Question: How many ways to rearrange the letters in the word “SYSTEMS”?

SYSTEMS 7 places to put the Y, 6 places to put the T, 5 places to put the E, 4 places to put the M, and the S’s are forced. 7 X 6 X 5 X 4 = 840 2)

SYSTEMS 3) Let’s pretend that the S’s are distinct: S1YS2TEMS3 There are 7! permutations of S1YS2TEMS3 But when we stop pretending we see that we have counted each arrangement of SYSTEMS 3! times, once for each of 3! rearrangements of S1S2S3.

Arrange n symbols r1 of type 1, r2 of type 2, …, rk of type k

CARNEGIEMELLON

What is a closed form expression for ck?

What is a closed for expression for cn? n times Before combining like terms, when we multiply things out we get 2n cross terms. There is a natural correspondence between sequences with k X’s and (n-k) 1’s and cross terms evaluating to Xk.

Binomial Coefficients The Binomial Formula Binomial Coefficients binomial expression

The Binomial Formula (1+X)0 = 1 (1+X)1 = 1 + 1X (1+X)2 = 1 + 2X + 1X2

The Binomial Formula

What is the coefficient of EMSTY in the expansion of 5!

What is the coefficient of EMS3TY in the expansion of The number of ways to rearrange the letters in the word SYSTEMS.

What is the coefficient of BA3N2 in the expansion of The number of ways to rearrange the letters in the word BANANA.

What is the coefficient of in the expansion of (X1+X2+X3+…+Xk)n?

The Multinomial Formula

Multinomial Coefficients

How many different ways to divide up the loot? 5 distinct pirates want to divide 20 identical, indivisible bars of gold How many different ways to divide up the loot?

Sequences with 20 G’s and 4 /’s GG/G//GGGGGGGGGGGGGGGGG/ represents the following division among the pirates: 2, 1, 0, 17, 0 In general, the ith pirate gets the number of G’s after / i-1 and before / i. This gives a correspondence between divisions of the gold and sequences with 20 G’s and 4 /’s.

How many different ways to divide up the loot How many different ways to divide up the loot? Sequences with 20 G’s and 4 /’s

How many different ways can n distinct pirates divide k identical, indivisible bars of gold?

How many integer solutions to the following equations?

How many integer solutions to the following equations?

Counting with repetitions allowed Suppose that we roll seven dice. How many different outcomes are there? 67 What if order doesn’t matter? (E.g., Yahtzee)

Counting with repetitions allowed How many ways are there of choosing k items from n items, where an item may be chosen more than once, but order doesn’t matter? E.g., the following are equivalent: 2 1 3 2 6 2 1, 1 3 2 1 2 2 6, 1 1 2 2 2 3 6 C C / C C C / C / / / C Place n-1 partitions / among k choices C

Back to the pirates How many ways are there of choosing 20 pirates from a set of 5, with repetitions allowed?