# TAOCP 5.4.4 Reading Tape Backwards

> Study guide to TAOCP 5.4.4 Reading Tape Backwards. Merge patterns that avoid rewinding by reading tapes backward, which flips the order of runs and changes…

Updated October 20, 2026.

## Summary {#summary}

TAOCP 5.4.4 Reading Tape Backwards: Merge patterns that avoid rewinding by reading tapes backward, which flips the order of runs and changes the bookkeeping. Budget about 3 hours; do exercises 6, 1 and 3.

## Key facts {#key-facts}

- Week 104 of 145 on the cracked.guide path, in [TAOCP Vol 3: Sorting and Searching](https://cracked.guide/taocp/volume-3).
- Time budget: about 3 hours.
- 26 exercises in the section, rated 07 to M46; the guide picks 8.
- Picked exercises with Knuth's triangle for recommended: 3, 11, 19, 20, 5 and 17.
- Before you start: 5.4.2 The Polyphase Merge.

## Week 104 goals {#objectives}

By the end of week 104 you can:

- Explain why reading a tape backward reverses each run's order.
- Recognize how backward reading removes rewind time between phases.
- Explain how the oscillating sort interleaves run creation and merging.

## This week's steps {#steps}

- Read §5.4.4 Reading Tape Backwards: Skim for the idea.
- Work the exercises (8 picked): Start with Ex 6, Ex 1, Ex 3; 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 section has 26 exercises, rated 07 to M46, and Knuth marks 7 of them with the triangle for recommended. The second half of this section (Karp's tree model of merge patterns, fifo and lifo trees) is the lasting idea; do 19 and 20 to see it. 10 and 14 are big projects, and 16 and 26 are research problems.

Worth your time:

- 6 (rated 07): Convert a merge pattern from tree form to vector form.
- 1 (rated 17): How to adapt end-of-run sentinels when reading tapes backward.
- 3 (rated 20, recommended): Show read-backward polyphase ends with an ascending run on the right tape.
- 11 (rated 20, recommended): True or false: backward-reading merges must alternate ascending and descending runs.
- 19 (rated 22, recommended): Find a binary tree that is not 3-fifo. Gets you into Karp's model.
- 20 (rated 22, recommended): State the strongly-fifo condition as a rule about tape labels.
- 5 (rated 23, recommended): Redo the polyphase merge-number formulas for reading backward.
- 17 (rated 28, recommended): Design an initial distribution for read-backward cascade that ends in ascending order. The stretch.

## Why it matters {#why}

Honest note: the tape-merging sections describe hardware nobody uses anymore. Knuth himself says much of 5.4 is historical. The ideas (run generation, merge patterns, minimizing passes over slow storage) still apply to external sorting on disks and SSDs, database sort operators and big-data shuffles, so read for those ideas and skim the tape mechanics.

## Before you start {#before}

- 5.4.2 The Polyphase Merge

## How to approach it {#approach}

Skim for the idea. Use the spare time on 5.4.1 or on earlier Vol 3 exercises.

## Links {#links}

- [Knuth's TAOCP page (editions, errata, MIX/MMIX)](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
- [Vol 3 errata (plain text, from Knuth)](https://www-cs-faculty.stanford.edu/~knuth/err3.textxt)
- [Wikipedia: External sorting](https://en.wikipedia.org/wiki/External_sorting)

---

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