
Combinatorics on Words: An Introduction Je®rey Shallit School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1 Canada [email protected] http://www.cs.uwaterloo.ca/~shallit 1 / 201 The Main Themes periodicity 2 / 201 The Main Themes periodicity patterns and pattern avoidance 3 / 201 The Main Themes periodicity patterns and pattern avoidance equations in words 4 / 201 The Main Themes periodicity patterns and pattern avoidance equations in words in¯nite words and their properties 5 / 201 Some notation § - a ¯nite nonempty set of symbols - the alphabet 6 / 201 Some notation § - a ¯nite nonempty set of symbols - the alphabet word - a ¯nite or in¯nite list of symbols chosen from § 7 / 201 Some notation § - a ¯nite nonempty set of symbols - the alphabet word - a ¯nite or in¯nite list of symbols chosen from § §¤ - set of all ¯nite words 8 / 201 Some notation § - a ¯nite nonempty set of symbols - the alphabet word - a ¯nite or in¯nite list of symbols chosen from § §¤ - set of all ¯nite words §+ - set of all ¯nite nonempty words 9 / 201 Some notation § - a ¯nite nonempty set of symbols - the alphabet word - a ¯nite or in¯nite list of symbols chosen from § §¤ - set of all ¯nite words §+ - set of all ¯nite nonempty words §! - set of all (right-)in¯nite words 10 / 201 Some notation § - a ¯nite nonempty set of symbols - the alphabet word - a ¯nite or in¯nite list of symbols chosen from § §¤ - set of all ¯nite words §+ - set of all ¯nite nonempty words §! - set of all (right-)in¯nite words §1 = §¤ [ §! 11 / 201 More notation the empty word: ² 12 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an 13 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an w[i] := ai , w[i::j] := ai ai+1 ¢ ¢ ¢ aj 14 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an w[i] := ai , w[i::j] := ai ai+1 ¢ ¢ ¢ aj w = a0a1a2 ¢ ¢ ¢ 15 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an w[i] := ai , w[i::j] := ai ai+1 ¢ ¢ ¢ aj w = a0a1a2 ¢ ¢ ¢ x! = xxx ¢ ¢ ¢ 16 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an w[i] := ai , w[i::j] := ai ai+1 ¢ ¢ ¢ aj w = a0a1a2 ¢ ¢ ¢ x! = xxx ¢ ¢ ¢ ultimately periodic: z = xy ! 17 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an w[i] := ai , w[i::j] := ai ai+1 ¢ ¢ ¢ aj w = a0a1a2 ¢ ¢ ¢ x! = xxx ¢ ¢ ¢ ultimately periodic: z = xy ! n Operations: concatenation, raising to powers x n = xx ¢ ¢ ¢ x, x 0 = ², reversal x R z }| { 18 / 201 More notation the empty word: ² w = a1a2 ¢ ¢ ¢ an w[i] := ai , w[i::j] := ai ai+1 ¢ ¢ ¢ aj w = a0a1a2 ¢ ¢ ¢ x! = xxx ¢ ¢ ¢ ultimately periodic: z = xy ! n Operations: concatenation, raising to powers x n = xx ¢ ¢ ¢ x, x 0 = ², reversal x R z }| { pre¯x, su±x, factor, subword 19 / 201 Algebraic framework semigroup: concatenation is multiplication, associative 20 / 201 Algebraic framework semigroup: concatenation is multiplication, associative monoid: semigroup + identity element (²) 21 / 201 Algebraic framework semigroup: concatenation is multiplication, associative monoid: semigroup + identity element (²) free monoid: no relations among elements 22 / 201 Algebraic framework semigroup: concatenation is multiplication, associative monoid: semigroup + identity element (²) free monoid: no relations among elements group: add inverses of elements a¡1 23 / 201 Periodicity words - fundamentally noncommutative 24 / 201 Periodicity words - fundamentally noncommutative casebook 6= bookcase 25 / 201 Periodicity words - fundamentally noncommutative casebook 6= bookcase When do words commute? 26 / 201 Periodicity words - fundamentally noncommutative casebook 6= bookcase When do words commute? Here are two words that \almost" commute: 27 / 201 Periodicity words - fundamentally noncommutative casebook 6= bookcase When do words commute? Here are two words that \almost" commute: w = 01010 and x = 01011010 28 / 201 Periodicity words - fundamentally noncommutative casebook 6= bookcase When do words commute? Here are two words that \almost" commute: w = 01010 and x = 01011010 wx = 0101001011010 29 / 201 Periodicity words - fundamentally noncommutative casebook 6= bookcase When do words commute? Here are two words that \almost" commute: w = 01010 and x = 01011010 wx = 0101001011010 xw = 0101101001010 By the way, this raises the question: can the Hamming distance between wx and xw be 1? It can't; there is a one-line proof. 30 / 201 What are the solutions to x 2 = y 3 in words? - Over N, x 2 = y 3 i® x is a cube and y is a square 31 / 201 What are the solutions to x 2 = y 3 in words? - Over N, x 2 = y 3 i® x is a cube and y is a square - Suggests what solutions of x i = y j will look like over words 32 / 201 What are the solutions to x 2 = y 3 in words? - Over N, x 2 = y 3 i® x is a cube and y is a square - Suggests what solutions of x i = y j will look like over words 33 / 201 First Theorem of Lyndon-SchutzenbÄ erger Theorem Let x; y 2 §+. Then the following three conditions are equivalent: 34 / 201 First Theorem of Lyndon-SchutzenbÄ erger Theorem Let x; y 2 §+. Then the following three conditions are equivalent: (1) xy = yx; 35 / 201 First Theorem of Lyndon-SchutzenbÄ erger Theorem Let x; y 2 §+. Then the following three conditions are equivalent: (1) xy = yx; (2) There exist z 2 §+ and integers k; l > 0 such that x = z k and y = zl ; 36 / 201 First Theorem of Lyndon-SchutzenbÄ erger Theorem Let x; y 2 §+. Then the following three conditions are equivalent: (1) xy = yx; (2) There exist z 2 §+ and integers k; l > 0 such that x = z k and y = zl ; (3) There exist integers i; j > 0 such that x i = y j . 37 / 201 Second Theorem of Lyndon-SchutzenbÄ erger Under what conditions can a string have a nontrivial proper pre¯x and su±x that are identical? 38 / 201 Second Theorem of Lyndon-SchutzenbÄ erger Under what conditions can a string have a nontrivial proper pre¯x and su±x that are identical? Examples in English: reader | begins and ends with r 39 / 201 Second Theorem of Lyndon-SchutzenbÄ erger Under what conditions can a string have a nontrivial proper pre¯x and su±x that are identical? Examples in English: reader | begins and ends with r alfalfa | which begins and ends with alfa 40 / 201 Second Theorem of Lyndon-SchutzenbÄ erger Under what conditions can a string have a nontrivial proper pre¯x and su±x that are identical? Examples in English: reader | begins and ends with r alfalfa | which begins and ends with alfa The answer is given by the following theorem. 41 / 201 Second Theorem of Lyndon-SchutzenbÄ erger Under what conditions can a string have a nontrivial proper pre¯x and su±x that are identical? Examples in English: reader | begins and ends with r alfalfa | which begins and ends with alfa The answer is given by the following theorem. Theorem Let x; y; z 2 §+. Then xy = yz if and only if there exist u 2 §+, v 2 §¤, and an integer e ¸ 0 such that x = uv, z = vu, and y = (uv)e u = u(vu)e : 42 / 201 Primitive words We say a word x is a power if it can be expressed as x = y n for some y 6= ², n ¸ 2. 43 / 201 Primitive words We say a word x is a power if it can be expressed as x = y n for some y 6= ², n ¸ 2. A nonpower is called primitive. 44 / 201 Primitive words We say a word x is a power if it can be expressed as x = y n for some y 6= ², n ¸ 2. A nonpower is called primitive. Every nonempty word can be written uniquely in the form x k where x is primitive and k ¸ 1. 45 / 201 Primitive words We say a word x is a power if it can be expressed as x = y n for some y 6= ², n ¸ 2. A nonpower is called primitive. Every nonempty word can be written uniquely in the form x k where x is primitive and k ¸ 1. Enumeration: there are exactly ¹(d)kn=d Xd j n 46 / 201 Primitive words We say a word x is a power if it can be expressed as x = y n for some y 6= ², n ¸ 2. A nonpower is called primitive. Every nonempty word can be written uniquely in the form x k where x is primitive and k ¸ 1. Enumeration: there are exactly ¹(d)kn=d Xd j n primitive words of length n over a k-letter alphabet. Here ¹ is the MÄobius function and the sum is over the divisors of n. 47 / 201 Primitive words We say a word x is a power if it can be expressed as x = y n for some y 6= ², n ¸ 2. A nonpower is called primitive. Every nonempty word can be written uniquely in the form x k where x is primitive and k ¸ 1. Enumeration: there are exactly ¹(d)kn=d Xd j n primitive words of length n over a k-letter alphabet. Here ¹ is the MÄobius function and the sum is over the divisors of n. Open question: is the set of primitive binary words a CFL? 48 / 201 Conjugates A word w is a conjugate of a word x if w can be obtained from x by cyclically shifting the letters. 49 / 201 Conjugates A word w is a conjugate of a word x if w can be obtained from x by cyclically shifting the letters. For example, the English word enlist is a conjugate of listen. 50 / 201 Conjugates A word w is a conjugate of a word x if w can be obtained from x by cyclically shifting the letters.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages201 Page
-
File Size-