Lyndon word

Revision as of 02:34, 2 September 2024 by Inthar (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A Lyndon word is a nonempty word that is lexicographically strictly less than all of its other rotations. (A Lyndon word must be primitive by definition.)

Algorithm

The Lyndon rotation of a primitive word can be found using Booth's algorithm in O(n) time where n is the length of a word.