Tucker, Applied Combinatorics, Sec. 1.1, Jo E-M

Download Report

Transcript Tucker, Applied Combinatorics, Sec. 1.1, Jo E-M

Applied Combinatorics, 4rth Ed.
Alan Tucker
Section 5.4
Distributions
Prepared by Jo Ellis-Monaghan
4/5/05
Tucker, Sec. 4.3
1
Distributions
• A distribution problem is an arrangement or
selection problem with repetition.
• Specialized distribution problems must be broken
up into subcases that can be counted in terms of
simple permutations and combinations (with and
without repetition).
• General guidelines for modeling distributions:
– Distributions of distinct objects are equivalent to
arrangements
– Distributions of identical objects are equivalent to
selections.
4/5/05
Tucker, Sec. 4.3
2
Basic Models for Distributions
• Distinct Objects:
The process of distributing r distinct objects into n different
boxes is equivalent to putting the distinct objects in a row and then
stamping one of the n different box names on each object.
Thus there are n * n *…*n = n r distributions of the r distinct
objects.
r distinct objects
n different boxes
Red Red Blue Green
4/5/05
Tucker, Sec. 4.3
3
Specified amount in each box
If ri objects must go in box i, then there are P(r; r1, r2, …, rn)
distributions.
6 distinct objects
3
1
2
How many in
each box
 6  6  3  6  3  1
 3  1  2   P  6;3,1,2 
 


4/5/05
Tucker, Sec. 4.3
4
Basic Models for Distributions
• Identical Objects:
The process of distributing r identical objects into n
different boxes is equivalent to choosing an (unordered)
subset of r box names with repetition from among the n
choices of boxes.
Thus there are C(r+n-1, r) = (r+n-1)!/r!(n-1)!
distributions of the r identical objects.
r identical
objects
4/5/05
Red Red Blue Blue Green Green Green
Tucker, Sec. 4.3
5
Equivalent Forms for Selection with Repetition
1. The number of ways to select r objects with repetition
from n different types of objects.
2. The number of ways to distribute r identical objects into
n distinct boxes.
3. The number of nonnegative integer solutions to
x1+x2+…+xn=r.
7 identical objects into 3 distinct boxes
Red Red Blue Blue Green Green Green
7 =
4/5/05
2
+
2
+
Tucker, Sec. 4.3
3
6
Ways to Arrange, Select, or Distribute r Objects
from n Items or into n Boxes
Arrangement (order outcome)
Combination (unordered
outcome)
or
or
Distribution of distinct objects
No repetition
Unlimited Repetition
Restricted Repetition
4/5/05
P(n,r)
nr
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of identical
objects
C(n,r)
C(n+r-1, r)
----7
Example 1
How many ways are there to assign 100 different diplomats to
5 different continents? How many ways if 20 diplomats
must be assigned to each continent?
For part one we want to use the distinct objects with unlimited repetition
model from below.
For the second part we want to use the distinct objects with restricted
repetition model from below.
Distribution of
distinct objects
No repetition
Unlimited Repetition
Restricted Repetition
4/5/05
P(n,r)
nr
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of
identical objects
C(n,r)
C(n+r-1, r)
----8
Example 1 (Continued)
These are distinct objects according to the model for
distributions. Following that model that means it equals the
number of sequences of length 100 involving 5 continents.
5100 sequences.
If you add the constraint of assigning 20 diplomats to
each continent, that means that each continent name should
appear 20 times in a sequence.
P(100; 20, 20, 20, 20, 20) = 100!/(20!)5 ways.
4/5/05
Tucker, Sec. 4.3
9
Example 2
In Bridge, the 52 cards of a standard card deck are
randomly dealt 13 apiece to players North, East, South, and
West. What is the probability that West has all 13 spades? That
each player has one Ace?
Distribution of
distinct objects
No repetition
Unlimited Repetition
Restricted Repetition
4/5/05
P(n,r)
nr
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of
identical objects
C(n,r)
C(n+r-1, r)
----10
Example 2 (part 1)
•
Count the ways West can get all spades-- 1 way.
• Count the ways to distribute the 39 non-spade cards among the 3
other hands-- P(39; 13, 13, 13) ways.
• To get the probability, divide by the distributions of the 52 cards
into 13-card hands-- P(52; 13, 13, 13, 13) ways.
52!
52
39!
52! = 1
=
1
( 13)
(13!)3 (13!)4
13!39!
Alternatively, ask the probability that West has all 13
spades (one way) out of all ways West can be dealt 13 cards:
1/C(52,13).
4/5/05
Tucker, Sec. 4.3
11
Example 2 (part 2)
What is the probability that each player has one Ace?
• First distribute the Aces– 4! Ways.
•Then distribute the 48 non-Aces—
P(48; 12, 12, 12, 12) = 48! / (12!)4 ways.
So the probability that each player gets an Ace is:
4!48!
4! P  48;12,12,12,12  12!
13! 4!48! 4


 13 C  52, 4   0.105
4
52!
P  52;13,13,13,13
12! 52!

4
13
4
4/5/05
4
Tucker, Sec. 4.3
12
Example 3
Show that the number of ways to distribute r
identical balls into n distinct boxes with at least one ball
in each box is C(r-1, n-1). With at least r1 balls in the
first box, at least r2 balls in the second box, …, and at
least rn balls in the nth box, the number is C(r - r1 - r2 …- rn + n – 1, n-1).
Distribution of
distinct objects
No repetition
Unlimited Repetition
Restricted Repetition
4/5/05
P(n,r)
nr
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of
identical objects
C(n,r)
C(n+r-1, r)
----13
Example 3 (at least one ball in each box)
• First put one ball in each of the r boxes.
• Then count the ways to distribute without restriction the
remaining r-n balls into the n boxes. You can do this in
[(r-n)+n-1]!
C((r-n)+n-1, (r-n)) =
(r-n)!(n-1)!
= C(r-1, n-1) ways.
Recalling that the number of ways to distribute R things
without restriction into N boxes is C(N+R-1, R).
4/5/05
Tucker, Sec. 4.3
back
14
Example 3
(ri balls in the ith box)
• First, for each I, put ri balls in the ith box.
• Note that there are now r-r1-r2-…-rn balls left.
• Finally, count the ways to distribute without restriction the
remaining r-r1-r2-…-rn balls into the n boxes.
• This can be done in
C((r-r1-r2-…-rn)+n-1, (r-r1-r2-…-rn))
= C((r-r1-r2-…-rn) +n-1, n-1) ways.
Recalling that the number of ways to distribute R things
without restriction into N boxes is C(N+R-1, R).
4/5/05
Tucker, Sec. 4.3
back
15
Example 4
How many integer solutions are there to the equation
x1 + x2 + x3 + x4 = 12, with xi > 0?
How many solutions with xi > 1?
How many solutions with x1 > 2, x2 > 2, x3 > 4, x4 > 0?
Distribution of
distinct objects
No repetition
4/5/05
P(n,r)
Unlimited Repetition
nr
Restricted Repetition
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of
identical objects
C(n,r)
C(n+r-1, r)
----16
Example 4 (Continued)
How many integer solutions are there to the equation
x1 + x2 + x3 + x4 = 12, with xi > 0?
An example of one solution is: x1 = 2, x2 = 3, x3 = 3, x4 = 4.
Two ways to think about this:
1. Let xi be the number of (identical) objects in box i, or
2. Let xi be the number of objects of type i chosen.
12 identical
objects
Box 1
Box 2
Box 3
Box 4
Either way, the number of integer solutions is
C(12+4-1, 12) = 455.
4/5/05
Tucker, Sec. 4.3
17
Example 4 (Continued)
Solutions with xi > 1:
First put one object in each box, and then solve
x1 + x2 + x3 + x4 = 12-4 = 8.
FORMULA
C(12-4 +(4-1), 4-1) = C(8+4-1, 4-1) = 165 ways.
Solution with x1>2, x2>2, x3>4, x4>0:
First put 2 objects in the first and second boxes, 4
objects in the third box, and then solve
x1 + x2 + x3 + x4 =12 – (2 + 2+4) = 4.
FORMULA
C (12 –(2+2+4) + (4-1), 4-1) = C(4+4-1, 4-1) = 35 ways.
4/5/05
Tucker, Sec. 4.3
18
Class Problem 1
How many ways are there to distribute 20 (identical)
sticks of red licorice and 15 (identical) sticks of black
licorice among five children?
Hint:
Distribution of
distinct objects
No repetition
Unlimited Repetition
Restricted Repetition
4/5/05
P(n,r)
nr
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of
identical objects
C(n,r)
C(n+r-1, r)
----19
Solution
First distribute the red sticks among the 5 children:
There are
C(20+5-1, 20) = 10,626
ways.
Then distribute the 15 identical sticks of black.
There are
C(15+5-1, 15) = 3,876
ways.
The product gives the number of ways to distribute all the candy:
10,626 * 3,876 = 41,186,376
4/5/05
Tucker, Sec. 4.3
20
Class Problem 2
How many binary sequences of length 10 are there
consisting of a (positive) number of 1s, followed by a number
of 0s, followed by a number of 1s, followed by a number of
0s?
E. g.
Hint:
No repetition
Unlimited Repetition
Restricted Repetition
4/5/05
1110111000.
Distribution of
distinct objects
P(n,r)
nr
P(n; r1, r2, …, rm)
Tucker, Sec. 4.3
Distribution of
identical objects
C(n,r)
C(n+r-1, r)
----21
Solution
4 Boxes
1’s
0’s
1’s
0’s
1---- 0---- 1----- 0----Put one digit in each box.
(Corresponds to
__ __ __ __ __ __
1100111000.)
Then distribute the remaining 10 – 4 digits into the 4 boxes:
C(6+4-1, 4-1) = C(10-1, 4-1) = 84.
Thus, there are 84 such binary sequences.
4/5/05
Tucker, Sec. 4.3
22