Combinatorics on words studies finite and infinite sequences of symbols from an alphabet, especially repetition, ordering and occurrence of shorter words. A finite word is an element of the free monoid generated by its alphabet, with concatenation as its operation. For example,
abab has two occurrences of ab and is the square of ab; aba is a palindrome. These questions connect algorithms on words with generating functions and symbolic descriptions of dynamical systems.For a word over a totally ordered alphabet, an inversion of a word is a pair of positions with . Equal symbols contribute no inversion of a word. In
baba, with , the pairs are , so the word inversion number is three. Counting these pairs records distance from sorted order even when letters repeat; replacing the letters by distinct ordered labels gives the inversion of a permutation case.The number of inversions of a word: pairs of positions with . Unlike an inversion of a permutation, this definition permits repeated letters in the word.
For slope and intercept , the lower mechanical word has letters . These letters are zero or one. Replacing floors by ceilings defines the upper mechanical word. An irrational slope gives a Sturmian word.
The floor-based mechanical word .
A nonempty finite word that is strictly smaller in lexicographic order than each of its nontrivial cyclic rotations. For example, is a Lyndon word, whereas is not because its rotation is smaller.
A prefix of a word that is itself a Lyndon word. The longest Lyndon prefix is useful when ranking necklaces and substrings of a De Bruijn sequence.
Articles by others on the same topic
Combinatorics on words is a branch of combinatorial mathematics that deals with the study of words and sequences formed from a finite alphabet. It involves analyzing the properties, structures, and patterns of these sequences, exploring various aspects such as counting, arrangements, and combinatorial structures associated with words. This field intersects with other areas such as formal languages, automata theory, computer science, linguistics, and information theory.