In mathematics, a factorisation of a free monoid is a sequence of subsets of words with the property that every word in the free monoid can be written as a concatenation of elements drawn from the subsets. The Chen–Fox–Lyndon theorem states that the Lyndon words furnish a factorisation. The Schützenberger theorem relates the definition in terms of a multiplicative property to an additive property.[clarification needed]
Let A∗ be the free monoid on an alphabet A. Let Xi be a sequence of subsets of A∗ indexed by a totally orderedindex setI. A factorisation of a word w in A∗ is an expression
with and . Some authors reverse the order of the inequalities.
Chen–Fox–Lyndon theorem
A Lyndon word over a totally ordered alphabet A is a word that is lexicographically less than all its rotations.[1] The Chen–Fox–Lyndon theorem states that every string may be formed in a unique way by concatenating a lexicographically non-increasing sequence of Lyndon words. Hence taking Xl to be the singleton set{l} for each Lyndon word l, with the index set L of Lyndon words ordered lexicographically, we obtain a factorisation of A∗.[2] Such a factorisation can be found in linear time and constant space by Duval's algorithm.[3] The algorithm[4] in Python code is:
defchen_fox_lyndon_factorization(s:list[int])->list[int]:"""Monoid factorisation using the Chen–Fox–Lyndon theorem. Args: s: a list of integers Returns: a list of integers """n=len(s)factorization=[]i=0whilei<n:j,k=i+1,iwhilej<nands[k]<=s[j]:ifs[k]<s[j]:k=ielse:k+=1j+=1whilei<=k:factorization.append(s[i:i+j-k])i+=j-kreturnfactorization
Hall words
The Hall set provides a factorization.[5]
Indeed, Lyndon words are a special case of Hall words. The article on Hall words provides a sketch of all of the mechanisms needed to establish a proof of this factorization.
Bisection
A bisection of a free monoid is a factorisation with just two classes X0, X1.[6]