Knuth · Weeks 29 to 63

TAOCP Volume 1: Fundamental Algorithms

Welcome to Knuth. Volume 1 starts with a big block of math (induction, sums, binomial coefficients, generating functions, asymptotics), then MIX, Knuth's imaginary computer and its assembly language, then the data structures everything else is built on: lists, trees, garbage collection and memory allocation. The math weeks are the hardest stretch of the whole path for most people. That is normal. Push through them and the rest of Knuth opens up.

35weeks
38reading guides
932exercises
~240hours

Every section, week by week

SectionWeekExercisesPickedTime
1.1 Algorithms299 (10 to M30)46 h
1.2.1 Mathematical Induction3015 (05 to 50)86 h
1.2.2 Numbers, Powers, and Logarithms3129 (00 to M30)84 h
1.2.3 Sums and Products3247 (M00 to M30)88 h
1.2.4 Integer Functions and Elementary Number Theory3349 (00 to HM46)87 h
1.2.5 Permutations and Factorials3425 (00 to M28)85 h
1.2.6 Binomial Coefficients (part 1)3568 (00 to HM35)87 h
1.2.6 Binomial Coefficients (part 2)3668 (00 to HM35)88 h
1.2.7 Harmonic Numbers3724 (01 to M33)84 h
1.2.8 Fibonacci Numbers3842 (10 to M38)85 h
1.2.9 Generating Functions3926 (M01 to M40)88 h
1.2.10 Analysis of an Algorithm4023 (10 to HM38)87 h
1.2.11 Asymptotic Representations4142 (HM01 to HM42)88 h
1.3.1 Description of MIX4226 (00 to 32)87 h
1.3.2 The MIX Assembly Language4323 (00 to M47)88 h
1.3.3 Applications to Permutations4436 (02 to HM42)88 h
1.4.1 Subroutines457 (10 to 26)65 h
1.4.2 Coroutines467 (10 to 30)64 h
1.4.3 Interpretive Routines4715 (10 to 40)88 h
1.4.4 Input and Output4819 (05 to 40)84 h
1.4.5 History and Bibliography481 h
2.1 Introduction499 (04 to 23)73 h
2.2.1 Stacks, Queues, and Deques4914 (00 to M48)75 h
2.2.2 Sequential Allocation5019 (10 to HM43)87 h
2.2.3 Linked Allocation5130 (10 to M48)89 h
2.2.4 Circular Lists5218 (10 to M28)85 h
2.2.5 Doubly Linked Lists5312 (20 to 40)77 h
2.2.6 Arrays and Orthogonal Lists5424 (11 to 33)87 h
2.3.1 Traversing Binary Trees5537 (00 to HM41)89 h
2.3.2 Binary Tree Representation of Trees5622 (15 to M40)87 h
2.3.3 Other Representations of Trees5719 (15 to 40)87 h
2.3.4 Basic Mathematical Properties of Trees (part 1)5849 (M10 to HM40)87 h
2.3.4 Basic Mathematical Properties of Trees (part 2)5954 (10 to HM40)88 h
2.3.5 Lists and Garbage Collection6012 (00 to M30)89 h
2.4 Multilinked Structures6115 (00 to 28)86 h
2.5 Dynamic Storage Allocation6244 (00 to HM50)89 h
2.6 History and Bibliography631 h
Vol 1 review63932 (00 to HM50)86 h

Each section links to its reading guide: what it covers, how to approach it, exercises picked from the book with their ratings, common traps and links. Picked is how many exercises the guide recommends; time is its budget for the week.

What you will be able to do

  • Analyze an algorithm exactly, not just in big-O: best case, worst case, average and variance.
  • Manipulate sums, binomial coefficients and generating functions with confidence.
  • Read and write assembly for a simple machine and count the cost of every instruction.
  • Implement linked structures, tree traversals, topological sort, a garbage collector and a malloc-style allocator from first principles.

Before you start

  • Finished Crafting Interpreters (you will see the same ideas again in 1.4.3, 2.3.5 and 2.5).
  • High-school algebra and comfort with proofs by induction (Week 0 math covers it).
  • Basic calculus helps for 1.2.9 and 1.2.11; you can skim the heaviest parts.
  • A MIX simulator such as GNU MDK.

Getting the book

The current edition is the third edition (1997), ISBN 0-201-89683-4.

TAOCP is not free. Vol 1, 3rd edition is about $64 new from InformIT (the publisher's store) and much less used. Borrow before you buy: many public and university libraries give you free access to O'Reilly Learning, which carries TAOCP; Libby/OverDrive and interlibrary loan (search WorldCat) work too. Older used editions are fine for Vols 1 to 3; section numbers barely changed. If you buy the eBook, get the PDF from InformIT. Knuth himself warns that the Kindle and ePUB versions mangle the math.

What you need has every option with prices, and which edition do I need covers the differences.

Tips

  • Read the front matter on exercise ratings before 1.1. You will use that scale for two years.
  • Keep a notebook of identities and tricks; you will refer back to it in every later volume.
  • Concrete Mathematics (Graham, Knuth, Patashnik) is the best companion if 1.2 feels too terse.
  • Expect to not finish every exercise. Nobody does. The guides tell you which ones matter.

Questions

How long does TAOCP Volume 1 take?

On the cracked.guide path it takes 35 weeks (weeks 29 to 63), about 8 months, and the reading guides budget about 240 hours in all.

How many exercises are in TAOCP Volume 1?

932 in the sections the path covers, rated 00 to HM50, and 273 of them carry Knuth's triangle for recommended. Each reading guide picks the ones worth your time.

Which edition of Volume 1 do I need?

The current one is the third edition (1997). Older used editions work for most of it; section numbers barely changed. Buy the PDF, not Kindle, if you want an eBook.