length n, there is a regular expression of length O(n3) describing shift(L). See also Barrel shifter Circulant Lyndon word Necklace — an object like a tuple but for which circular shifts are considered equivalent. References Elementary mathematics Computer arithmetic