Counting Overview ICS 6D Sandy Irani. Balls into Bins Distinguishable Balls Indistinguishable Balls No restrictions on the number of balls per bin At.

Slides:



Advertisements
Similar presentations
9.5 Counting Subsets of a Set: Combinations
Advertisements

Basic Permutations and Combinations
4.5 Generalized Permutations and Combinations
Counting. Counting = Determining the number of elements of a finite set.
Counting Chapter 6 With Question/Answer Animations.
College of Information Technology & Design
CSCE 2100: Computing Foundations 1 Combinatorics Tamara Schneider Summer 2013.
The Division Rule Theorem: Suppose a set A has n elements and is partitioned by the collection {A 1, A 2,..., A p }, where each partition set has m elements.
Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 5.4 Distributions Prepared by Jo Ellis-Monaghan.
Arrangements & Selections with Repetition
Combinations We should use permutation where order matters
Counting Techniques: r-combinations with
More Counting Lecture 16: Nov 9 A B …… f. Counting Rule: Bijection If f is a bijection from A to B, then |A| = |B| A B …… f.
Counting Elements in a List How many integers in the list from 1 to 10? How many integers in the list from m to n? (assuming m
Distributions.
Tucker, Section 5.41 Section 5.4 Distributions By Colleen Raimondi.
Quiz 4 Counting: 4.3, 4.4, 4.5. Quiz4: May 5, pm Your answers should be expressed in terms of factorials and/or powers. Imagine you want to.
Main Menu Main Menu (Click on the topics below) Permutations with Some repetitions Example r-Combinations with Some repetitions Example Permutations and.
How many ways are there to pass through city A where the arrows represent one-way streets? Answer: mn ways The counting principal: Suppose two experiments.
Chapter 1 Fundamental principles of counting 陳彥良 中央大學資管系.
Exam 1 Review 5.1, , 8.1, 8.2.
Review of 5.1, 5.3 and new Section 5.5: Generalized Permutations and Combinations.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Generalized Permutations and Combinations
10/12/2015MATH 106, Section 141 Section 14 Linear Equations with Unit Coefficients Questions about homework? Submit homework!
Quiz 3 Counting: 4.3, 4.4, 4.5. Quiz3: April 27, pm Your answers should be expressed in terms of factorials and/or powers. A lonely gambler.
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Chapter 3 Permutations and combinations
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Chapter 6, Counting and Probability
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CSNB143 – Discrete Structure
Discrete Structures Counting (Ch. 6)
Counting.
Counting II: Recurring Problems And Correspondences Great Theoretical Ideas In Computer Science V. AdamchikCS Spring 2006 Lecture 6Feb 2, 2005Carnegie.
5.5 Generalized Permutations and Combinations
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
Distributions. Basic Model for Distributions of Distinct Objects The following problems are equivalent: Distributing n distinct objects into b distinct.
Operations on Sets Union of Sets Intersection of Sets
Introduction to Counting ICS 6D Sandy Irani. The Product Rule The product rule gives a way to count sequences: – Example: lunch special at a restaurant.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
Section 6.3. Section Summary Permutations Combinations.
Discrete Mathematics Counting.
Introduction to Discrete Probability
Counting by Complement and the Inclusion/Exclusion Principle
CSC-2259 Discrete Structures
Generalized Permutations and Combinations
Happy Pi Day! Find x. 15 If you still have x
Generalized Permutations & Combinations: Selected Exercises
Permutations and Combinations
Permutations and Combinations
Discrete Mathematics for Computer Science
Permutations and Combinations
CS100: Discrete structures
Discrete Structures for Computer Science
Arrangements & Selections with Repetition
Arrangements & Selections with Repetition
Math/CSE 1019: Discrete Mathematics for Computer Science Fall 2011
Permutations and Combinations
Counting II: Recurring Problems And Correspondences
Chapter 10 Counting Methods.
Combinations with repetitions allowed
Chapter 10 Counting Methods 2012 Pearson Education, Inc.
WUE Seventeen applicants want to interview with SAS. In how many ways can the 8 time slots be assigned? How many different ways can the letters of the.
Combinatorial Identities
The Division Rule Theorem: Suppose a set A has n elements and is partitioned by the collection {A1, A2, ..., Ap}, where each partition set has m elements.
Presentation transcript:

Counting Overview ICS 6D Sandy Irani

Balls into Bins Distinguishable Balls Indistinguishable Balls No restrictions on the number of balls per bin At most one ball per bin m  n r i balls in bin i For i = 1,…,m r 1 +r 2 +r 3 +…+r m = n n balls m bins Bins are distinguishable (labeled with numbers)

Distinguishable Balls into Distinguishable Bins (no restrictions) Ball1Ball2Ball3Ball4Ball (n-1)Ball n …. Each ball goes into exactly one bin. Each bin can get any number of balls.

Dist Balls/Dist Bins/No Restrictions Count the number of strings of length n over an alphabet with m characters. Char1Char2Char3Char4Char (n-1)Char n ….

Dist Balls/Dist Bins/No Restrictions How many ways to plan a schedule for n days. Each day, there are exactly m choices of activities. Day1Day2Day3Day4Day (n-1)Day n ….

Dist Balls/Dist Bins/No Restrictions How many ways to distribute n different items to m people? Item1Item2Item3Item4Item(n-1)Item n ….

Dist Balls/Dist Bins/No Restrictions How many ways to assign m different people to n jobs? (Each job needs one person. A person can get any number of jobs). Job1Job2Job3Job4Job(n-1)Job n ….

Indistinguishable Balls into Distinguishable Bins (No restrictions) Can have n  m or m  n Bin 1Bin 2Bin 3Bin m-1Bin m

Indist Balls/Dist Bins (No restrictions) How many ways to pick n items from m varieties? – Items of the same variety are the same – Large number of each variety – Order of selection does not matter # of variety j chosen = # balls in bin j Total number chosen = total number of balls

Indist Balls/Dist Bins (No restrictions) How many solutions to the equation: x 1 + x 2 + x 3 + ….+ x m = n Each x j is a non-negative integer (x j  0) x j = # balls in bin j

Indist Balls/Dist Bins (No restrictions) How many ways to distribute n identical items to m people? # items to person j = # balls in bin j

Dist Balls to Dist Bins At most one ball per bin Must have m  n If balls are placed in order, the order of placement matters. Bin 1Bin 2Bin 3Bin m-1 1 Bin m 23 # choices for ball 1 # choices for ball 2 # choices for ball 3 # choices for ball n xxx …. x

Dist Balls to Dist Bins At most one ball per bin How many strings of length n from a set of m characters with no repetition? # choices for char 1 # choices for char 2 # choices for char 3 # choices for char n xxx …. x

Dist Balls to Dist Bins At most one ball per bin How many ways to distribute n different items to m people with at most one per person? # choices for item 1 # choices for item 2 # choices for item 3 # choices for item n xxx …. x

Dist Balls to Dist Bins At most one ball per bin How many ways to select n people from a group of m people in which each person chosen is assigned a distinct task? # choices for task 1 # choices for task 2 # choices for task 3 # choices for task n xxx …. x

Indist Balls to Dist Bins At most one ball per bin Must have m  n The order of ball placement does not matter. Which bins have a ball? n of the m bins have a ball. # of ways to place balls = # ways to pick a subset of n from {1, 2, 3, …., m} Bin 1Bin 2Bin 3Bin m-1 Bin m

Indist Balls to Dist Bins At most one ball per bin How many ways to pick a committee of n people from a group of m people? How many binary strings of length m have exactly n 1’s?

Dist Balls/Dist Bin Fixed number per bin Restriction: exactly r j balls in bin j, for m  j  1 r 1 +r 2 +r 3 +…+r m = n Pick r 1 balls for bin 1. Then pick r 2 balls for bin 2. …. Finally, pick r m balls for bin m.

Dist Balls/Dist Bin Fixed number per bin How many ways to assign n people to offices? There are m offices. Office j can hold r j people. r 1 +r 2 +r 3 +…+r m = n Pick r 1 people for office 1. Then pick r 2 people for office 2. …. Finally, pick r m people for office m.

Dist Balls/Dist Bin Fixed number per bin How many ways to plan a schedule for n days. Each day, there are exactly m choices of activities. Activity j appears r j times in the schedule. r 1 +r 2 +r 3 +…+r m = n Pick r 1 days for activity 1. Then pick r 2 days for activity 2. …. Finally, pick r m days for activity m.

Indist Balls/Dist Bin Fixed number per bin Restriction: exactly r j balls in bin j, for m  j  1 r 1 +r 2 +r 3 +…+r m = n There are no decisions to make. Number of ways to place the balls = 1 Bin 1Bin 2Bin 3Bin m-1Bin m

Indist Balls/Dist Bin Fixed number per bin How many ways to distribute n identical chocolate bars to m kids so that each kid gets exactly the same number of chocolate bars? (n must be a multiple of m) Exactly 1 way to distribute the chocolate bars.