Generalized Permutations & Combinations

Textbook
Rosen 8e, Section 6.5
Study day
Tuesday, Nov 10
Homework
Written HW 9: 1–13 odd, 14–17, 20, 32–38, 64–68
Progress
Notes not read 0 / 25 problems graded

Now repetition is allowed, and some objects can be identical. Only subsections 6.5.1–6.5.4 are on the exam. Skip 6.5.5 (distributing objects into boxes).

The master table

The four counting formulas. Memorize this table.

Selecting items from types/objects:

No repetition Repetition allowed
Order matters
Order doesn't matter

Plus: arranging objects where are identical of type 1, …, identical of type :

Permutations with repetition

Theorem 1

The number of -permutations of a set of objects with repetition allowed is .

Each of the positions independently gets any of the objects (product rule). Example from class: strings of length over the 26 uppercase letters: .

Combinations with repetition (stars and bars)

Theorem 2

The number of -combinations from a set with elements with repetition allowed is

Stars and bars. Know why it works.

Represent a selection of items from types as stars and bars (dividers between the types). For example, with 4 types and 6 items:

Every arrangement of stars and bars is one selection, so the count is the number of ways to choose star positions among spots: .

Memory aid: or, equivalently, .

From class
  • 6-combinations of with repetition: .
  • 5 pieces of fruit from apples, oranges, pears: .
  • 8 bills from 7 denominations (1, 2, 5, 10, 20, 50, 100): .

Integer solutions of equations

Equations are stars and bars

The number of solutions of with every an integer is

( = how many items of type ; variables = types.)

From class: ,

.

Handling constraints
  • Lower bound : give to up front. Subtract from the total, then count normally.
  • Upper bound : complement. (All solutions) − (solutions with ).
  • Two upper bounds: inclusion–exclusion. All − (first violated) − (second violated) + (both violated).
  • Inequality : add a slack variable to make it .
with , , (textbook)

Give out first, leaving to distribute freely among 3 variables: .

with

All solutions: . Bad ones (): give 5 to , leaving 15: . Answer: .

Permutations with indistinguishable objects

Theorem 3

The number of different permutations of objects, where there are indistinguishable objects of type 1, of type 2, …, of type , is

Why: place the type-1 objects in ways, then type 2 in ways, and so on. The product telescopes to the formula. Equivalently: arrangements, but each is counted times because swapping identical letters changes nothing.

From class
  • SUCCESS (S×3, C×2, U, E): .
  • MISSISSIPPI (M×1, I×4, S×4, P×2): .
  • ABBCCCDDDDEEEEE: .
"Using some or all of the letters"

Split by length and by which letters are used (sum rule), applying to each case. Organize by how many copies of the repeated letter you use.

Bit strings are a special case

Bit strings with six 1s and eight 0s: . Two types of identical objects is just a binomial coefficient.

The multinomial theorem

Multinomial theorem
Multinomial facts
  • Coefficient of in (with ): .
  • Number of distinct terms in : . That's stars and bars, distributing the exponent among variables.

Which formula? A decision guide

Ask these in order
  1. Are some of the objects identical and you're arranging all of them (letters of a word)? Use .
  2. Does order matter?
    • Yes, with repetition: . Without: .
    • No, with repetition ("choose 12 donuts from 21 kinds", "solutions of "): . Without: .
  3. Constraints? Lower bounds: give them out first. Upper bounds: complement / inclusion–exclusion.
Common mistakes
  • Using when repetition is allowed. "Choose 3 donuts from 5 kinds" is , not .
  • Mixing up and in : = number of types, = number of items chosen.
  • Forgetting that "at least one of each" means subtract one per type first.

Exam checklist

  • Pick the right formula from the master table.
  • Stars and bars, including lower/upper bounds and (slack variable).
  • Rearrangements of words with repeated letters; "some or all of the letters" by cases.
  • Multinomial coefficients and number of terms.
Go to problems