Generalized Permutations & Combinations: Selected Exercises

Slides:



Advertisements
Similar presentations
Basic Permutations and Combinations
Advertisements

Generalized Permutations & Combinations: Selected Exercises.
Counting Chapter 6 With Question/Answer Animations.
CSE115/ENGR160 Discrete Mathematics 04/17/12
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.
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Arrangements & Selections with Repetition
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 II: Pascal, Binomials, and Other Tricks Great Theoretical Ideas In Computer Science A. Gupta D. Sleator CS Fall 2010 Lecture 8Sept. 16,
The Basics of Counting: Selected Exercises. Copyright © Peter Cappello2 Sum Rule Example There are 3 sizes of pink shirts & 7 sizes of blue shirts. How.
Tucker, Section 5.41 Section 5.4 Distributions By Colleen Raimondi.
More Counting Lecture 16: Nov 9 A B …… f. This Lecture We will study how to define mappings to count. There will be many examples shown. Bijection rule.
Review of 5.1, 5.3 and new Section 5.5: Generalized Permutations and Combinations.
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.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
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.
Inclusion-Exclusion Selected Exercises Powerpoint Presentation taken from Peter Cappello’s webpage
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
1 Counting by Mapping Lecture 15: Nov 4 A B …… f.
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,
Binomial Coefficients: Selected Exercises
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.
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
L14: Permutations, Combinations and Some Review EECS 203: Discrete Mathematics.
Permutations & Combinations: Selected Exercises. Copyright © Peter Cappello2 Preliminaries Denote the # of arrangements of some k elements of a set of.
Section 6.3. Section Summary Permutations Combinations.
Recurrence Relations: Selected Exercises. Copyright © Peter Cappello2 Exercise 10 (a) A person deposits $1,000 in an account that yields 9% interest compounded.
1.4 Solving Equations.
Discrete Mathematics Counting.
L14: Permutations, Combinations and Some Review
Binomial Coefficients: Selected Exercises
Developing Your Counting Muscles
Permutations and Combinations
CSE15 Discrete Mathematics 04/19/17
Counting by Complement and the Inclusion/Exclusion Principle
Generalized Permutations and Combinations
COCS DISCRETE STRUCTURES
Permutations and Combinations
Permutations and Combinations
Solving Equations by Adding or Subtracting
CS100: Discrete structures
Arrangements & Selections with Repetition
Arrangements & Selections with Repetition
2-4 Solving Multi-Step Equations
Permutations and Combinations
Basic Counting.
More Counting A B … f Lecture 16: Nov 9.
CSE 321 Discrete Structures
COUNTING AND PROBABILITY
1.4 Solving Equations I’ve taught you how to solve equations the “simonized” way but here’s another way of doing the same thing!
Great Theoretical Ideas in Computer Science
Basic Counting Lecture 9: Nov 5, 6.
Counting II: Recurring Problems And Correspondences
Great Theoretical Ideas in Computer Science
Representations of Integers
Discrete Mathematics for Computer Science
Introduction to Discrete Mathematics
4.4 Permutations and Combinations of multisets
Counting II: Recurring Problems And Correspondences
Solving Equations.
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:

Generalized Permutations & Combinations: Selected Exercises

Copyright © Peter Cappello Exercise 10 (a) A croissant shop has 6 kinds of croissants: plain, cherry, chocolate, almond, apple, & broccoli. How many ways are there to choose 12 croissants? Abstract version of the problem There is an infinite supply of 6 kinds of objects. How many ways are there to choose 12 of them? I.e, how many multisets of them are there of size 12? Copyright © Peter Cappello

Exercise 10 (a) Solution Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 1. How many distinct orders 12 items are there from a menu of 6 kinds? 2. How many binary strings of length 12 + 6 – 1 are there with exactly 12 0s? (= # of 17-bit binary strings with exactly 5 1s.) C( 12 + 6 – 1, 6 – 1 ) = C( 12 + 6 – 1, 12 ). 1-to-1 correspondence between these binary strings & orders. Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (b) A croissant shop has 6 kinds of croissants: plain, cherry, chocolate, almond, apple, & broccoli. How many ways are there to choose 36 croissants? Abstract version of the problem There is an infinite supply of 6 kinds of objects. How many ways are there to choose 36 of them? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (b) Solution How many binary strings of length 36 + 6 – 1 are there with exactly 36 0s? (= # of length-41 binary strings with 5 1s.) C( 36 + 6 – 1, 6 – 1 ) = C( 36 + 6 – 1, 36 ). How many ways are there to order 36 items from a menu of 6 kinds of items? 1-to-1 correspondence between binary strings & orders. Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (c) A croissant shop has 6 kinds of croissants: plain, cherry, chocolate, almond, apple, & broccoli. How many ways are there to choose 24 croissants with ≥ 2 of each kind? Abstract version of the problem There is an infinite supply of 6 kinds of objects. How many ways are there to choose 24 of them with ≥ 2 of each kind? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (c) Solution How many ways are there to order 24 – 2 . 6 = 12 items from a menu of 6 kinds of items? There is a 1-to-1 correspondence between this set of orders (multisets) & the original set of orders: For each order of 12 items: For each kind of item, increment the order of that kind by 2. The resulting order has 24 items, ≥ 2 of each kind of item. Answer: C( 24 – 2*6 + 6 - 1, 6 – 1 ). Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (d) A croissant shop has 6 kinds of croissants: plain, cherry, chocolate, almond, apple, & broccoli. How many ways are there to choose 24 croissants with  2 broccoli? Abstract version There is an infinite supply of 6 kinds of objects. How many ways are there to choose 24 of them with  2 of kind 1? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (d) Solution Use the sum rule: Partition the set of orders based on the # of broccoli croissants: Count the solutions with exactly 0 broccoli croissants C( 24 + 5 - 1, 5 – 1 ). 2. Count the solutions with exactly 1 broccoli croissant Pick 23 croissants from the remaining 5 kinds of croissants: C( 24 - 1 + 5 - 1, 5 – 1 ). 3. Count the solutions with exactly 2 broccoli croissants Pick 22 croissants from the remaining 5 kinds of croissants: C( 24 - 2 + 5 - 1, 5 – 1 ). Copyright © Peter Cappello

Exercise 10 (d) Better Solution Count all orders of 24 croissants: C( 24 + 6 – 1, 6 – 1 ) Subtract the “bad” orders: Order 24 - 3 croissants from all 6 varieties: C( 24 - 3 + 6 – 1, 6 – 1 ) Answer: C( 24 + 6 – 1, 6 – 1 ) – C( 24 - 3 + 6 – 1, 6 – 1 ) Copyright © Peter Cappello

Think Like a Mathematician C( 28, 4 ) + C( 27, 4 ) + C( 26, 4 ) = C( 29, 5 ) – C( 26, 5 ) What is a possible generalization of this equation? Generalize with respect to total number of objects (croissants) Generalize with respect to number of kinds of objects (croissants) Generalize with respect to the number limit of kind 1 (broccoli). Can you give a combinatorial argument for it? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (e) A croissant shop has 6 kinds of croissants: plain, cherry, chocolate, almond, apple, & broccoli. How many ways are there to choose 24 with ≥ 5 chocolate & ≥ 3 almond? Abstract version There is an infinite supply of 6 kinds of objects. How many ways are there to choose 24 of them with ≥ 5 of kind 1 & ≥ 3 of kind 2? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (e) There is a 1-to-1 correspondence between Orders of 24 – 5 – 3 objects of 6 kinds Orders of 24 objects of 6 kinds with ≥ 5 of kind 1 & ≥ 3 of kind 2. Correspondence: Add 5 objects of kind 1 & 3 objects of kind 2 to each order of type 1 to get an order of type 2. We count the # of orders of type 1: Answer: C( 24 – 5 – 3 + 6 – 1, 6 – 1 ) Copyright © Peter Cappello

Copyright © Peter Cappello Exercise10 (f) A croissant shop has 6 kinds of croissants: plain, cherry, chocolate, almond, apple, & broccoli. How many ways are there to choose 24 with: ≥ 1 plain & ≥ 2 cherry & ≥ 3 chocolate & ≥ 1 almond & ≥ 2 apple  3 broccoli? Abstract version There is an infinite supply of 6 kinds of objects. How many ways are there to choose 24 of them with: ≥ 1 of kind 1 & ≥ 2 of kind 2 & ≥ 3 of kind 3 & ≥ 1 of kind 4 & ≥ 2 of kind 5  3 of kind 6 Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 10 (f) Put 1 plain & 2 cherry & 3 chocolate & 1 almond & 2 apple to the side (9 objects to the side) There are 24 – 9 = 15 left to distribute w/o restriction on broccoli. C( 15 + 6 – 1, 6 – 1 ) 3. Subtract the “bad” orders (≥ 4 broccoli): C( 15 - 4 + 6 – 1, 6 – 1) Answer: C( 15 + 6 – 1, 6 – 1 ) – C( 15 - 4 + 6 – 1, 6 – 1) Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 20 How many integer solutions are there to the inequality x1 + x2 + x3  11, for x1 , x2 , x3 ≥ 0? Use the sum rule, partitioning the set of solutions. Alternatively: Introduce an auxiliary variable x4 such that x1 + x2 + x3 + x4 = 11, for x1 , x2 , x3 , x4 ≥ 0 Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 20 Solution There is a 1-to-1 correspondence between: The set of solutions to the equality The set of solutions to the inequality x1 + x2 + x3 from the equality satisfy the inequality. Equivalent to counting solutions to the equality: How many ways are there to order 11 items from a menu of 4 kinds of items? Answer: C( 11 + 4 – 1, 4 – 1 ). Copyright © Peter Cappello

Think Like a Mathematician C(2,2) + C(3,2) + C(4,2) + . . . + C(13,2) = C(14,3) What is a possible generalization of this equation? Generalize with respect to number of objects (11) Generalize with respect to number of kinds (3) Can you give a combinatorial argument for it? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 30 How many different strings can be made from the letters in MISSISSIPPI, using all 11 letters? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 30 Solution Use the product rule: Pick the position in the 11-letter string where the letter “M” goes: C( 11, 1 ) Pick the 4 positions in the 10 remaining positions where the 4 “I”s go: C( 10, 4 ) Pick the position in the 6 remaining positions where the 4 “S”s go: C( 6, 4 ) Pick the position in the 2 remaining positions where the 2 “P”s go: C( 2, 2 ) = 1 Answer: 11! / 1!4!4!2! Copyright © Peter Cappello

Generalizing Exercise 30 If you have n objects such that: n1 objects of them are of type t1 n2 objects of them are of type t2 . . . nk objects of them are of type tk The # of arrangements of these objects is C(n, n1 ) C( n - n1 , n2 ) C( n – n1 – n2 , n3 ) … C( n – n1 – … – nk-1, nk) = n! / (n1! n2! … nk!) (This equality is simple to verify algebraically.) Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 40 How many ways are there to travel in xyzw space from the origin ( 0, 0, 0, 0 ) to ( 4, 3, 5, 4 ) by taking steps: 1 unit in the positive x direction 1 unit in the positive y direction, 1 unit in the positive z direction 1 unit in the positive w direction? Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 40 Solution Any path from (0, 0, 0, 0) to (4, 3, 5, 4) is a sequence with: 4 x steps 3 y steps 5 z steps 4 w steps. Equivalent problem: How many 4 + 3 + 5 + 4 = 16 letter sequences of x, y, z, & w are there with exactly 4 x, 3 y, 5 z, 4 w ? Answer: 16! / 4! 3! 5! 4! Copyright © Peter Cappello

Copyright © Peter Cappello Exercise 40 This is a generalization of Pascal’s triangle, viewed as block walking. Travel from ( 0, 0 ) to ( j, k ) by taking steps: 1 unit in the positive x direction 1 unit in the positive y direction Sequences of j xs & k ys: ( j + k )!/j!k! = C( j + k, j ) = C( j + k, k ). Copyright © Peter Cappello

Copyright © Peter Cappello End Copyright © Peter Cappello

Copyright © Peter Cappello 2011 Exercise 50 How many ways are there to distribute 5 distinguishable objects in 3 indistinguishable boxes? Copyright © Peter Cappello 2011

Copyright © Peter Cappello 2011 Exercise 50 Solution Use the sum rule to partition the set of solutions: 1 box used: # solutions with 5 objects in 1 box: 1. 2 boxes used: # solutions with 4 objects in 1 box, 1 object in 2nd: C(5, 1). # solutions with 3 objects in 1 box, 2 objects in 2nd: C(5, 2). 3 boxes used: # solutions with 3 objects in 1 box, 1 object in 2nd box, 1 object in 3rd box: C(5, 3). # solutions with 2 objects in 1 box, 2 objects in 2nd box, 1 object in 3rd box: C(5, 1) C(4, 2)/2! Answer: 1 + C(5, 1) + C(5, 2) + C(5, 3) + C(5, 1) C(4, 2)/2! Copyright © Peter Cappello 2011

Copyright © Peter Cappello 2011 60 Suppose a basketball league has 32 teams, split into 2 conferences of 16 teams each. Each conference is split into 3 divisions. Suppose that the North Central Division (NCD) has 5 teams. Each team in this division plays: 4 games against each of the other 4 teams in its division 3 games against each of the 11 remaining teams in its conference 2 games against each of the 16 teams in the other conference. In how many different orders can the games of a team in the NCD be scheduled? Copyright © Peter Cappello 2011

Copyright © Peter Cappello 2011 60 Solution Let the 4 other teams in the NCD be x1, x2, x3, x4. Let the 11 other teams in the conference be y1, y2, …, y11. Let the 16 teams in the other conference be z1, z2, …, z16. The total # of games that a team in the NCD plays is 4 . 4 + 11 . 3 + 16 . 2 = 81 The number of 81-“letter’’ sequences with: 4 each of x1, x2, x3, x4 3 each of y1, y2, …, y11 2 each of z1, z2, …, z16 is 81! / (4!)4(3!)11(2!)16 Copyright © Peter Cappello 2011