TAOCP Vol 1: Fundamental Algorithms · Week 18
TAOCP 1.2.2 Numbers, Powers, and Logarithms: reading guide
A careful build-up of integers, rationals and reals, then powers with real exponents and logarithms in any base. It ends with practical ways to compute logarithms by hand-style methods.
Time About 4 hours this week
Why it matters
Logs are everywhere in complexity analysis, bit counts and data sizes. Knowing exactly how log base changes work, and why lg n and ln n differ only by a constant, makes big-O arguments feel obvious instead of magical.
Before you start
- High-school algebra
- Exponent rules
How to approach it
Skim the construction of the real numbers unless you enjoy it. Work through the logarithm identities with pencil and make a cheat sheet of lg, ln and log10 conversions. Try the method for computing a logarithm digit by digit on a small example.
Exercises
Do every exercise rated 00 to 20 in your head or on paper; they are quick and they check you actually absorbed the definitions. Then pick two or three rated 20 to 25 (M or not) and grind them out fully. Attempt one M25 to M30 and give yourself a hard 90-minute cap before reading the answer. Always read the answer to every exercise you attempted, even the ones you got, because Knuth's answers often teach a second technique.
Traps
- Mixing up lg (base 2), ln (base e) and log10. Knuth uses lg for base 2 throughout the series.
- Spending the whole week on the real-number construction. It is background, not the point.