Quant Memo
Core

Thinking in a Different Base

Numbers written in base 10 are just one convention among many — switching to base 2, base 3, or another base is a genuine problem-solving tool, turning weighing puzzles, balance problems, and coin-encoding questions into simple digit-by-digit arithmetic.

With a balance scale and weights of 1, 3, 9, and 27 units, you can weigh out any integer amount from 1 to 40 units — placing weights on either the same pan as the object or the opposite pan. Why do exactly those four weights work, and why powers of 3 rather than powers of 2 or any other set? The answer is that this puzzle is really about writing numbers in base 3 using digits −1, 0, 1 — once you see that, the weight-placement rule falls out immediately.

The core idea: a base is just a fixed set of "denominations" with a place-value rule

Base 10 represents any number as a sum of powers of 10, each multiplied by a digit from 0–9: 347=3×100+4×10+7×1347 = 3 \times 100 + 4 \times 10 + 7 \times 1. Nothing about numbers requires base 10 — any base b2b \ge 2 works the same way, representing a number as a sum of powers of bb, each multiplied by a digit from 00 to b1b-1. Choosing a different base doesn't change the underlying number, only how it's written — but for certain puzzles, one base's digit structure matches the puzzle's rules so exactly that the answer becomes almost automatic.

Worked example 1: the balance-scale weights, in balanced base 3

Standard base 3 uses digits 0, 1, 2. Balanced base 3 instead uses digits −1, 0, 1 (often written 1ˉ,0,1\bar1, 0, 1), and every integer has a unique representation this way too. A digit of 1-1 in the balanced-base-3 representation means "place this weight on the same pan as the object" (subtracting from what the opposite pan needs to balance), a digit of 11 means "place this weight on the opposite pan" (adding to the balancing side), and a digit of 00 means "don't use this weight at all." For example, 2323 in balanced base 3: 23=2731=1×27+0×9+(1)×3+(1)×123 = 27 - 3 - 1 = 1\times27 + 0\times9 + (-1)\times3 + (-1)\times1, i.e. digits (1,0,1,1)(1, 0, -1, -1). To weigh a 23-unit object: put the 27-weight and the object's pan needs balancing — place the 27-weight on the opposite pan, and the 3-weight and 1-weight on the same pan as the object (since 2731=2327 - 3 - 1 = 23). Every integer from 1 to 40 has such a representation using only the weights 1, 3, 9, 27, because 1+3+9+27=401+3+9+27=40 and balanced base 3 with these four digit-positions covers exactly that range.

Worked example 2: base 2 and the poisoned-wine-style encoding puzzle

Recall the classic puzzle: identify one poisoned bottle among 1,000 using the fewest test rats, each rat reporting only sick/fine. Every bottle from 1 to 1000 gets a unique base 2 (binary) label using at most 10 digits, since 210=102410002^{10}=1024 \ge 1000. Assign one rat per binary digit position; each rat drinks from every bottle whose label has a 1 in that rat's assigned position. The pattern of which rats die, read as a binary number, directly gives the poisoned bottle's label — the puzzle is solved by recognizing that "identify one item using few reports, each report being a single digit" is exactly what a base-bb place-value system was built to do, with b=2b=2 matching the two-outcome (sick/fine) structure of each rat.

standard base 3 digits: 0, 1, 2 no natural balance-scale meaning balanced base 3 digits: -1, 0, 1 -1 = same pan, 0 = unused, 1 = opposite pan
Balanced base 3's three digit values map directly onto the three choices available for each weight on a balance scale, which is why powers of 3 (not 2 or 10) solve the weighing puzzle optimally.

Choosing the right base turns a puzzle's native structure (two outcomes per test, three choices per weight, etc.) into ordinary place-value arithmetic. Match the base to the number of distinct "moves" or "outcomes" available at each step of the puzzle, not automatically to base 10.

What this means in practice

Recognizing which base matches a puzzle's structure is a compact rehearsal of a broader skill: representing a problem in the coordinate system where it becomes easy, rather than forcing it to fit the default (usually decimal) representation. The same instinct shows up in choosing log returns over simple returns, or choosing a basis of eigenvectors over the standard basis for a covariance matrix — picking the representation where the structure of the problem becomes the structure of the arithmetic.

It's tempting to think base 3 (or any non-10 base) is just decimal numbers "translated," useful only as a curiosity. In balanced base 3, the digit values themselves (−1, 0, 1) carry direct physical meaning in the weighing puzzle — treating it as merely a different way to write the same number misses why that specific base is the one that makes the puzzle trivial.

Related concepts

Practice in interviews

Further reading

  • Niven, Zuckerman & Montgomery, An Introduction to the Theory of Numbers, ch. 1
ShareTwitterLinkedIn