# Zaks's suffix-reversal algorithm for generating permutations

DevFeed: [Zaks's suffix-reversal algorithm for generating permutations](<https://devfeed.tech/articles/an-elegant-formulation-inspired-by-the-one-and-only-paper-bill-gates-ever-wrote-37563.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/aboulafia/2026/07/06/an-elegant-formulation-inspired-by-bill-gates.html>)

Author: Yehonathan Sharvit

Published: 2026-07-06T08:00:00Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [aboulafia](<https://devfeed.tech/tags/aboulafia.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [math](<https://devfeed.tech/tags/math.md>), [permutations](<https://devfeed.tech/tags/permutations.md>), [reversing](<https://devfeed.tech/tags/reversing.md>), [sequence](<https://devfeed.tech/tags/sequence.md>), [sorting](<https://devfeed.tech/tags/sorting.md>)

## AI overview

This second article in a series connects Aboulafia's recursive Tserouf permutation algorithm with Shimon Zaks's 1984 algorithm. It explains how Zaks generates permutations by repeatedly reversing suffixes and describes the recursive sequence of suffix lengths behind the ordering.

## Source excerpt

Aboulafia's Tserouf - Part 2 of 4 <- Previous: An algorithm ignored for 700 years - Next: Too big to draw, but yet drawable ->