Quoto

Courses / Brainteaser patterns

Parity and pigeonhole

9 cards3 min readBrainteasers

Card 1 of 9
  1. Idea: Plan for the worst case

    A guarantee is the number that works against the unluckiest order, not the likely one.

    • items in boxes with : some box holds
    • To force in one box, beat in every box
    • The bad spread must be possible
  2. Formula: Pigeonhole

    Items that force m into one of k boxes: fill every box to m − 1, then take 1 more.

  3. Example: Ties in the dark

    A drawer holds blue, black and grey ties, lights off. How many guarantee of one colour?

    1. Worst grab without a pair: one tie of each colour
    2. That is ties, so
  4. Quick check: When a colour runs short

    A bag has red and white balls. How many draws guarantee of one colour?

    Show the answer

    Answer:

    Red cannot supply : the worst case is draws, so .

  5. Common mistake: Answering with the likely case

    "Usually draws are enough" is not a guarantee.

    Instead Give the number that beats the unluckiest order, and check every box in the bad spread can really fill.

  6. Idea: Parity rules things out

    Odd or even rarely gives the answer, but it rules out half the candidates at once.

    • A knight changes square colour on every move
    • Each handshake adds to counts, so the total is even
    • guests cannot each shake hands: is odd
  7. Example: The locker puzzle

    closed lockers. For each from to , a student toggles every multiple of . How many end open?

    1. Locker is toggled once per divisor of
    2. Divisors pair up as and : an odd count only for squares
    3. Squares up to , since : open
  8. Quick check: 3 cards in 2 suits

    How many cards from a card deck guarantee cards in each of different suits?

    Show the answer

    Answer:

    The worst hand fills one suit and keeps the rest at : cards, plus one.

  9. Idea: Build the worst case aloud

    Say "I can take this many without succeeding", then add .

    • Check each box in the bad spread has enough items
    • Watch the worst case change shape when the target changes
    • For parity, name the quantity whose oddness is fixed