# TAOCP 5.1.1 Inversions

> Week 90 of the cracked.guide path: Knuth 5.1.1 Inversions.

Week 90 of 145 on cracked.guide, in TAOCP Vol 3: Sorting and Searching: TAOCP 5.1.1 Inversions. The reading guides budget about 7 hours.

## Key facts {#key-facts}

- [TAOCP 5.1.1 Inversions](https://cracked.guide/guide/knuth-w073-0): An inversion is a pair of elements that are out of order.
- Phase: TAOCP Vol 3: Sorting and Searching, weeks 90 to 117.
- Updated October 20, 2026.

## By the end of this week you can {#objectives}

- Compute the inversion table of a permutation and convert it back.
- Explain why the inversion table determines the permutation uniquely.
- Implement inversion counting in O(n log n) with a modified merge sort.

## This week's tasks {#tasks}

- [TAOCP 5.1.1 Inversions](https://cracked.guide/guide/knuth-w073-0): about 7 hours

Previous: [Week 89](https://cracked.guide/curriculum/week/89) · Next: [Week 91](https://cracked.guide/curriculum/week/91)

---

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