# TAOCP Volume 1: Fundamental Algorithms

> Knuth's The Art of Computer Programming, Volume 1 (third edition, 1997, ISBN 0-201-89683-4), as studied on the cracked.guide path in weeks 29 to 63: 38 reading guides, 932 exercises, about 240 hours.

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.

## Every section, week by week

| Section | Week | Exercises | Picked | Hours |
| --- | --- | --- | --- | --- |
| [1.1 Algorithms](https://cracked.guide/guide/knuth-w017-0) | 29 | 9 (10 to M30) | 4 | 6 |
| [1.2.1 Mathematical Induction](https://cracked.guide/guide/knuth-w018-0) | 30 | 15 (05 to 50) | 8 | 6 |
| [1.2.2 Numbers, Powers, and Logarithms](https://cracked.guide/guide/knuth-w018-1) | 31 | 29 (00 to M30) | 8 | 4 |
| [1.2.3 Sums and Products](https://cracked.guide/guide/knuth-w019-0) | 32 | 47 (M00 to M30) | 8 | 8 |
| [1.2.4 Integer Functions and Elementary Number Theory](https://cracked.guide/guide/knuth-w020-0) | 33 | 49 (00 to HM46) | 8 | 7 |
| [1.2.5 Permutations and Factorials](https://cracked.guide/guide/knuth-w021-0) | 34 | 25 (00 to M28) | 8 | 5 |
| [1.2.6 Binomial Coefficients (part 1)](https://cracked.guide/guide/knuth-w022-0) | 35 | 68 (00 to HM35) | 8 | 7 |
| [1.2.6 Binomial Coefficients (part 2)](https://cracked.guide/guide/knuth-w023-0) | 36 | 68 (00 to HM35) | 8 | 8 |
| [1.2.7 Harmonic Numbers](https://cracked.guide/guide/knuth-w024-0) | 37 | 24 (01 to M33) | 8 | 4 |
| [1.2.8 Fibonacci Numbers](https://cracked.guide/guide/knuth-w024-1) | 38 | 42 (10 to M38) | 8 | 5 |
| [1.2.9 Generating Functions](https://cracked.guide/guide/knuth-w025-0) | 39 | 26 (M01 to M40) | 8 | 8 |
| [1.2.10 Analysis of an Algorithm](https://cracked.guide/guide/knuth-w026-0) | 40 | 23 (10 to HM38) | 8 | 7 |
| [1.2.11 Asymptotic Representations](https://cracked.guide/guide/knuth-w027-0) | 41 | 42 (HM01 to HM42) | 8 | 8 |
| [1.3.1 Description of MIX](https://cracked.guide/guide/knuth-w028-0) | 42 | 26 (00 to 32) | 8 | 7 |
| [1.3.2 The MIX Assembly Language](https://cracked.guide/guide/knuth-w029-0) | 43 | 23 (00 to M47) | 8 | 8 |
| [1.3.3 Applications to Permutations](https://cracked.guide/guide/knuth-w030-0) | 44 | 36 (02 to HM42) | 8 | 8 |
| [1.4.1 Subroutines](https://cracked.guide/guide/knuth-w031-0) | 45 | 7 (10 to 26) | 6 | 5 |
| [1.4.2 Coroutines](https://cracked.guide/guide/knuth-w031-1) | 46 | 7 (10 to 30) | 6 | 4 |
| [1.4.3 Interpretive Routines](https://cracked.guide/guide/knuth-w032-0) | 47 | 15 (10 to 40) | 8 | 8 |
| [1.4.4 Input and Output](https://cracked.guide/guide/knuth-w033-0) | 48 | 19 (05 to 40) | 8 | 4 |
| [1.4.5 History and Bibliography](https://cracked.guide/guide/knuth-w033-1) | 48 | 0 | 0 | 1 |
| [2.1 Introduction](https://cracked.guide/guide/knuth-w034-0) | 49 | 9 (04 to 23) | 7 | 3 |
| [2.2.1 Stacks, Queues, and Deques](https://cracked.guide/guide/knuth-w034-1) | 49 | 14 (00 to M48) | 7 | 5 |
| [2.2.2 Sequential Allocation](https://cracked.guide/guide/knuth-w035-0) | 50 | 19 (10 to HM43) | 8 | 7 |
| [2.2.3 Linked Allocation](https://cracked.guide/guide/knuth-w036-0) | 51 | 30 (10 to M48) | 8 | 9 |
| [2.2.4 Circular Lists](https://cracked.guide/guide/knuth-w037-0) | 52 | 18 (10 to M28) | 8 | 5 |
| [2.2.5 Doubly Linked Lists](https://cracked.guide/guide/knuth-w037-1) | 53 | 12 (20 to 40) | 7 | 7 |
| [2.2.6 Arrays and Orthogonal Lists](https://cracked.guide/guide/knuth-w038-0) | 54 | 24 (11 to 33) | 8 | 7 |
| [2.3.1 Traversing Binary Trees](https://cracked.guide/guide/knuth-w039-0) | 55 | 37 (00 to HM41) | 8 | 9 |
| [2.3.2 Binary Tree Representation of Trees](https://cracked.guide/guide/knuth-w040-0) | 56 | 22 (15 to M40) | 8 | 7 |
| [2.3.3 Other Representations of Trees](https://cracked.guide/guide/knuth-w041-0) | 57 | 19 (15 to 40) | 8 | 7 |
| [2.3.4 Basic Mathematical Properties of Trees (part 1)](https://cracked.guide/guide/knuth-w042-0) | 58 | 49 (M10 to HM40) | 8 | 7 |
| [2.3.4 Basic Mathematical Properties of Trees (part 2)](https://cracked.guide/guide/knuth-w043-0) | 59 | 54 (10 to HM40) | 8 | 8 |
| [2.3.5 Lists and Garbage Collection](https://cracked.guide/guide/knuth-w044-0) | 60 | 12 (00 to M30) | 8 | 9 |
| [2.4 Multilinked Structures](https://cracked.guide/guide/knuth-w045-0) | 61 | 15 (00 to 28) | 8 | 6 |
| [2.5 Dynamic Storage Allocation](https://cracked.guide/guide/knuth-w046-0) | 62 | 44 (00 to HM50) | 8 | 9 |
| [2.6 History and Bibliography](https://cracked.guide/guide/knuth-w047-0) | 63 | 0 | 0 | 1 |
| [Vol 1 review](https://cracked.guide/guide/knuth-w047-1) | 63 | 932 (00 to HM50) | 8 | 6 |

## 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

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.


## 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.

---

Source: https://cracked.guide/taocp/volume-1
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
