Quant

Brainteasers

The classic puzzles and the one idea behind each: count the information a weighing gives, set up the right equation, work backwards, and never trust the fast answer.

7 concepts9 min read25-question test, from a bank of 36Updated

Concept 1 of 71 min

Weighings and information

The rule
Each weighing on a two-pan balance has 3 outcomes, so k weighings can tell apart at most 3k cases.
Worked examples

12 coins, 1 fake

Given
Coins12
Fakeheavier or lighter
Pan outcomes3
  1. Cases = 12 × 2 = 24
  2. 2 weighings: 32 = 9, too few
  3. 3 weighings: 33 = 27, enough

Each weighing has 3 outcomes, so 3 weighings are needed for 24 cases.

27 balls, 1 heavier

Given
Balls27
Pan outcomes3
  1. Weigh 9 against 9
  2. Then 3 against 3
  3. Then 1 against 1

Each weighing divides the suspects by 3, so 3 weighings find the ball.

The picture
Formula
Cases separable=3weighings
= 2tests
weights 1, 3, 9, 27 … weigh up to their sum
Why it holds

Each yes-or-no test has 2 outcomes, so k tests tell apart at most 2k.

Weights that can go on either pan count as −1, 0 or +1, which lets powers of 3 weigh every whole amount up to their sum. Count the cases first: 12 coins with one fake, heavier or lighter, make 24 cases, so 3 weighings, with 27 outcomes, can be enough and 2, with 9, cannot. Splitting into thirds uses all 3 outcomes; splitting in halves wastes one.

To find a poisoned bottle among many with tests that all report at once, number the bottles in binary and give each test one bit: the tests that react spell the bottle's number.

Watch out
  • Splitting in halves, which wastes the balance's third outcome.
  • Forgetting that a fake can be heavier or lighter, which doubles the cases.
  • Testing bottles one at a time instead of encoding them.
In the interview
  1. Among 8 balls one is heavier. What is the fewest weighings that always finds it, and how?

    A complete answer covers

    • A balance gives 3 outcomes, so 2 weighings separate up to 9 cases: enough for 8.
    • Weigh 3 against 3: if equal, the heavy one is among the other 2.
    • Then weigh the remaining candidates 1 against 1.
    • So 2 weighings, not 3.

Also in our technical interviews, on camera, with a score.

Concept 2 of 71 min

Clock hands

The rule
The hour hand moves 0.5° a minute and the minute hand 6°, so at H:M the angle is |30 × H − 5.5 × M|.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 3 of 71 min

Handshakes, squares and paths

The rule
n people shaking hands once make n × (n − 1) ÷ 2 handshakes, and the shortest paths across an a × b grid number C(a + b, a).

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 4 of 71 min

Number tricks: zeros, last digits, sums, divisors

The rule
The trailing zeros of n! equal its factors of 5, counted once per multiple of 5, again per multiple of 25, and so on.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 5 of 71 min

Equations that beat the fast answer

The rule
Puzzles built to tempt a fast answer are solved by writing the equation: an average speed over equal distances is the harmonic mean.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 6 of 71 min

Strategy puzzles: bridges, eggs, horses, doors

The rule
Strategy puzzles reward using every piece of information, such as switching doors when the host's choice carries information.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Concept 7 of 71 min

AdvancedEgg drops: count the floors a number of drops covers

The rule
With e eggs and d drops you can test up to C(d, 1) + C(d, 2) + … + C(d, e) floors.

The why, the charts, the worked example and the interview questions are in Essentials, with every quiz.

See the plansSign in

Recap

  • A balance has 3 outcomes: k weighings separate up to 3k cases; k yes/no tests separate 2k.
  • Clock hands: the angle is |30 × hours − 5.5 × minutes|; the hands meet 11 times in 12 hours.
  • Pairs among n people: n × (n − 1) ÷ 2; squares on an n × n board: 1² + … + n²; shortest grid paths: a binomial coefficient.
  • Trailing zeros of n! count the factors of 5; last digits of powers cycle.
  • Write the equation before answering: bat and ball, ages, average speeds and doubling all punish the fast answer.
Now test it

25 questions on Brainteasers

Timed, like the real one, drawn from a bank of 36. Every answer explained.

Test yourself →