Minimal Cyclic String Rotation
Eliminate cyclic starts until only the least rotation remains.
Free theory articleEliminate cyclic starts until only the least rotation remains.
Concept & interpretation
The minimal cyclic string rotation problem asks to find the lexicographically least rotation of a given word. For example, the word "baca" has rotations "baca", "acab", "caba", and "abac", with "abac" being the lexicographically smallest.
Experiment
In the interactive module (available at https://riano.app/module/minimal-cyclic-string-rotation), you can experiment with the algorithm:
- Select different preset words from the "Word preset" dropdown control.
- Observe the visualizer as it displays the doubled string and highlights the starting index (denoted as
k). - Test words with varying periodicity to see how the algorithm successfully eliminates inferior candidates.