Combinations with repetitions allowed - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Combinations with repetitions allowed

Description:

... the space to the right of the rightmost bar. Then write zero or more stars in each space, such that the total number of stars is r, ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 7
Provided by: yye3
Category:

less

Transcript and Presenter's Notes

Title: Combinations with repetitions allowed


1
Combinations with repetitions allowed
  • Red, green and blue cubes are given. There are at
    least five cubes of each of the above colors. In
    how many ways can a selection of five cubes be
    made, such that selecting zero or more cubes of
    the same color is allowed?
  • This is the problem of combinations with
    repetitions allowed.

2
  • There are n distinct types of objects. In how
    many ways can r objects be selected, such that
    each object is of one of the above n types, and
    zero or more objects of each of the above types
    may be selected?
  • Solution Write down a line of n-1 bars.
  • (For example if n3, the line will be ).
  • Those bars create n spaces from left to
    right the space to the left of the leftmost bar,
    followed by the space between the first and the
    second bar, etc., and finally the space to the
    right of the
  • rightmost bar.

3
  • Then write zero or more stars in each space,
  • such that the total number of stars is r,
  • Thus creating a row of n-1 bars and r stars.
  • Each combination as described above can be
  • uniquely represented by such a row
  • Number the n spaces 1,, n from left to right.
  • Then the number of stars in the jth space
    represents the number of objects of type j
    selected.
  • Example n3, r5,
  • ? ? ? ? ? 1 object of type 1, 1 of type
    2, 3 of type 3
  • ? ? ? ? ? zero objects of type 1, 1 object
    of type 2, 4 objects of type 3.

4
  • So the number of combinations described above is
    equal to the number of rows of n-1 bars and r
    stars. Such a row has nr-1 characters, and is
    specified by selecting the locations of the r
    stars out of the nr-1 locations. Therefore, the
    number of such rows is C(nr-1,r), and this is
    also the number of combinations with repetitions
    allowed.
  • In the above problem about red, green, and
    blue cubes, n3 and r5. The solution is
    C(nr-1,r)C(7,5)21.

5
  • The problem of combinations with repetitions
    allowed with given n and r is equivalent to the
    following problem
  • How many solutions are there to the equation
  • x1 xn r
  • such that each xi is a non negative integer?
  • xi represents the number of objects of type
    i
  • selected.

6
  • Example How many solutions does the equation
  • x1x2x3 5 have such that x1, x2, x3 are
    non negative integers.
  • Solution Here n3 and r5, so the answer is
  • C(nr-1,r)C(7,5)21.
  • Example How many solutions does the equation
    x1x2x3 8 have such that x1, x2, x3 are
    integers, x1?1, x2 ? 0, x3 ?2 ?
  • Solution Use the above correspondence between
    solutions of the equation and selecting r objects
    given n types of objects. Since 3 objects (one of
    type 1 and two of type 3 were already selected, 5
    more have to be selected. So r5, and the answer
  • is C(nr-1,r)C(7,5)21.
Write a Comment
User Comments (0)
About PowerShow.com