260
Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical Sciences Murdoch University, Perth, Australia [email protected] http://amyglen.wordpress.com Mini-Conference “Combinatorics, representations, and structure of Lie type” The University of Melbourne February 16–17, 2012 Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 1

Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

  • Upload
    lytram

  • View
    233

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Combinatorics of Lyndon words

Amy Glen

School of Chemical & Mathematical Sciences

Murdoch University, Perth, Australia

[email protected]://amyglen.wordpress.com

Mini-Conference“Combinatorics, representations, and structure of Lie type”

The University of Melbourne

February 16–17, 2012Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 1

Page 2: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 001001001001001001001001001001 · · ·

1100111100011011101111001101110010111111101 · · ·

100102110122220102110021111102212222201112012 · · ·

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 3: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.↑01001001001001001001001001001 . . .

1100111100011011101111001101110010111111101 · · ·

100102110122220102110021111102212222201112012 · · ·

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 4: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1100111100011011101111001101110010111111101 · · ·

100102110122220102110021111102212222201112012 · · ·

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 5: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1.↑100111100011011101111001101110010 . . .

100102110122220102110021111102212222201112012 · · ·

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 6: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1.100111100011011101111001101110010 . . . = ((1 +√

5)/2)2

100102110122220102110021111102212222201112012 · · ·

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 7: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1.100111100011011101111001101110010 . . . = ((1 +√

5)/2)2

10.↑0102110122220102110021111102212222201112012 . . .

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 8: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1.100111100011011101111001101110010 . . . = ((1 +√

5)/2)2

10.0102110122220102110021111102212222201112012 . . . = (π)3

1121212121212 · · ·

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 9: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1.100111100011011101111001101110010 . . . = ((1 +√

5)/2)2

10.0102110122220102110021111102212222201112012 . . . = (π)3

[1; 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, . . .] =√

3

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 10: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Words

By a word, I mean a finite or infinite sequence of symbols (letters) taken from anon-empty finite set A (alphabet).

Examples:

001

(001)∞ = 0.01001001001001001001001001001 . . . = (2/7)2

1.100111100011011101111001101110010 . . . = ((1 +√

5)/2)2

10.0102110122220102110021111102212222201112012 . . . = (π)3

[1; 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, . . .] =√

3

The study of combinatorial properties of words, known as combinatorics on

words (MSC: 68R15), has connections to many modern, as well as classical, fieldsof mathematics with applications in areas ranging from theoretical computerscience (from the algorithmic point of view) to molecular biology (DNAsequences).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 2

Page 11: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 12: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 13: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Formally, under the operation of concatenation, the set A∗ of allfinite words over A is a free monoid with identity element ε (theempty word) and set of generators A.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 14: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Formally, under the operation of concatenation, the set A∗ of allfinite words over A is a free monoid with identity element ε (theempty word) and set of generators A.

The set of non-empty finite words over A is the free semigroupA+ := A∗ \ {ε}.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 15: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Formally, under the operation of concatenation, the set A∗ of allfinite words over A is a free monoid with identity element ε (theempty word) and set of generators A.

The set of non-empty finite words over A is the free semigroupA+ := A∗ \ {ε}.

It follows immediately that the mathematical research of wordsexploits two features: discreteness and non-commutativity.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 16: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Formally, under the operation of concatenation, the set A∗ of allfinite words over A is a free monoid with identity element ε (theempty word) and set of generators A.

The set of non-empty finite words over A is the free semigroupA+ := A∗ \ {ε}.

It follows immediately that the mathematical research of wordsexploits two features: discreteness and non-commutativity.

The latter aspect is what makes this field a very challenging one.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 17: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Formally, under the operation of concatenation, the set A∗ of allfinite words over A is a free monoid with identity element ε (theempty word) and set of generators A.

The set of non-empty finite words over A is the free semigroupA+ := A∗ \ {ε}.

It follows immediately that the mathematical research of wordsexploits two features: discreteness and non-commutativity.

The latter aspect is what makes this field a very challenging one.

Many easily formulated problems are difficult to solve . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 18: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words

In particular, connections with algebra are very deep.

Indeed, a natural environment of a finite word is a free monoid.

Formally, under the operation of concatenation, the set A∗ of allfinite words over A is a free monoid with identity element ε (theempty word) and set of generators A.

The set of non-empty finite words over A is the free semigroupA+ := A∗ \ {ε}.

It follows immediately that the mathematical research of wordsexploits two features: discreteness and non-commutativity.

The latter aspect is what makes this field a very challenging one.

Many easily formulated problems are difficult to solve . . . mainlybecause of the limited availability of mathematical tools to deal withnon-commutative structures compared to commutative ones.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 3

Page 19: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 20: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 21: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics, with the exception ofcombinatorial group theory which studies combinatorial problems onwords as representing group elements.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 22: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics, with the exception ofcombinatorial group theory which studies combinatorial problems onwords as representing group elements.

Early 1900’s: First investigations by Axel Thue (repetitions in words)

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 23: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics, with the exception ofcombinatorial group theory which studies combinatorial problems onwords as representing group elements.

Early 1900’s: First investigations by Axel Thue (repetitions in words)

1938: Marston Morse & Gustav Hedlund

Initiated the formal development of symbolic dynamics.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 24: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics, with the exception ofcombinatorial group theory which studies combinatorial problems onwords as representing group elements.

Early 1900’s: First investigations by Axel Thue (repetitions in words)

1938: Marston Morse & Gustav Hedlund

Initiated the formal development of symbolic dynamics.

This work marked the beginning of the formal study of words.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 25: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics, with the exception ofcombinatorial group theory which studies combinatorial problems onwords as representing group elements.

Early 1900’s: First investigations by Axel Thue (repetitions in words)

1938: Marston Morse & Gustav Hedlund

Initiated the formal development of symbolic dynamics.

This work marked the beginning of the formal study of words.

1960’s: Systematic study of words initiated by M.P. Schützenberger.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 26: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

There have been important contributions on “words” dating as farback as the beginning of the last century.

Many of the earliest contributions were typically needed as tools toachieve some other goals in mathematics, with the exception ofcombinatorial group theory which studies combinatorial problems onwords as representing group elements.

Early 1900’s: First investigations by Axel Thue (repetitions in words)

1938: Marston Morse & Gustav Hedlund

Initiated the formal development of symbolic dynamics.

This work marked the beginning of the formal study of words.

1960’s: Systematic study of words initiated by M.P. Schützenberger.

Recent developments in combinatorics on words have culminated inthe publication of three books by a collection of authors, under thepseudonym of M. Lothaire . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 4

Page 27: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

Lothaire Books

1 “Combinatorics on words”, 1983 (reprinted 1997)

2 “Algebraic combinatorics on words”, 2002

3 “Applied combinatorics on words”, 2005

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 5

Page 28: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

Lothaire Books

1 “Combinatorics on words”, 1983 (reprinted 1997)

2 “Algebraic combinatorics on words”, 2002

3 “Applied combinatorics on words”, 2005

In the introduction to the first edition, Roger Lyndon stated

“This is the first book devoted to broad study of the

combinatorics of words, that is to say, of sequences of symbols

called letters. This subject is in fact very ancient and has

cropped up repeatedly in a wide variety of subjects.”

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 5

Page 29: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

Lothaire Books

1 “Combinatorics on words”, 1983 (reprinted 1997)

2 “Algebraic combinatorics on words”, 2002

3 “Applied combinatorics on words”, 2005

In the introduction to the first edition, Roger Lyndon stated

“This is the first book devoted to broad study of the

combinatorics of words, that is to say, of sequences of symbols

called letters. This subject is in fact very ancient and has

cropped up repeatedly in a wide variety of subjects.”

Combinatorics on words has now become a very active and challengingfield in its own right.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 5

Page 30: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Background

Combinatorics on Words . . .

Combinatorics on Words

Number Theory

algebra

Free Groups, SemigroupsMatrices

RepresentationsBurnside Problems

Discrete

Dynamical Systems

TopologyTheoretical Physics

Theoretical

Computer Science

AlgorithmicsAutomata Theory

ComputabilityCodes

Logic

Probability Theory

Biology

DNA sequencing, Patterns

Discrete Geometry

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 6

Page 31: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 32: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 33: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 34: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Example

Consider the word w = aabac. This word has five distinct rotations:

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 35: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Example

Consider the word w = aabac. This word has five distinct rotations:

R0(w) = aabac

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 36: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Example

Consider the word w = aabac. This word has five distinct rotations:

R0(w) = aabac

R1(w) = abaca

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 37: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Example

Consider the word w = aabac. This word has five distinct rotations:

R0(w) = aabac

R1(w) = abaca

R2(w) = bacaa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 38: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Example

Consider the word w = aabac. This word has five distinct rotations:

R0(w) = aabac

R1(w) = abaca

R2(w) = bacaa

R3(w) = acaab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 39: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations

Given a word w = x1x2 · · · xn (with xi letters), the first rotation of w

is R(w) = x2 · · · xnx1.

So R(w) shifts w by one position to the left, R2(w) shifts by twopositions to the left, and so on . . .

By convention, w = R0(w), the 0-th (trivial) rotation of itself.

Example

Consider the word w = aabac. This word has five distinct rotations:

R0(w) = aabac

R1(w) = abaca

R2(w) = bacaa

R3(w) = acaab

R4(w) = caaba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 7

Page 40: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

A word w of length |w| has at most |w| distinct rotations.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 8

Page 41: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

A word w of length |w| has at most |w| distinct rotations.

More precisely, any word w can be uniquely expressed in the form

w = zp = zz · · · z︸ ︷︷ ︸

p times

where p ≥ 1 and z is a primitive word (i.e., not a positive integerpower of a shorter word).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 8

Page 42: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

A word w of length |w| has at most |w| distinct rotations.

More precisely, any word w can be uniquely expressed in the form

w = zp = zz · · · z︸ ︷︷ ︸

p times

where p ≥ 1 and z is a primitive word (i.e., not a positive integerpower of a shorter word).

Expressing a given word w in this way, it is easy to see that w hasexactly |w|/p (= |z|) distinct rotations

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 8

Page 43: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

A word w of length |w| has at most |w| distinct rotations.

More precisely, any word w can be uniquely expressed in the form

w = zp = zz · · · z︸ ︷︷ ︸

p times

where p ≥ 1 and z is a primitive word (i.e., not a positive integerpower of a shorter word).

Expressing a given word w in this way, it is easy to see that w hasexactly |w|/p (= |z|) distinct rotations (the length of its primitiveroot z).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 8

Page 44: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

A word w of length |w| has at most |w| distinct rotations.

More precisely, any word w can be uniquely expressed in the form

w = zp = zz · · · z︸ ︷︷ ︸

p times

where p ≥ 1 and z is a primitive word (i.e., not a positive integerpower of a shorter word).

Expressing a given word w in this way, it is easy to see that w hasexactly |w|/p (= |z|) distinct rotations (the length of its primitiveroot z).

In particular, we note that any primitive word w has exactly |w|distinct rotations.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 8

Page 45: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 46: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 47: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

R0(v) = abcabc

R1(v) = bcabca

R2(v) = cabcab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 48: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

R0(v) = abcabc

R1(v) = bcabca

R2(v) = cabcab

The rotations of a word w are also known as its circular shifts or conjugates.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 49: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

R0(v) = abcabc

R1(v) = bcabca

R2(v) = cabcab

The rotations of a word w are also known as its circular shifts or conjugates.

Two words x and y over A are said to be conjugate if there exist finitewords u and v such that x = uv and y = vu.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 50: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

R0(v) = abcabc

R1(v) = bcabca

R2(v) = cabcab

The rotations of a word w are also known as its circular shifts or conjugates.

Two words x and y over A are said to be conjugate if there exist finitewords u and v such that x = uv and y = vu.

Equivalently, x and y are conjugate if and only if there exists a word z suchthat xz = zy

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 51: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

R0(v) = abcabc

R1(v) = bcabca

R2(v) = cabcab

The rotations of a word w are also known as its circular shifts or conjugates.

Two words x and y over A are said to be conjugate if there exist finitewords u and v such that x = uv and y = vu.

Equivalently, x and y are conjugate if and only if there exists a word z suchthat xz = zy (that is, y = z−1xz).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 52: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Rotations . . .

Examples

1 From the previous example, aabac is a primitive word of length 5 having 5distinct rotations.

2 The word v = abcabc = (abc)2 has |v|/2 = 3 distinct rotations:

R0(v) = abcabc

R1(v) = bcabca

R2(v) = cabcab

The rotations of a word w are also known as its circular shifts or conjugates.

Two words x and y over A are said to be conjugate if there exist finitewords u and v such that x = uv and y = vu.

Equivalently, x and y are conjugate if and only if there exists a word z suchthat xz = zy (that is, y = z−1xz).

This is an equivalence relation on A∗ since x is conjugate to y if and only ify can be obtained by a cyclic permutation (rotation) of the letters of x .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 9

Page 53: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Necklaces

The set of all conjugates (rotations) of a given word is called its conjugacy class.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 10

Page 54: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Necklaces

The set of all conjugates (rotations) of a given word is called its conjugacy class.

The conjugacy class of a word can be represented by a necklace (also known as acircular word).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 10

Page 55: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Necklaces

The set of all conjugates (rotations) of a given word is called its conjugacy class.

The conjugacy class of a word can be represented by a necklace (also known as acircular word).

• •

a a

aa

b

b•

• •

a

aa

b

b

b

aabaab aabbab

Periodic Primitive

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 10

Page 56: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Necklaces

The set of all conjugates (rotations) of a given word is called its conjugacy class.

The conjugacy class of a word can be represented by a necklace (also known as acircular word).

• •

a a

aa

b

b•

• •

a

aa

b

b

b

aabaab aabbab

Periodic Primitive

Note:

A necklace of length n over a k-letter alphabet can be thought of as n circularlyconnected beads of up to k different colours.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 10

Page 57: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Necklaces

The set of all conjugates (rotations) of a given word is called its conjugacy class.

The conjugacy class of a word can be represented by a necklace (also known as acircular word).

• •

a a

aa

b

b•

• •

a

aa

b

b

b

aabaab aabbab

Periodic Primitive

Note:

A necklace of length n over a k-letter alphabet can be thought of as n circularlyconnected beads of up to k different colours.

A necklace can also be classified as an orbit of the action of the cyclic group onwords of length n.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 10

Page 58: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Necklaces

The set of all conjugates (rotations) of a given word is called its conjugacy class.

The conjugacy class of a word can be represented by a necklace (also known as acircular word).

• •

a a

aa

b

b•

• •

a

aa

b

b

b

aabaab aabbab

Periodic Primitive

Note:

A necklace of length n over a k-letter alphabet can be thought of as n circularlyconnected beads of up to k different colours.

A necklace can also be classified as an orbit of the action of the cyclic group onwords of length n.

Each aperiodic (primitive) necklace can be uniquely represented by a so-calledLyndon word . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 10

Page 59: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 60: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 61: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Definition

A finite word w ∈ A+ is a Lyndon word if w is strictly smaller in lexicographicalorder than all of its non-trivial rotations for the given total order ≺ on A.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 62: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Definition

A finite word w ∈ A+ is a Lyndon word if w is strictly smaller in lexicographicalorder than all of its non-trivial rotations for the given total order ≺ on A.

Lyndon words are named after mathematician Roger Lyndon, who introducedthem in 1954 under the name of standard lexicographic sequences.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 63: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Definition

A finite word w ∈ A+ is a Lyndon word if w is strictly smaller in lexicographicalorder than all of its non-trivial rotations for the given total order ≺ on A.

Lyndon words are named after mathematician Roger Lyndon, who introducedthem in 1954 under the name of standard lexicographic sequences.

Being the singularly lexicographically smallest rotation implies that a Lyndon wordis different from all of its non-trivial rotations, and is therefore primitive.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 64: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Definition

A finite word w ∈ A+ is a Lyndon word if w is strictly smaller in lexicographicalorder than all of its non-trivial rotations for the given total order ≺ on A.

Lyndon words are named after mathematician Roger Lyndon, who introducedthem in 1954 under the name of standard lexicographic sequences.

Being the singularly lexicographically smallest rotation implies that a Lyndon wordis different from all of its non-trivial rotations, and is therefore primitive.

So a Lyndon word w is a primitive word that is the lexicographically smallest wordin its conjugacy class

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 65: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Definition

A finite word w ∈ A+ is a Lyndon word if w is strictly smaller in lexicographicalorder than all of its non-trivial rotations for the given total order ≺ on A.

Lyndon words are named after mathematician Roger Lyndon, who introducedthem in 1954 under the name of standard lexicographic sequences.

Being the singularly lexicographically smallest rotation implies that a Lyndon wordis different from all of its non-trivial rotations, and is therefore primitive.

So a Lyndon word w is a primitive word that is the lexicographically smallest wordin its conjugacy class, i.e., w ∈ A or w ≺ vu for all words u, v such that w = uv.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 66: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Basic Definitions: Lyndon Words

Suppose the alphabet A is totally ordered by the relation ≺.

Then we can totally order the semigroup A+ by the lexicographical order �(which is the usual alphabetical order in a dictionary) induced by the totalorder ≺ on A.

Definition

A finite word w ∈ A+ is a Lyndon word if w is strictly smaller in lexicographicalorder than all of its non-trivial rotations for the given total order ≺ on A.

Lyndon words are named after mathematician Roger Lyndon, who introducedthem in 1954 under the name of standard lexicographic sequences.

Being the singularly lexicographically smallest rotation implies that a Lyndon wordis different from all of its non-trivial rotations, and is therefore primitive.

So a Lyndon word w is a primitive word that is the lexicographically smallest wordin its conjugacy class, i.e., w ∈ A or w ≺ vu for all words u, v such that w = uv.

It follows that w ∈ A+ is a Lyndon word iff w ∈ A or w ≺ v for all proper suffixesv of w.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 11

Page 67: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 68: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}

w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 69: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}

w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 70: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}

w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 71: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}

w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 72: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Example 2

For the 2-letter alphabet {a, b} with a ≺ b, the Lyndon words up to length fiveare as follows (sorted lexicographically for each length):

a, b, ab, aab, abb, aaab, aabb, abbb, aaaab, aaabb, aabab, aabbb, abbbb, . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 73: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Example 2

For the 2-letter alphabet {a, b} with a ≺ b, the Lyndon words up to length fiveare as follows (sorted lexicographically for each length):

a, b︸︷︷︸

2

, ab︸︷︷︸

1

, aab, abb︸ ︷︷ ︸

2

, aaab, aabb, abbb︸ ︷︷ ︸

3

, aaaab, aaabb, aabab, aabbb, ababb, abbbb︸ ︷︷ ︸

6

, . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 74: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Example 2

For the 2-letter alphabet {a, b} with a ≺ b, the Lyndon words up to length fiveare as follows (sorted lexicographically for each length):

a, b︸︷︷︸

2

, ab︸︷︷︸

1

, aab, abb︸ ︷︷ ︸

2

, aaab, aabb, abbb︸ ︷︷ ︸

3

, aaaab, aaabb, aabab, aabbb, ababb, abbbb︸ ︷︷ ︸

6

, . . .

How do we generate them?

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 75: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Example 2

For the 2-letter alphabet {a, b} with a ≺ b, the Lyndon words up to length fiveare as follows (sorted lexicographically for each length):

a, b︸︷︷︸

2

, ab︸︷︷︸

1

, aab, abb︸ ︷︷ ︸

2

, aaab, aabb, abbb︸ ︷︷ ︸

3

, aaaab, aaabb, aabab, aabbb, ababb, abbbb︸ ︷︷ ︸

6

, . . .

How do we generate them? How do we count them?

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 76: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Example 2

For the 2-letter alphabet {a, b} with a ≺ b, the Lyndon words up to length fiveare as follows (sorted lexicographically for each length):

a, b︸︷︷︸

2

, ab︸︷︷︸

1

, aab, abb︸ ︷︷ ︸

2

, aaab, aabb, abbb︸ ︷︷ ︸

3

, aaaab, aaabb, aabab, aabbb, ababb, abbbb︸ ︷︷ ︸

6

, . . .

How do we generate them? How do we count them?

These questions will be answered in a momentAmy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 77: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Definitions

Examples

Example 1: w = aabac with alphabet A = {a, b, c}w is a Lyndon word for the orders a ≺ b ≺ c and a ≺ c ≺ b

(i.e., a Lyndon word for the orders on A with min(A) = a).

R2(w) = bacaa is a Lyndon word for the orders on A with min(A) = b.

R4(w) = caaba is a Lyndon word for the orders on A with min(A) = c.

Example 2

For the 2-letter alphabet {a, b} with a ≺ b, the Lyndon words up to length fiveare as follows (sorted lexicographically for each length):

a, b︸︷︷︸

2

, ab︸︷︷︸

1

, aab, abb︸ ︷︷ ︸

2

, aaab, aabb, abbb︸ ︷︷ ︸

3

, aaaab, aaabb, aabab, aabbb, ababb, abbbb︸ ︷︷ ︸

6

, . . .

How do we generate them? How do we count them?

These questions will be answered in a moment, but first . . .Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 12

Page 78: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest

There are many and varied applications of Lyndon words in algebraand combinatorics – far too many to mention here.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 13

Page 79: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest

There are many and varied applications of Lyndon words in algebraand combinatorics – far too many to mention here.

For instance, Lyndon words have an application to the description offree Lie algebras in constructing bases.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 13

Page 80: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest

There are many and varied applications of Lyndon words in algebraand combinatorics – far too many to mention here.

For instance, Lyndon words have an application to the description offree Lie algebras in constructing bases.

This was, in fact, Lyndon’s original motivation for introducing thesewords.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 13

Page 81: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest

There are many and varied applications of Lyndon words in algebraand combinatorics – far too many to mention here.

For instance, Lyndon words have an application to the description offree Lie algebras in constructing bases.

This was, in fact, Lyndon’s original motivation for introducing thesewords.

Lyndon words may also be understood as a special case of Hall sets.

[C. Reutenauer, Free Lie Algebras, Oxford University Press, 1993]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 13

Page 82: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest

There are many and varied applications of Lyndon words in algebraand combinatorics – far too many to mention here.

For instance, Lyndon words have an application to the description offree Lie algebras in constructing bases.

This was, in fact, Lyndon’s original motivation for introducing thesewords.

Lyndon words may also be understood as a special case of Hall sets.

[C. Reutenauer, Free Lie Algebras, Oxford University Press, 1993]

Lyndon words also have applications to semigroups, patternmatching, and representation theory of certain algebras (cf. recentwork of Ram et al.).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 13

Page 83: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 84: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

The rest of this talk will be concerned with some of the most importantcombinatorial properties of Lyndon words, which you will hopefully findinteresting and which may be useful in your own work.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 85: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

The rest of this talk will be concerned with some of the most importantcombinatorial properties of Lyndon words, which you will hopefully findinteresting and which may be useful in your own work.

In particular, we’ll learn about the following in regards to Lyndon words:

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 86: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

The rest of this talk will be concerned with some of the most importantcombinatorial properties of Lyndon words, which you will hopefully findinteresting and which may be useful in your own work.

In particular, we’ll learn about the following in regards to Lyndon words:

Enumeration

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 87: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

The rest of this talk will be concerned with some of the most importantcombinatorial properties of Lyndon words, which you will hopefully findinteresting and which may be useful in your own work.

In particular, we’ll learn about the following in regards to Lyndon words:

Enumeration

Generation

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 88: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

The rest of this talk will be concerned with some of the most importantcombinatorial properties of Lyndon words, which you will hopefully findinteresting and which may be useful in your own work.

In particular, we’ll learn about the following in regards to Lyndon words:

Enumeration

Generation

Factorisation

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 89: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Applications

Some Applications of Interest . . .

All such applications make use of combinatorial properties of Lyndonwords, particularly factorisation theorems and lexicographical properties.

The rest of this talk will be concerned with some of the most importantcombinatorial properties of Lyndon words, which you will hopefully findinteresting and which may be useful in your own work.

In particular, we’ll learn about the following in regards to Lyndon words:

Enumeration

Generation

Factorisation

I’ll return to some of the aforementioned applications along the way . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 14

Page 90: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words

From now on, we consider words over a totally ordered finite alphabet Aconsisting of at least two distinct letters, unless stated otherwise.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 15

Page 91: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words

From now on, we consider words over a totally ordered finite alphabet Aconsisting of at least two distinct letters, unless stated otherwise.

We know that the conjugacy class of any primitive word contains asingle Lyndon word.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 15

Page 92: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words

From now on, we consider words over a totally ordered finite alphabet Aconsisting of at least two distinct letters, unless stated otherwise.

We know that the conjugacy class of any primitive word contains asingle Lyndon word.

That is, each primitive word is a conjugate (rotation) of a uniqueLyndon word.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 15

Page 93: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words

From now on, we consider words over a totally ordered finite alphabet Aconsisting of at least two distinct letters, unless stated otherwise.

We know that the conjugacy class of any primitive word contains asingle Lyndon word.

That is, each primitive word is a conjugate (rotation) of a uniqueLyndon word.

So Lyndon words form representatives of conjugacy classes ofprimitive words.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 15

Page 94: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words

From now on, we consider words over a totally ordered finite alphabet Aconsisting of at least two distinct letters, unless stated otherwise.

We know that the conjugacy class of any primitive word contains asingle Lyndon word.

That is, each primitive word is a conjugate (rotation) of a uniqueLyndon word.

So Lyndon words form representatives of conjugacy classes ofprimitive words.

Hence the number of Lyndon words of length n over A is preciselythe number of aperiodic (primitive) necklaces of length n over A.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 15

Page 95: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words

From now on, we consider words over a totally ordered finite alphabet Aconsisting of at least two distinct letters, unless stated otherwise.

We know that the conjugacy class of any primitive word contains asingle Lyndon word.

That is, each primitive word is a conjugate (rotation) of a uniqueLyndon word.

So Lyndon words form representatives of conjugacy classes ofprimitive words.

Hence the number of Lyndon words of length n over A is preciselythe number of aperiodic (primitive) necklaces of length n over A.

How do we count these?

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 15

Page 96: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Suppose A has size |A| = k.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 16

Page 97: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Suppose A has size |A| = k.

Let Nk(n) denote the number of primitive necklaces of length n on A.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 16

Page 98: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Suppose A has size |A| = k.

Let Nk(n) denote the number of primitive necklaces of length n on A.

If |w| = n and w = vp = vv · · · v︸ ︷︷ ︸

p times

where v is a primitive word,

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 16

Page 99: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Suppose A has size |A| = k.

Let Nk(n) denote the number of primitive necklaces of length n on A.

If |w| = n and w = vp = vv · · · v︸ ︷︷ ︸

p times

where v is a primitive word, then

n = pd where d = |v|

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 16

Page 100: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Suppose A has size |A| = k.

Let Nk(n) denote the number of primitive necklaces of length n on A.

If |w| = n and w = vp = vv · · · v︸ ︷︷ ︸

p times

where v is a primitive word, then

n = pd where d = |v| and the number of distinct conjugates of w isexactly d.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 16

Page 101: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Suppose A has size |A| = k.

Let Nk(n) denote the number of primitive necklaces of length n on A.

If |w| = n and w = vp = vv · · · v︸ ︷︷ ︸

p times

where v is a primitive word, then

n = pd where d = |v| and the number of distinct conjugates of w isexactly d.

Hence, the total number of different words of length n on A is

kn =∑

d|n

d · Nk(d)

where the sum is over all positive divisors of n.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 16

Page 102: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Now, by the well-known Möbius inversion formula, we have

Nk(n) =1

n

d|n

µ(d) · kn/d

where µ is the Möbius function defined on N+ as follows:

µ(n) =

1 if n = 1,

(−1)i if n = p1 · · · pi where the pi are distinct primes,

0 if n is divisible by a square.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 17

Page 103: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

Now, by the well-known Möbius inversion formula, we have

Nk(n) =1

n

d|n

µ(d) · kn/d

where µ is the Möbius function defined on N+ as follows:

µ(n) =

1 if n = 1,

(−1)i if n = p1 · · · pi where the pi are distinct primes,

0 if n is divisible by a square.

This “necklace-counting formula” (often called Witt’s formula) was provedby E. Witt in 1937 in connection with the theorem on free Lie algebrasnow called the Poincaré–Birkhoff–Witt Theorem.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 17

Page 104: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 105: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 106: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Note

There are as many Lyndon words of length n over an alphabet of size p

(a prime) as there are irreducible monic polynomials of degree n over a finitefield of characteristic p. [Gauss, 1900]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 107: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Note

There are as many Lyndon words of length n over an alphabet of size p

(a prime) as there are irreducible monic polynomials of degree n over a finitefield of characteristic p. [Gauss, 1900]

However, there is no known bijection between such irreducible polynomialsand Lyndon words.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 108: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Note

There are as many Lyndon words of length n over an alphabet of size p

(a prime) as there are irreducible monic polynomials of degree n over a finitefield of characteristic p. [Gauss, 1900]

However, there is no known bijection between such irreducible polynomialsand Lyndon words.

We’ve just seen how to count the number of Lyndon words of each length

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 109: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Note

There are as many Lyndon words of length n over an alphabet of size p

(a prime) as there are irreducible monic polynomials of degree n over a finitefield of characteristic p. [Gauss, 1900]

However, there is no known bijection between such irreducible polynomialsand Lyndon words.

We’ve just seen how to count the number of Lyndon words of each length, buthow do we generate them?

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 110: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Note

There are as many Lyndon words of length n over an alphabet of size p

(a prime) as there are irreducible monic polynomials of degree n over a finitefield of characteristic p. [Gauss, 1900]

However, there is no known bijection between such irreducible polynomialsand Lyndon words.

We’ve just seen how to count the number of Lyndon words of each length, buthow do we generate them?

Duval (1988) gave a beautiful, and clever, recursive process that generatesLyndon words of bounded length over a totally ordered finite alphabet.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 111: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Enumeration

Counting Lyndon Words . . .

By Witt’s formula, the numbers of binary Lyndon words of each length, startingwith length 0 (empty word), form the integer sequence

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, . . . [sequence A001037 in OEIS].

Note

There are as many Lyndon words of length n over an alphabet of size p

(a prime) as there are irreducible monic polynomials of degree n over a finitefield of characteristic p. [Gauss, 1900]

However, there is no known bijection between such irreducible polynomialsand Lyndon words.

We’ve just seen how to count the number of Lyndon words of each length, buthow do we generate them?

Duval (1988) gave a beautiful, and clever, recursive process that generatesLyndon words of bounded length over a totally ordered finite alphabet.

At the core of Duval’s efficient algorithm is the following important factorisationtheorem . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 18

Page 112: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 113: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

In general, this factorisation is not unique since, for example, w = aabac has twosuch factorisations:

w = (a)(abac) and w = (aab)(ac).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 114: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

In general, this factorisation is not unique since, for example, w = aabac has twosuch factorisations:

w = (a)(abac) and w = (aab)(ac).

However, there is a unique factorisation of a given Lyndon word as a product uv

of two Lyndon words u, v with u ≺ v, called the standard factorisation.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 115: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

In general, this factorisation is not unique since, for example, w = aabac has twosuch factorisations:

w = (a)(abac) and w = (aab)(ac).

However, there is a unique factorisation of a given Lyndon word as a product uv

of two Lyndon words u, v with u ≺ v, called the standard factorisation.

Theorem (Chen-Fox-Lyndon 1958)

If w = uv is a Lyndon word with v its lexicographically smallest proper suffix,then u and v are also Lyndon words and u ≺ v.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 116: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

In general, this factorisation is not unique since, for example, w = aabac has twosuch factorisations:

w = (a)(abac) and w = (aab)(ac).

However, there is a unique factorisation of a given Lyndon word as a product uv

of two Lyndon words u, v with u ≺ v, called the standard factorisation.

Theorem (Chen-Fox-Lyndon 1958)

If w = uv is a Lyndon word with v its lexicographically smallest proper suffix,then u and v are also Lyndon words and u ≺ v.

So the standard factorisation of a Lyndon word w = uv is obtained by choosing v

to be the lexicographically least proper suffix of w

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 117: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

In general, this factorisation is not unique since, for example, w = aabac has twosuch factorisations:

w = (a)(abac) and w = (aab)(ac).

However, there is a unique factorisation of a given Lyndon word as a product uv

of two Lyndon words u, v with u ≺ v, called the standard factorisation.

Theorem (Chen-Fox-Lyndon 1958)

If w = uv is a Lyndon word with v its lexicographically smallest proper suffix,then u and v are also Lyndon words and u ≺ v.

So the standard factorisation of a Lyndon word w = uv is obtained by choosing v

to be the lexicographically least proper suffix of w, which also happens to be thelongest proper suffix of w that is Lyndon.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 118: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

Factorisation of Lyndon words

Theorem (Lyndon)

A word w ∈ A+ is a Lyndon word if and only if w ∈ A or there exists two Lyndonwords u and v such that w = uv and u ≺ v.

In general, this factorisation is not unique since, for example, w = aabac has twosuch factorisations:

w = (a)(abac) and w = (aab)(ac).

However, there is a unique factorisation of a given Lyndon word as a product uv

of two Lyndon words u, v with u ≺ v, called the standard factorisation.

Theorem (Chen-Fox-Lyndon 1958)

If w = uv is a Lyndon word with v its lexicographically smallest proper suffix,then u and v are also Lyndon words and u ≺ v.

So the standard factorisation of a Lyndon word w = uv is obtained by choosing v

to be the lexicographically least proper suffix of w, which also happens to be thelongest proper suffix of w that is Lyndon.

Example: w = aabac has standard factorisation w = (a)(abac).Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 19

Page 119: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

An Application in Algebra

In algebraic settings, Lyndon words give rise to commutators usingstandard factorisation iteratively.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 20

Page 120: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

An Application in Algebra

In algebraic settings, Lyndon words give rise to commutators usingstandard factorisation iteratively.

For example, the Lyndon word aababb with standard factorisation(a)(ababb) gives rise to the commutator [a, [[a, b], [[a, b], b]]].

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 20

Page 121: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

An Application in Algebra

In algebraic settings, Lyndon words give rise to commutators usingstandard factorisation iteratively.

For example, the Lyndon word aababb with standard factorisation(a)(ababb) gives rise to the commutator [a, [[a, b], [[a, b], b]]].

These commutators can be viewed either as elements of the freegroup with [x, y] = xyx−1y−1, or as elements of the free Lie algebrawith [x, y] = xy − yx .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 20

Page 122: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

An Application in Algebra

In algebraic settings, Lyndon words give rise to commutators usingstandard factorisation iteratively.

For example, the Lyndon word aababb with standard factorisation(a)(ababb) gives rise to the commutator [a, [[a, b], [[a, b], b]]].

These commutators can be viewed either as elements of the freegroup with [x, y] = xyx−1y−1, or as elements of the free Lie algebrawith [x, y] = xy − yx .

In either case, Lyndon words give rise to a basis of some algebra.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 20

Page 123: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Factorisation

An Application in Algebra

In algebraic settings, Lyndon words give rise to commutators usingstandard factorisation iteratively.

For example, the Lyndon word aababb with standard factorisation(a)(ababb) gives rise to the commutator [a, [[a, b], [[a, b], b]]].

These commutators can be viewed either as elements of the freegroup with [x, y] = xyx−1y−1, or as elements of the free Lie algebrawith [x, y] = xy − yx .

In either case, Lyndon words give rise to a basis of some algebra.

For specific details, see [C. Reutenauer, Free Lie Algebras, 1993] and[M. Lothaire, Combinatorics on words, 1983].

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 20

Page 124: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 125: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

If w is one of the words in the list of Lyndon words up to length n (not equal tomax(A)), then the next Lyndon word after w can be found by the following steps:

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 126: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

If w is one of the words in the list of Lyndon words up to length n (not equal tomax(A)), then the next Lyndon word after w can be found by the following steps:

1 Repeat the letters from w to form a new word x of length exactly n, wherethe i-th letter of x is the same as the letter at position i (mod |w|) in w.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 127: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

If w is one of the words in the list of Lyndon words up to length n (not equal tomax(A)), then the next Lyndon word after w can be found by the following steps:

1 Repeat the letters from w to form a new word x of length exactly n, wherethe i-th letter of x is the same as the letter at position i (mod |w|) in w.

2 If the last letter of x is max(A) for the given order on A, remove it,producing a shorter word, and take this to be the new x .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 128: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

If w is one of the words in the list of Lyndon words up to length n (not equal tomax(A)), then the next Lyndon word after w can be found by the following steps:

1 Repeat the letters from w to form a new word x of length exactly n, wherethe i-th letter of x is the same as the letter at position i (mod |w|) in w.

2 If the last letter of x is max(A) for the given order on A, remove it,producing a shorter word, and take this to be the new x .

3 If the last letter of x is max(A), then repeat Step 2.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 129: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

If w is one of the words in the list of Lyndon words up to length n (not equal tomax(A)), then the next Lyndon word after w can be found by the following steps:

1 Repeat the letters from w to form a new word x of length exactly n, wherethe i-th letter of x is the same as the letter at position i (mod |w|) in w.

2 If the last letter of x is max(A) for the given order on A, remove it,producing a shorter word, and take this to be the new x .

3 If the last letter of x is max(A), then repeat Step 2. Otherwise, replace thelast letter of x by its successor in the sorted ordering of the alphabet A.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 130: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Generation of Lyndon Words

Duval’s Algorithm: Generates the Lyndon words over A of length at most n

(n ≥ 2).

If w is one of the words in the list of Lyndon words up to length n (not equal tomax(A)), then the next Lyndon word after w can be found by the following steps:

1 Repeat the letters from w to form a new word x of length exactly n, wherethe i-th letter of x is the same as the letter at position i (mod |w|) in w.

2 If the last letter of x is max(A) for the given order on A, remove it,producing a shorter word, and take this to be the new x .

3 If the last letter of x is max(A), then repeat Step 2. Otherwise, replace thelast letter of x by its successor in the sorted ordering of the alphabet A.

Note: Since, in general, the factorisation of a Lyndon word as a product uv oftwo Lyndon words u, v with u ≺ v is not unique, Duval’s algorithm may producethe same Lyndon word more than once.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 21

Page 131: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 132: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 133: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 134: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 135: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 136: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 137: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 138: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 139: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 140: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 141: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 142: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 143: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 144: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 145: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 146: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a −→ aaa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 147: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a −→ aaa −→ aab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 148: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a −→ aaa −→ aab

ab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 149: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a −→ aaa −→ aab

ab −→ aba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 150: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a −→ aaa −→ aab

ab −→ aba −→ abb

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 151: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action

Let’s use the algorithm to generate all the Lyndon words up to length 4 over thealphabet {a, b} with a ≺ b.

We begin with the Lyndon words of length 1: a and b. List: L = {a, b, . . .}Lyndon words of length at most 2:

a −→ aa −→ ab

b −→ bb −→ b −→ ε

Updated List: L = {a, b, ab, . . .}Lyndon words of length at most 3:

a −→ aaa −→ aab

ab −→ aba −→ abb

Updated List: L = {a, b, ab, aab, abb, . . .}

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 22

Page 152: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 153: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 154: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 155: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 156: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 157: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 158: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 159: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 160: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 161: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 162: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba −→ aabb

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 163: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba −→ aabb

abb

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 164: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba −→ aabb

abb −→ abba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 165: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba −→ aabb

abb −→ abba −→ abbb

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 166: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba −→ aabb

abb −→ abba −→ abbb

Updated List: L = {a, b, ab, aab, abb, aaab, aabb, abbb, . . .}

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 167: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Duval’s Algorithm in Action . . .

Lyndon words of length at most 4:

a −→ aaaa −→ aaab

ab −→ abab −→ abb (repeat)

aab −→ aaba −→ aabb

abb −→ abba −→ abbb

Updated List: L = {a, b, ab, aab, abb, aaab, aabb, abbb, . . .}

And on it goes . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 23

Page 168: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Remarks on Duval’s Algorithm

The worst-case time to generate a successor of a Lyndon word w byDuval’s procedure is O(n).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 24

Page 169: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Remarks on Duval’s Algorithm

The worst-case time to generate a successor of a Lyndon word w byDuval’s procedure is O(n).

This can be improved to constant time if the generated words arestored in an array of length n and the construction of x from w isperformed by appending letters to w instead of making a new copyof w.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 24

Page 170: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Remarks on Duval’s Algorithm

The worst-case time to generate a successor of a Lyndon word w byDuval’s procedure is O(n).

This can be improved to constant time if the generated words arestored in an array of length n and the construction of x from w isperformed by appending letters to w instead of making a new copyof w. [Berstel-Pocchiola 1994]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 24

Page 171: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words Generation

Remarks on Duval’s Algorithm

The worst-case time to generate a successor of a Lyndon word w byDuval’s procedure is O(n).

This can be improved to constant time if the generated words arestored in an array of length n and the construction of x from w isperformed by appending letters to w instead of making a new copyof w. [Berstel-Pocchiola 1994]

Duval (1983) also developed an algorithm for standard factorisationthat runs in linear time and constant space.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 24

Page 172: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 173: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 174: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn, called the Lyndonfactorisation.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 175: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn, called the Lyndonfactorisation.

Example: abaacaab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 176: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn, called the Lyndonfactorisation.

Example: abaacaab = (ab)(aac)(aab)

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 177: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn, called the Lyndonfactorisation.

Example: abaacaab = (ab)(aac)(aab)

The origin of the theorem is unclear

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 178: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn, called the Lyndonfactorisation.

Example: abaacaab = (ab)(aac)(aab)

The origin of the theorem is unclear – it is usually credited toChen-Fox-Lyndon (1958), whose paper does not explicitly contain the statement,but it can be recovered from their results.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 179: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Back to Factorisations of Lyndon Words

A famous theorem concerning Lyndon words asserts that every word w can beuniquely factorised as a non-increasing product of Lyndon words . . .

Theorem

Any word w ∈ A+ may be uniquely written as a non-increasing product ofLyndon words, i.e.,

w = ℓ1ℓ2 · · · ℓn

where the ℓi are Lyndon words such that ℓ1 � ℓ2 � · · · � ℓn, called the Lyndonfactorisation.

Example: abaacaab = (ab)(aac)(aab)

The origin of the theorem is unclear – it is usually credited toChen-Fox-Lyndon (1958), whose paper does not explicitly contain the statement,but it can be recovered from their results.

We note that the Lyndon factorisation of a word can be computed in linear time[Duval 1983].

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 25

Page 180: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 181: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Used in algorithms for digital geometry. [Brlek et al. 2009]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 182: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Used in algorithms for digital geometry. [Brlek et al. 2009]

Connection to de Bruijn sequences: If one concatenates together, inlexicographical order, all the Lyndon words over an alphabet of size k thathave length dividing a given number n, then the result is a de Bruijnsequence (1975)

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 183: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Used in algorithms for digital geometry. [Brlek et al. 2009]

Connection to de Bruijn sequences: If one concatenates together, inlexicographical order, all the Lyndon words over an alphabet of size k thathave length dividing a given number n, then the result is a de Bruijnsequence (1975) – a necklace of length kn on an alphabet of size k in whicheach possible word of length n appears exactly once as one of its factors(contiguous subwords).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 184: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Used in algorithms for digital geometry. [Brlek et al. 2009]

Connection to de Bruijn sequences: If one concatenates together, inlexicographical order, all the Lyndon words over an alphabet of size k thathave length dividing a given number n, then the result is a de Bruijnsequence (1975) – a necklace of length kn on an alphabet of size k in whicheach possible word of length n appears exactly once as one of its factors(contiguous subwords).

For example, the concatenation, in lexicographical order, of the Lyndonwords on two letters with lengths dividing 4 yields the de Bruijn wordB(2, 4):

a · aaab · aabb · ab · abbb · b

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 185: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Used in algorithms for digital geometry. [Brlek et al. 2009]

Connection to de Bruijn sequences: If one concatenates together, inlexicographical order, all the Lyndon words over an alphabet of size k thathave length dividing a given number n, then the result is a de Bruijnsequence (1975) – a necklace of length kn on an alphabet of size k in whicheach possible word of length n appears exactly once as one of its factors(contiguous subwords).

For example, the concatenation, in lexicographical order, of the Lyndonwords on two letters with lengths dividing 4 yields the de Bruijn wordB(2, 4):

a · aaab · aabb · ab · abbb · b

This fact was discovered by Fredericksen and Maiorana in 1978.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 186: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Applications of Lyndon Factorisations

Used as part of a bijective variant of the Burrows-Wheeler transform fordata compression. [Burrow-Wheeler 1994, Gil-Scott 2009, Kufleitner 2009]

Used in algorithms for digital geometry. [Brlek et al. 2009]

Connection to de Bruijn sequences: If one concatenates together, inlexicographical order, all the Lyndon words over an alphabet of size k thathave length dividing a given number n, then the result is a de Bruijnsequence (1975) – a necklace of length kn on an alphabet of size k in whicheach possible word of length n appears exactly once as one of its factors(contiguous subwords).

For example, the concatenation, in lexicographical order, of the Lyndonwords on two letters with lengths dividing 4 yields the de Bruijn wordB(2, 4):

a · aaab · aabb · ab · abbb · b

This fact was discovered by Fredericksen and Maiorana in 1978.

Interestingly, there is a relationship between Lyndon words, shift-registersequences, and de Bruijn words [Knuth 2005].

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 26

Page 187: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 188: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 189: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

All possible solution codes are contained exactly once in B(10, 3) — the de BruijnBruijn sequence with alphabet {0, 1, . . . , 9} that contains each word of length 3exactly once.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 190: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

All possible solution codes are contained exactly once in B(10, 3) — the de BruijnBruijn sequence with alphabet {0, 1, . . . , 9} that contains each word of length 3exactly once.

B(10, 3) has length 103 = 1000

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 191: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

All possible solution codes are contained exactly once in B(10, 3) — the de BruijnBruijn sequence with alphabet {0, 1, . . . , 9} that contains each word of length 3exactly once.

B(10, 3) has length 103 = 1000, so the number of presses required to open thelock would be at most 1000 + 2 = 1002 (since the solutions are cyclic)

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 192: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

All possible solution codes are contained exactly once in B(10, 3) — the de BruijnBruijn sequence with alphabet {0, 1, . . . , 9} that contains each word of length 3exactly once.

B(10, 3) has length 103 = 1000, so the number of presses required to open thelock would be at most 1000 + 2 = 1002 (since the solutions are cyclic), comparedto up to 4000 presses if all possible codes were tried separately.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 193: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

All possible solution codes are contained exactly once in B(10, 3) — the de BruijnBruijn sequence with alphabet {0, 1, . . . , 9} that contains each word of length 3exactly once.

B(10, 3) has length 103 = 1000, so the number of presses required to open thelock would be at most 1000 + 2 = 1002 (since the solutions are cyclic), comparedto up to 4000 presses if all possible codes were tried separately.

de Bruijn sequences are also of general use in neuroscience and psychologyexperiments, and even robotics . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 194: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Some Applications of de Bruijn Sequences

A de Bruijn sequence can be used to shorten a brute-force attack on aPIN-like code lock that does not have an “enter” key and accepts the last n

digits entered.

Example

Consider such a digital door lock with a 3-digit code.

All possible solution codes are contained exactly once in B(10, 3) — the de BruijnBruijn sequence with alphabet {0, 1, . . . , 9} that contains each word of length 3exactly once.

B(10, 3) has length 103 = 1000, so the number of presses required to open thelock would be at most 1000 + 2 = 1002 (since the solutions are cyclic), comparedto up to 4000 presses if all possible codes were tried separately.

de Bruijn sequences are also of general use in neuroscience and psychologyexperiments, and even robotics . . .

See Wikipedia for more information and other interesting applications.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 27

Page 195: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations

Recall that if w = uv is a Lyndon word with v the longest properLyndon suffix of w, then u is also a Lyndon word and u ≺ v.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 28

Page 196: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations

Recall that if w = uv is a Lyndon word with v the longest properLyndon suffix of w, then u is also a Lyndon word and u ≺ v.

This factorisation of w as an increasing product of two Lyndon wordsis called the standard or right-standard factorisation of w.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 28

Page 197: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations

Recall that if w = uv is a Lyndon word with v the longest properLyndon suffix of w, then u is also a Lyndon word and u ≺ v.

This factorisation of w as an increasing product of two Lyndon wordsis called the standard or right-standard factorisation of w.

An alternative left-standard factorisation is due to Shirshov (1962)and Viennot (1978).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 28

Page 198: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations

Recall that if w = uv is a Lyndon word with v the longest properLyndon suffix of w, then u is also a Lyndon word and u ≺ v.

This factorisation of w as an increasing product of two Lyndon wordsis called the standard or right-standard factorisation of w.

An alternative left-standard factorisation is due to Shirshov (1962)and Viennot (1978).

Theorem (Shirshov 1962, Viennot 1978)

If w = uv is a Lyndon word in A+ with u the longest proper Lyndon prefixof w, then v is also a Lyndon word and u ≺ v.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 28

Page 199: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations

Recall that if w = uv is a Lyndon word with v the longest properLyndon suffix of w, then u is also a Lyndon word and u ≺ v.

This factorisation of w as an increasing product of two Lyndon wordsis called the standard or right-standard factorisation of w.

An alternative left-standard factorisation is due to Shirshov (1962)and Viennot (1978).

Theorem (Shirshov 1962, Viennot 1978)

If w = uv is a Lyndon word in A+ with u the longest proper Lyndon prefixof w, then v is also a Lyndon word and u ≺ v.

Example

The left-standard and right-standard factorisations of aabaacab are:

(aabaac)(ab) and (aab)(aacab).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 28

Page 200: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 201: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Example

The Lyndon word aabaabab has coincidental left-standard andright-standard factorisations: (aab)(aabab).

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 202: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Example

The Lyndon word aabaabab has coincidental left-standard andright-standard factorisations: (aab)(aabab).

Let’s take a closer look at some “coincidental Lyndon words” over {a, b}with a ≺ b . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 203: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Example

The Lyndon word aabaabab has coincidental left-standard andright-standard factorisations: (aab)(aabab).

Let’s take a closer look at some “coincidental Lyndon words” over {a, b}with a ≺ b . . .

a, b, ab, ab, abb, aaab, abbb, aaaab, aabab, ababb, abbbb, . . .

Do you notice any structural property that holds for all these words?

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 204: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Example

The Lyndon word aabaabab has coincidental left-standard andright-standard factorisations: (aab)(aabab).

Let’s take a closer look at some “coincidental Lyndon words” over {a, b}with a ≺ b . . .

a, b, ab, ab, abb, aaab, abbb, aaaab, aabab, ababb, abbbb, . . .

How about now?

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 205: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Example

The Lyndon word aabaabab has coincidental left-standard andright-standard factorisations: (aab)(aabab).

Let’s take a closer look at some “coincidental Lyndon words” over {a, b}with a ≺ b . . .

a, b, ab, ab, abb, aaab, abbb, aaaab, aabab, ababb, abbbb, . . .

All such words take the form aub where u is a palindrome.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 206: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Standard Factorisations . . .

The left-standard and right-standard factorisations of a Lyndon wordsometimes coincide.

Example

The Lyndon word aabaabab has coincidental left-standard andright-standard factorisations: (aab)(aabab).

Let’s take a closer look at some “coincidental Lyndon words” over {a, b}with a ≺ b . . .

a, b, ab, ab, abb, aaab, abbb, aaaab, aabab, ababb, abbbb, . . .

All such words take the form aub where u is a palindrome.

But not just any old palindrome . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 29

Page 207: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 208: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 209: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 210: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ =

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 211: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 212: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ =

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 213: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 214: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 215: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 216: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) =

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 217: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = a

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 218: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = ab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 219: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = aba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 220: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = abaa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 221: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = abaaba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 222: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = abaabab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 223: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = abaababaaba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 224: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Theorem (Melançon 1999, Berstel-de Luca 1997)

Suppose w is finite word over {a, b}. Then w is a Lyndon word with the propertythat its left and right standard factorisations coincide if and only if w = aub (whena ≺ b) or w = bua (when b ≺ a) where u = Pal(v) for some word v over {a, b}.

Pal is the iterated palindromic closure operator [Justin 2005] defined asfollows.

For a given word v, let v+ denote the unique shortest palindrome beginningwith v, called the (right-)palindromic closure of v.

For example: (glen)+ = glenelg

(race)+ = racecar

We define Pal(ε) = ε, and for any word w and letter x ,

Pal(wx) = (Pal(w)x)+.

For example:Pal(abab) = abaababaaba

−→ coincidental Lyndon word: aPal(abab)b = aabaabab · aabab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 30

Page 225: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 226: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s)

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 227: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s) – they can be constructed geometrically by the coding the horizontal andvertical steps of certain lattice paths . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 228: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s) – they can be constructed geometrically by the coding the horizontal andvertical steps of certain lattice paths . . .

Consider a line (call it ℓ) of the form:

y =p

qx

where p, q are positive integers with gcd(p, q) = 1.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 229: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s) – they can be constructed geometrically by the coding the horizontal andvertical steps of certain lattice paths . . .

Consider a line (call it ℓ) of the form:

y =p

qx

where p, q are positive integers with gcd(p, q) = 1.

Let P denote the path along the integer lattice below the line ℓ that startsat the point (0, 0) and ends at the point (q, p) with the property that theregion in the plane enclosed by P and ℓ contains no other points in Z × Z

besides those of the path P .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 230: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s) – they can be constructed geometrically by the coding the horizontal andvertical steps of certain lattice paths . . .

Consider a line (call it ℓ) of the form:

y =p

qx

where p, q are positive integers with gcd(p, q) = 1.

Let P denote the path along the integer lattice below the line ℓ that startsat the point (0, 0) and ends at the point (q, p) with the property that theregion in the plane enclosed by P and ℓ contains no other points in Z × Z

besides those of the path P .

The so-called lower Christoffel word of slope p/q, denoted by L(p, q), isobtained by coding the steps of the path P .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 231: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s) – they can be constructed geometrically by the coding the horizontal andvertical steps of certain lattice paths . . .

Consider a line (call it ℓ) of the form:

y =p

qx

where p, q are positive integers with gcd(p, q) = 1.

Let P denote the path along the integer lattice below the line ℓ that startsat the point (0, 0) and ends at the point (q, p) with the property that theregion in the plane enclosed by P and ℓ contains no other points in Z × Z

besides those of the path P .

The so-called lower Christoffel word of slope p/q, denoted by L(p, q), isobtained by coding the steps of the path P .

– A horizontal step is denoted by the letter a.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 232: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

The previous theorem says that the “coincidental Lyndon words” over {a, b} witha ≺ b are precisely the words aPal(v)b where v ∈ {a, b}∗.

These words are known as (lower) Christoffel words (named after E. Christoffel1800’s) – they can be constructed geometrically by the coding the horizontal andvertical steps of certain lattice paths . . .

Consider a line (call it ℓ) of the form:

y =p

qx

where p, q are positive integers with gcd(p, q) = 1.

Let P denote the path along the integer lattice below the line ℓ that startsat the point (0, 0) and ends at the point (q, p) with the property that theregion in the plane enclosed by P and ℓ contains no other points in Z × Z

besides those of the path P .

The so-called lower Christoffel word of slope p/q, denoted by L(p, q), isobtained by coding the steps of the path P .

– A horizontal step is denoted by the letter a.

– A vertical step is denoted by the letter b.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 31

Page 233: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 234: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 235: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 236: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 237: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 238: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 239: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 240: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 241: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 242: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a

L(3, 5) = a

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 243: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

L(3, 5) = aa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 244: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

b

L(3, 5) = aab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 245: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

ba

L(3, 5) = aaba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 246: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

ba a

L(3, 5) = aabaa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 247: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

ba a

b

L(3, 5) = aabaab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 248: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

ba a

ba

L(3, 5) = aabaaba

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 249: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Construction by Lattice Paths

Lower Christoffel word of slope 3

5

a a

ba a

ba

b

L(3, 5) = aabaabab

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 32

Page 250: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Christoffel Words

Lower & Upper Christoffel words of slope 3

5

a a

a a

a

b

b

b

a

a a

a a

b

b

b

L(3, 5) = aabaabab U (3, 5) = babaabaa

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 33

Page 251: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 252: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 253: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 254: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Since then, many relationships between these particular Lyndon words andother areas of mathematics have been revealed.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 255: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Since then, many relationships between these particular Lyndon words andother areas of mathematics have been revealed.

For instance, the words in {a, b}∗ that are conjugates of Christoffel wordsare exactly the positive primitive elements of the free group F2 = 〈a, b〉.[Kassel-Reutenauer 2007]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 256: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Since then, many relationships between these particular Lyndon words andother areas of mathematics have been revealed.

For instance, the words in {a, b}∗ that are conjugates of Christoffel wordsare exactly the positive primitive elements of the free group F2 = 〈a, b〉.[Kassel-Reutenauer 2007]

Christoffel words also have connections to the theory of continued fractionsand Markoff numbers.

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 257: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Since then, many relationships between these particular Lyndon words andother areas of mathematics have been revealed.

For instance, the words in {a, b}∗ that are conjugates of Christoffel wordsare exactly the positive primitive elements of the free group F2 = 〈a, b〉.[Kassel-Reutenauer 2007]

Christoffel words also have connections to the theory of continued fractionsand Markoff numbers. [Markoff (1879, 1880), Cusick and Flahive (1989),Reutenauer (2006), Berstel et al. (2008)]

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 258: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Since then, many relationships between these particular Lyndon words andother areas of mathematics have been revealed.

For instance, the words in {a, b}∗ that are conjugates of Christoffel wordsare exactly the positive primitive elements of the free group F2 = 〈a, b〉.[Kassel-Reutenauer 2007]

Christoffel words also have connections to the theory of continued fractionsand Markoff numbers. [Markoff (1879, 1880), Cusick and Flahive (1989),Reutenauer (2006), Berstel et al. (2008)]

Nowadays they are studied in the context of Sturmian words

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 259: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Lyndon Words More on Factorisations

Remarks

Christoffel words recently came in handy for obtaining a completedescription of the minimal intervals containing all the fractional parts {x2n},n ≥ 0, for some positive real number x . [Allouche-Glen 2009]

Christoffel words appeared in the literature as early as 1771 in JeanBernoulli’s study of continued fractions.

Since then, many relationships between these particular Lyndon words andother areas of mathematics have been revealed.

For instance, the words in {a, b}∗ that are conjugates of Christoffel wordsare exactly the positive primitive elements of the free group F2 = 〈a, b〉.[Kassel-Reutenauer 2007]

Christoffel words also have connections to the theory of continued fractionsand Markoff numbers. [Markoff (1879, 1880), Cusick and Flahive (1989),Reutenauer (2006), Berstel et al. (2008)]

Nowadays they are studied in the context of Sturmian words, but that’s astory for another day . . .

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 34

Page 260: Combinatorics of Lyndon words - Murdoch Universityresearchrepository.murdoch.edu.au/17817/1/Lyndon_Words.pdf · Combinatorics of Lyndon words Amy Glen School of Chemical & Mathematical

Thank You!

Amy Glen (MU, Perth) Combinatorics of Lyndon words February 2012 35