Quoto

Courses / Combinatorics for interviews

Repeats, chips and dividers

9 cards2 min readCombinatorics

Card 1 of 9
  1. Idea: Label the copies, then forget the labels

    Make repeated letters distinct, count, then divide by the orders of the copies.

    • : labelled orders
    • Each word comes from of them
    • Words:
  2. Formula: Words with repeats

    n letters with repeat counts a, b, c. A letter used once adds 1! = 1.

  3. Example: The letters of

    How many different strings use all the letters of ?

    1. letters: and appear twice each
    2. Strings:
  4. Formula: Chips and dividers

    n identical items in b different boxes, empty boxes allowed: choose where the b − 1 dividers go.

  5. Example: 8 chips, 3 boxes

    Put identical chips into different boxes; a box may stay empty. How many ways?

    1. Picture: stars and dividers, symbols
    2. Choose the dividers:
  6. Idea: Minimums go first

    If every box needs at least chip, hand those out first.

    • chips left, no restriction
    • Count:
    • A maximum needs inclusion and exclusion instead
  7. Common mistake: The wrong kind of items

    Dividers need identical items and different boxes.

    Instead Distinct chips give . And boxes need dividers, not .

  8. Quick check: 6 chips, 4 boxes

    In how many ways can identical chips go into different boxes, empty boxes allowed?

    Show the answer

    Answer:

    chips and dividers: .

  9. Idea: Before you touch a formula

    Say what is identical, what is distinct, and whether boxes may be empty.

    • Those words pick the method
    • For a word, say what you divide out