Integer Solutions

Embed Size (px)

Citation preview

  • 8/2/2019 Integer Solutions

    1/20

    Tucker, Section 5.4 1

    Section 5.4 Distributions

    By

    Colleen Raimondi

  • 8/2/2019 Integer Solutions

    2/20

    Tucker, Section 5.4 2

    DistributionsA distribution problem is an arrangement orselection problem with repetition.

    Specialized distribution problems must be

    broken up into subcases that can be countedin terms of simple permutations andcombinations (with and without repetition).

    General guidelines for modeling distributions:

    Distributions of distinct objects areequivalent to arrangementsand Distributionsof identical objects are equivalent toselections.

  • 8/2/2019 Integer Solutions

    3/20

    Tucker, Section 5.4 3

    Basic Models for DistributionsDistinct Objects:

    The process of distributing rdistinct objects into ndifferent

    boxes is equivalent to putting the distinct objects in a row andthen stamping one of the ndifferent box names on each object.

    The resulting sequence of box names is an arrangement oflength rformed from nitems with repetition.

    Thus there are nx nxx n(rns) = nrdistributions of therdistinct objects.

    Ifriobjects must go in box i, 1< i< n, then there are P(r;

    r1, r2, , rn) distributions.rdistinct objects

    ndifferent boxes

    Red Red BlueGreen

  • 8/2/2019 Integer Solutions

    4/20

    Tucker, Section 5.4 4

    Basic Models for Distributions

    Identical Objects:

    The process of distributing ridentical objects into

    ndifferent boxes is equivalent to choosing an(unordered) subset ofrbox names with repetitionfrom among the nchoices of boxes.

    Thus there are C(r+n-1, r) = (r+n-1)!/r!(n-1)!

    distributions of the ridentical objects.

    Red Red Blue Blue Green Green Green

    ridenticalobjects

  • 8/2/2019 Integer Solutions

    5/20

    Tucker, Section 5.4 5

    Equivalent Forms for Selection with Repetition

    1. The number of ways to select robjects withrepetition from ndifferent types of objects.

    2. The number of ways to distribute ridenticalobjects into ndistinct boxes.

    3. The number of nonnegative integer

    solutions to x1+x2++xn=r.

    Red Red Blue Blue Green Green Green

    ridenticalobjects = 7

    7 = 2 + 2 + 3

  • 8/2/2019 Integer Solutions

    6/20

    Tucker, Section 5.4 6

    Ways to Arrange, Select, or Distribute r Objectsfrom nItems or into nBoxes

    Arrangement(order outcome)

    or

    Distribution ofdistinct objects

    Combination(unordered outcome)

    or

    Distribution ofidentical objects

    No repetition P(n,r) C(n,r)

    Unlimited Repetition nr C(n+r-1, r)

    Restricted Repetition P(n; r1, r2, , rm) -----

  • 8/2/2019 Integer Solutions

    7/20

    Tucker, Section 5.4 7

    Example 1 (pg. 203)

    How many ways are there to assign 100 differentdiplomats to 5 different continents? How manyways if 20 diplomats must be assigned to eachcontinent?

    Distribution ofdistinct objects

    Distribution ofidentical objects

    No repetition P(n,r) C(n,r)

    Unlimited Repetition nr C(n+r-1, r)

    Restricted Repetition P(n; r1, r2, , rm) -----

    For part one we want to use the distinct objects with unlimitedrepetition model from below.For the second part we want to use the distinct objects withrestricted repetition model from below.

  • 8/2/2019 Integer Solutions

    8/20

    Tucker, Section 5.4 8

    Example 1 (Continued)

    These are distinct objects according to the modelfor distributions. Following that model that means itequals the number of sequences of length 100 involving5 continents.

    5

    100

    sequences.If you add the constraint of assigning 20

    diplomats to each continent, that means that eachcontinent name should appear 20 times in a sequence.

    You can do this P(100; 20, 20, 20, 20, 20) =100!/(20!)5 ways.

  • 8/2/2019 Integer Solutions

    9/20

  • 8/2/2019 Integer Solutions

    10/20

    Tucker, Section 5.4 10

    Example 2 (continued)

    A simpler answer to the question, what is theprobability that West has all 13 spades, can be directlyobtained by looking at Wests possible hands alone.

    So the unique hand of 13 spades has the probability

    of1/C(52,13).

    There are P(52; 13, 13, 13, 13) distributions ofthe 52 cards into 13-card hands.

    Distributions in which West gets all the spades may becounted as the ways to distribute West all the spades, 1

    way, times the ways to distribute the 39 non-spade cardsamong the 3 other hands, P(39; 13, 13, 13) ways.

    39!(13!)3

    52!(13!)4

    =152!

    13!39!=1 ( )

    5213

  • 8/2/2019 Integer Solutions

    11/20

    Tucker, Section 5.4 11

    Example 2 (Continued)

    What is the probability that each player has one Ace?

    To count the ways that each player gets oneAce, we divide the distribution into and Ace part, 4!

    ways to arrange the 4 Aces among the 4 players, anda non-Ace part, P(48; 12, 12, 12, 12) ways todistribute the remaining 48 non-Ace cards. So theprobability that each player gets an Ace is:

    4!48! 52! 13!4 4!48!

    (12!)4 (13!)4 12!4 52!= x = 134 ( )524 =0.105

  • 8/2/2019 Integer Solutions

    12/20

    Tucker, Section 5.4 12

    Example 3 (Pg. 204)

    Show that the number of ways to distribute ridentical balls into ndistinct boxes with at leastone ball in each box is C(r-1, n-1). With at least r1balls in the first box, at least r

    2balls in the second

    box, , and at least rnballs in the nth box, the

    number is C(r- r1 - r2 -- rn+ n 1, n-1).Distribution ofdistinct objects

    Distribution ofidentical objects

    No repetition P(n,r) C(n,r)

    Unlimited Repetition nr C(n+r-1, r)

    Restricted Repetition P(n; r1, r2, , rm) -----

  • 8/2/2019 Integer Solutions

    13/20

    Tucker, Section 5.4 13

    Example 3 (continued)The requirement of at least one ball in each box can

    be though of as a section-with-repetition model. First wewant to put one ball in each box. Now it remains to countthe ways to distribute with our restriction the remaining r-

    nballs into the nboxes. You can do this in

    C((r-n)+n-1, (r-n)) =[(r-n)+n-1]!

    (r-n)!(n-1)!= C(r-1, n-1) ways.

    In the case where at least riballs must be in the ith box, we

    first put riballs into the ith

    box, and then distribute theremaining rr1r2 - - rnballs in any way into the n boxes.

    There are C((r-r1-r2--rn)+n-1, (r-r1-r2--rn))

    = C((r-r1-r2--rn) +n-1, n-1) ways.

  • 8/2/2019 Integer Solutions

    14/20

    Tucker, Section 5.4 14

    Example 4 (Pg. 204)

    How many integer solutions are there tothe equation x1 + x2 + x3 + x4 = 12, withxi > 0? How many solutions with xi >

    1? How many solutions with x1 > 2, x2> 2, x3 > 4, x4 > 0?

    Distribution ofdistinct objects

    Distribution ofidentical objects

    No repetition P(n,r) C(n,r)

    Unlimited Repetition nr C(n+r-1, r)

    Restricted Repetition P(n; r1, r2, , rm) -----

  • 8/2/2019 Integer Solutions

    15/20

    Tucker, Section 5.4 15

    Example 4 (Continued)

    By an integer solution to this problem we mean anordered set of integer values for the xis summing to 12,

    such as x1 = 2, x2 = 3, x3 = 3, x4 = 4.

    We can model this problem as a distribution as adistribution-of-identical-objects problem or as aselection-with-repetition problem.

    Let xirepresent the number of (identical) objects inbox ior the number of objects of type ichosen. Usingeither of these models, we see that the number ofinteger solutions is C(12+4-1, 12) = 455.

    How many integer solutions are there to theequation x1 + x2 + x3 + x4 = 12, with xi > 0?

  • 8/2/2019 Integer Solutions

    16/20

    Tucker, Section 5.4 16

    Example 4 (Continued)

    Solutions withxi> 1 correspond in these models toputting at least one object in each box or choosing atleast one object of each type.

    Solution withx1>2,x2>2,x3>4,x4>0 correspondto putting at least 2 objects in the first box, at least 2 inthe second, and at least 4 in the third, and any number inthe fourth.

    You can use the selection-with-repetition model. Theanswer for xi> 1 is C(12-1, 4-1) = 165 and the otheranswer is C((12-2-2-4)+4-1, 4-1) = C(7,3) = 35.

  • 8/2/2019 Integer Solutions

    17/20

    Tucker, Section 5.4 17

    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?

    Distribution ofdistinct objects

    Distribution ofidentical objects

    No repetition P(n,r) C(n,r)

    Unlimited Repetition nr C(n+r-1, r)

    Restricted Repetition P(n; r1, r2, , rm) -----

    Hint:

  • 8/2/2019 Integer Solutions

    18/20

    Tucker, Section 5.4 18

    Class Problem 1

    Use the identical objects model for distribution. Theways to distribute 20 identical sticks of red among 5children equals the ways to select a collection of 20 names

    (or destinations) from a set of 5 different names withrepetition. There are C(20+5-1, 20) = 10,626 ways.

    Use the same modeling argument to distribute the 15identical sticks of black. There are C(15+5-1, 15) = 3,876

    ways. The product of these is the number of ways to distributethe red and the black licorice. 10,626 x 3,876 = 41,186,376

  • 8/2/2019 Integer Solutions

    19/20

    Tucker, Section 5.4 19

    Class Problem 2How many binary sequences of length 10 are

    there consisting of a (positive) number of 1s,followed by a number of 0s, followed by a numberof 1s, followed by a number of 0s? An example

    would be 1110111000.

    Distribution ofdistinct objects

    Distribution ofidentical objects

    No repetition P(n,r) C(n,r)Unlimited Repetition nr C(n+r-1, r)

    Restricted Repetition P(n; r1, r2, , rm) -----

    Hint:

  • 8/2/2019 Integer Solutions

    20/20

    Tucker, Section 5.4 20

    Class Problem 2First create four distinct boxes, the first box for the initialset of 1s, the second box for the following set of 0s, and soon. Then we have 10 identical markers ( call them xs) todistribute into the four boxes. Each box must have at least

    one marker, since each subsequence of 0s or of 1s must benonempty. The number of ways to distribute 10 xs into 4boxes with no box empty is C(10-1, 4-1) = 84. So thereare 84 such binary sequences.

    In other words put a 1 or a 0 in each box, which leaves 6symbols that need to be put into 4-1 dividers.

    1 0 1 0 C(6+4-1, 4-1)