# TAOCP Vol 4A review

> Study guide to TAOCP Vol 4A review. A review week for Volume 4A: Boolean functions, bitwise tricks, BDDs and generating combinatorial objects.

Updated October 20, 2026.

## Summary {#summary}

TAOCP Vol 4A review: A review week for Volume 4A: Boolean functions, bitwise tricks, BDDs and generating combinatorial objects. Budget about 5 hours; do exercises 7-111, 7.1.1-55 and 7.1.2-17.

## Key facts {#key-facts}

- Week 133 of 145 on the cracked.guide path, in [TAOCP Vol 4A: Combinatorial Algorithms, Part 1](https://cracked.guide/taocp/volume-4a).
- Time budget: about 5 hours.
- 1498 exercises in the section, rated M00 to 50; the guide picks 8.
- Picked exercises with Knuth's triangle for recommended: 7-111, 7.1.1-55, 7.1.2-17, 7.1.3-23, 7.1.4-218, 7.2.1.2-111, 7.2.1.4-64 and 7.2.1.6-25.
- Before you start: all of Vol 4A.

## Week 133 goals {#objectives}

By the end of week 133 you can:

- Recognize early combinatorial patterns like hexagrams and Genji-ko diagrams.
- Compare old lists of patterns with modern systematic generation orders.
- Use your Volume 4A generators to pick the right one for a task.

## This week's steps {#steps}

- Read §Vol 4A review: Collect your generators and bit-trick tests into one library.
- Work the exercises (8 picked): Start with Ex 7-111, Ex 7.1.1-55, Ex 7.1.2-17; log what you solve below.
- Write down one thing you'd explain to someone: A few sentences in your own words in Your notes: the idea, why it works, an example. 30 words ticks this.

## Exercises {#exercises}

Vol 4A has 1498 exercises in all, rated M00 to 50, and 452 of them carry Knuth's triangle for recommended. Use the week to finish ones you skipped, or try this harder mixed set, none of which appear in the weekly picks. Picks are referenced as section-number.

Worth your time:

- 7-111 (rated 25, recommended): Embed any graph in a regular graph of the same maximum degree with few extra vertices.
- 7.1.1-55 (rated 30, recommended): Recognize Horn functions in disguise by reducing the question to 2SAT.
- 7.1.2-17 (rated 25, recommended): Show any Boolean function can be computed with n+1 one-bit registers.
- 7.1.3-23 (rated 27, recommended): Represent nested parentheses as bit strings and step to the next one with bit tricks. Joins 7.1.3 with 7.2.1.6.
- 7.1.4-218 (rated 24, recommended): Apply BDDs and ZDDs to Langford pairs from the start of the chapter. Brings the volume full circle.
- 7.2.1.2-111 (rated M25, recommended): Study universal cycles of permutations, the permutation analog of de Bruijn cycles.
- 7.2.1.4-64 (rated 32, recommended): Generate partitions into powers of 2 looplessly.
- 7.2.1.6-25 (rated 30, recommended): Generate binary trees so that each step prunes one subtree and grafts it elsewhere.

## Why it matters {#why}

Vol 4B builds directly on backtracking over these objects, and bit tricks and BDD ideas return in dancing links and SAT.

## Before you start {#before}

- All of Vol 4A

## How to approach it {#approach}

Collect your generators and bit-trick tests into one library. Write a short summary of when to use BDDs.

## Links {#links}

- [Knuth's TAOCP page (editions, errata, MIX/MMIX)](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
- [Vol 4A errata (plain text, from Knuth)](https://www-cs-faculty.stanford.edu/~knuth/err4a.textxt)

---

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