# TAOCP 2.3.4 Basic Mathematical Properties of Trees (part 1)

> Study guide to TAOCP 2.3.4 Basic Mathematical Properties of Trees (part 1). Part 1 covers the first three subsections: free trees (connected graphs without…

Updated October 20, 2026.

## Summary {#summary}

TAOCP 2.3.4 Basic Mathematical Properties of Trees (part 1) covers the first three subsections: free trees (connected graphs without cycles) and spanning trees, including using Kirchhoff's law to count how often each part of a flowchart runs, oriented trees and directed graphs, and more. Budget about 7 hours; do exercises 2.3.4.1-2, 2.3.4.1-10 and 2.3.4.1-6.

Part 1 covers the first three subsections: free trees (connected graphs without cycles) and spanning trees, including using Kirchhoff's law to count how often each part of a flowchart runs; oriented trees and directed graphs, including Euler circuits; and the infinity lemma about infinite trees with finite branching.

## Key facts {#key-facts}

- Week 58 of 145 on the cracked.guide path, in [TAOCP Vol 1: Fundamental Algorithms](https://cracked.guide/taocp/volume-1).
- Time budget: about 7 hours.
- 49 exercises in the section, rated M10 to HM40; the guide picks 8.
- Picked exercises with Knuth's triangle for recommended: 2.3.4.1-6, 2.3.4.2-4, 2.3.4.2-7, 2.3.4.3-3 and 2.3.4.1-12.
- Before you start: 2.3.1 to 2.3.3 and 1.2.1 Mathematical Induction.

## Week 58 goals {#objectives}

By the end of week 58 you can:

- Explain the difference between free trees, oriented trees and spanning trees.
- Prove that a free tree with n vertices has exactly n - 1 edges.
- Recognize when a directed graph has an Eulerian circuit.

## This week's steps {#steps}

- Read §2.3.4 Basic Mathematical Properties of Trees (part 1): Draw lots of small graphs.
- Work the exercises (8 picked): Start with Ex 2.3.4.1-2, Ex 2.3.4.1-10, Ex 2.3.4.1-6; 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}

This week has 49 exercises across its subsections, rated M10 to HM40, and Knuth marks 18 of them with the triangle for recommended. Each subsection has its own set, so picks are numbered by subsection: 2.3.4.1 (free trees), 2.3.4.2 (oriented trees) and 2.3.4.3 (the infinity lemma). Many are proofs; pick a few and do them fully.

Worth your time:

- 2.3.4.1-2 (rated M20): Show any path can be trimmed down to a simple path.
- 2.3.4.1-10 (rated 16): Connect n terminals with as few wires as possible, and see why a spanning tree is the answer.
- 2.3.4.1-6 (rated M27, recommended): Pick a spanning tree out of an edge list efficiently, or report there is none.
- 2.3.4.2-4 (rated M20, recommended): Show a directed graph can be topologically sorted exactly when it has no oriented cycles.
- 2.3.4.2-7 (rated M22, recommended): Decide whether a condition in the definition of an oriented tree can be dropped.
- 2.3.4.2-10 (rated 22): Re-root a tree stored as a parent table.
- 2.3.4.3-3 (rated M23, recommended): Quadrant tiling versus plane tiling. An infinity lemma workout.
- 2.3.4.1-12 (rated 29, recommended): Turn a minimum spanning tree method into an implementable algorithm with real data structures. The stretch.

## Why it matters {#why}

This is the bridge between data-structure trees and graph theory. Spanning trees show up in networking, clustering and circuit design.

## Before you start {#before}

- 2.3.1 to 2.3.3
- 1.2.1 Mathematical Induction

## How to approach it {#approach}

Draw lots of small graphs. Prove to yourself that a tree on n vertices has n - 1 edges. Read 2.3.4.1 to 2.3.4.3 carefully; the infinity lemma is short but subtle.

## Common traps {#traps}

- Mixing up free trees (no root) and oriented trees (with a root and direction).

## Links {#links}

- [Knuth's TAOCP page (editions, errata, MIX/MMIX)](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
- [Vol 1 errata (plain text, from Knuth)](https://www-cs-faculty.stanford.edu/~knuth/err1.textxt)
- [Wikipedia: Tree (graph theory)](https://en.wikipedia.org/wiki/Tree_(graph_theory))
- [Wikipedia: Spanning tree](https://en.wikipedia.org/wiki/Spanning_tree)
- [Wikipedia: Konig's lemma](https://en.wikipedia.org/wiki/K%C5%91nig%27s_lemma)

---

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