Puzzles and Brainteasers, lesson 9
Mixed puzzles, worked
Puzzles of every kind, and how to tell which method fits.
In an interview, a puzzle doesn't arrive with its lesson's name on it, and its story often points the wrong way. This lesson mixes puzzles from the whole module and practises one habit: name the method before you solve. Nothing here is new.
Part 1. Read what it asks for
Pick the method from what a question asks you to find, not from its story.
Guess first
12 coins look alike, and you have a balance. Each coin weighs 1, 2, 3 or 4 grams. Before any weighing, what's the largest number of coins you can promise share the same weight?
Example 1.1
Twelve coins, four weights
Find the most coins that must share a weight.
- Name the methoda promise about items in kinds: pigeonhole
"Promise" means the worst case, and coins sorted by weight are items in boxes, as in the pigeonhole lesson.
- Name the boxes4 weights, 4 boxes
Each coin drops into the box for its weight.
- Spread the coins evenly3 + 3 + 3 + 3 = 12
The worst case gives every weight 3 coins, so 4 alike can't be promised.
- Read the promise⌈12 / 4⌉ = 3
Some box holds at least 12 / 4 coins, rounded up.
AnswerSome 3 coins share a weight, and no more can be promised.
The unknown is what a question asks you to find: a number of items, a number of tests, a move, or a yes or no. Name it first, then pick the method that finds that kind of thing: items to be sure of a match point to pigeonhole, tests to tell cases apart to the counting bound.
The trap is matching on the story. Coins and a balance suggest 3 weighings, the answer to another question in the weighings lesson. A story is easy to change; what's asked for is what fixes the method.
Your turn
27 numbered boxes stand in a row, and one hides a ring. A helper who knows which answers yes-or-no questions. What's the fewest questions that always finds the ring?
Part 2. Ask what a move changes
Before searching a game, check whether every move changes some count by the same amount.
Keep going with Pro
You've done the first part. Pro opens the rest of this lesson, and every other one.
- Ask what a move changes
- Match the structure
- Chain two methods
Puzzles and Brainteasers overviewSpotted a mistake? Tell us.