linear-time computation of local periods linear-time computation of local periods gregory kucherov...
DESCRIPTION
3 Finding periodicities CGCGGCAGTTTTGCCGACTGTTTGGGACTTGCTCGAACTTGCCTATGCCAAGCTGCCGACGATTC CGCCCACCCTGTTGGAACGCGATTTTAATTTCCCGCCTTTTTCCGAACTCGAAGCCGAAGTCGCC AAAATCGCCGATTATCAAACGCGTGCCGGAAAGGAATGCCGCCGTGCAGCCTGAAACCTCCGCCC AATACCAGCACCGTTTCGCCCAAGCCATACGCGGGGGCGAAGCCGCAGACGGTCTGCCGCAAGAC CGACTGAACGTCTATATCCGCCTGATACGCAACAATATCTACAGCTTTATCGACCGTTGTTATAC CGAAACGCTGCAATACTTTGACCGCGAAGAATGGGGCCGTCTGAAAGAAGGTTTCGTCCGCGACG CGTGCGCCCAAACGCCCTATTTTCAAGAAATCCCCGGCGAGTTCCTCCAATATTGCCAAAGCCTG CCGCTTTTAGACGGCATTTTGGCACTGATGGATTTTGAATATACCCAATTGCTGGCAGAAGTTGC TCAAATTCCGGATATTCCCGACATTCATTATTCAAATGACAGCAAATACACACCTTCCCCTGCGG CCTTTATCCGGCAATATCGATATGATGTTACCGATGATTTGCATGAAGCGGAAACAGCCTTGTTA ATATGGCGAAACGCCGAAGATGATGTGATGTACCAAACATTGGACGGCTTCGATATGATGCTGCT AGAAATAATGGGGTTCTCCGCGCTTTCGTTTGACACCCTCGCCCAAACCCTTGTCGAATTTATGC CTGAGGACGATAATTGGAAAAATATTTTGCTTGGGAAATGGTCAGGCTGGACTGAACAAAGGATT ATCATCCCCTCCTTGTCCGCCATATCCGAAAATATGGAAGACAATTCCCCGGGCCTRANSCRIPT
![Page 1: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/1.jpg)
Linear-time computation of local Linear-time computation of local periodsperiods
Gregory KucherovINRIA/LORIA
Nancy, France
joint work with Roman Kolpakov (Moscow) and Jean-Pierre Duval, Thierry Lecroq, Arnaud
Lefebvre (Rouen)
Haifa Stringology Workshop, April 3-8 2005
![Page 2: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/2.jpg)
2
Periodicities (repetitions) in stringsPeriodicities (repetitions) in strings
period: the (global) period: minimal period periodicity = word of period Example: square, cube : fractional periodicity periodicities = “runs” of squares (cyclic) root, 8/3 exponent
![Page 3: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/3.jpg)
3
Finding periodicitiesFinding periodicities
CGCGGCAGTTTTGCCGACTGTTTGGGACTTGCTCGAACTTGCCTATGCCAAGCTGCCGACGATTCCGCCCACCCTGTTGGAACGCGATTTTAATTTCCCGCCTTTTTCCGAACTCGAAGCCGAAGTCGCCAAAATCGCCGATTATCAAACGCGTGCCGGAAAGGAATGCCGCCGTGCAGCCTGAAACCTCCGCCCAATACCAGCACCGTTTCGCCCAAGCCATACGCGGGGGCGAAGCCGCAGACGGTCTGCCGCAAGACCGACTGAACGTCTATATCCGCCTGATACGCAACAATATCTACAGCTTTATCGACCGTTGTTATACCGAAACGCTGCAATACTTTGACCGCGAAGAATGGGGCCGTCTGAAAGAAGGTTTCGTCCGCGACGCGTGCGCCCAAACGCCCTATTTTCAAGAAATCCCCGGCGAGTTCCTCCAATATTGCCAAAGCCTGCCGCTTTTAGACGGCATTTTGGCACTGATGGATTTTGAATATACCCAATTGCTGGCAGAAGTTGCTCAAATTCCGGATATTCCCGACATTCATTATTCAAATGACAGCAAATACACACCTTCCCCTGCGGCCTTTATCCGGCAATATCGATATGATGTTACCGATGATTTGCATGAAGCGGAAACAGCCTTGTTAATATGGCGAAACGCCGAAGATGATGTGATGTACCAAACATTGGACGGCTTCGATATGATGCTGCTAGAAATAATGGGGTTCTCCGCGCTTTCGTTTGACACCCTCGCCCAAACCCTTGTCGAATTTATGCCTGAGGACGATAATTGGAAAAATATTTTGCTTGGGAAATGGTCAGGCTGGACTGAACAAAGGATTATCATCCCCTCCTTGTCCGCCATATCCGAAAATATGGAAGACAATTCCCCGGGCC
![Page 4: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/4.jpg)
4
Finding periodicitiesFinding periodicities
CGCGGCAGTTTTGCCGACTGTTTGGGACTTGCTCGAACTTGCCTATGCCAAGCTGCCGACGATTCCGCCCACCCTGTTGGAACGCGATTTTAATTTCCCGCCTTTTTCCGAACTCGAAGCCGAAGTCGCCAAAATCGCCGATTATCAAACGCGTGCCGGAAAGGAATGCCGCCGTGCAGCCTGAAACCTCCGCCCAATACCAGCACCGTTTCGCCCAAGCCATACGCGGGGGCGAAGCCGCAGACGGTCTGCCGCAAGACCGACTGAACGTCTATATCCGCCTGATACGCAACAATATCTACAGCTTTATCGACCGTTGTTATACCGAAACGCTGCAATACTTTGACCGCGAAGAATGGGGCCGTCTGAAAGAAGGTTTCGTCCGCGACGCGTGCGCCCAAACGCCCTATTTTCAAGAAATCCCCGGCGAGTTCCTCCAATATTGCCAAAGCCTGCCGCTTTTAGACGGCATTTTGGCACTGATGGATTTTGAATATACCCAATTGCTGGCAGAAGTTGCTCAAATTCCGGATATTCCCGACATTCATTATTCAAATGACAGCAAATACACACCTTCCCCTGCGGCCTTTATCCGGCAATATCGATATGATGTTACCGATGATTTGCATGAAGCGGAAACAGCCTTGTTAATATGGCGAAACGCCGAAGATGATGTGATGTACCAAACATTGGACGGCTTCGATATGATGCTGCTAGAAATAATGGGGTTCTCCGCGCTTTCGTTTGACACCCTCGCCCAAACCCTTGTCGAATTTATGCCTGAGGACGATAATTGGAAAAATATTTTGCTTGGGAAATGGTCAGGCTGGACTGAACAAAGGATTATCATCCCCTCCTTGTCCGCCATATCCGAAAATATGGAAGACAATTCCCCGGGCC
![Page 5: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/5.jpg)
5
Some work has been done ...Some work has been done ...
... see R.Kolpakov,G.Kucherov, Periodic structures in words, chapter of the 3rd Lothaire volume Applied Combinatorics on Words, Cambridge University Press, 2005
![Page 6: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/6.jpg)
6
Some work has been done ...Some work has been done ...
... see R.Kolpakov,G.Kucherov, Periodic structures in words, chapter of the 3rd Lothaire volume Applied Combinatorics on Words, Cambridge University Press, 2005
different results based on common simple techniques: extension functions and s-factorization
![Page 7: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/7.jpg)
7
Rest of this talkRest of this talk
Basics– extension functions– computing periodicities in time– s-factorisation (Lempel-Ziv factorization)– computing periodicities in time
Computing all local periods in time
![Page 8: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/8.jpg)
8
Extension function: simplest definitionExtension function: simplest definition
all values can be computed in time [Main&Lorentz 84]
![Page 9: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/9.jpg)
9
Extension function: simplest definitionExtension function: simplest definition
all values can be computed in time [Main&Lorentz 84] a refined algorithm is presented in [Lothaire
05] (inspired from Manacher’s linear-time algorithm for computing palindromes)
![Page 10: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/10.jpg)
10
Extension function: variantsExtension function: variants
![Page 11: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/11.jpg)
11
Using extension functions to compute Using extension functions to compute periodicitiesperiodicities
Lemma: There exists a square of period iff
![Page 12: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/12.jpg)
12
Using extension functions to compute Using extension functions to compute periodicitiesperiodicities
Example:
a t a c g a a c g a a c g g t a c g a a c g a
c g a a c g a ag a a c g a a c
![Page 13: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/13.jpg)
13
Using extension functions to compute Using extension functions to compute periodicitiesperiodicities
Example:
a t a c g a a c g a a c g g t a c g a a c g a
c g a a c g a ag a a c g a a c
![Page 14: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/14.jpg)
14
Using extension functions to compute Using extension functions to compute periodicitiesperiodicities
This implies (using binary division) that one can compute a compact representation of
all squares (maximal periodicieis) in time one can compute all squares in time
[Crochemore 81, Main&Lorentz 84] one can test the square-freeness in time
![Page 15: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/15.jpg)
15
ss-factorization -factorization ((Lempel-Ziv factorization)Lempel-Ziv factorization)
, where :– if letter which immediately follows
does not occur in , then– otherwise is the longest subword
occurring at least twice in Example: s-factorization (Lempel-Ziv factorization) can
be computed in linear time using suffix tree or DAWG
![Page 16: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/16.jpg)
16
Why Why s-s-factorization is useful herefactorization is useful here
![Page 17: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/17.jpg)
17
Why Why s-s-factorization is useful herefactorization is useful here
![Page 18: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/18.jpg)
18
Why Why s-s-factorization is useful herefactorization is useful here
lemma of [Main 89]
![Page 19: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/19.jpg)
19
Computing (a compact representation of) Computing (a compact representation of) all squares in linear timeall squares in linear time
1. compute the s-factorization of (in )2. for each factor
A. compute all maximal periodicities ending inside and crossing the border between and (in )
B. recover all maximal periodicities occurring inside from a left copy of (in )
Important: the number of maximal periodicities is while the number of squares can be
![Page 20: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/20.jpg)
20
Using extension functions + Using extension functions + s-s-factorization factorization to compute periodicitiesto compute periodicities
This implies that one can compute a compact representation of
all squares (maximal periodicities) in time [Kolpakov,Kucherov 99]
one can compute all squares (but also cubes, ...) in time
one can test the square-freeness in time [Crochemore 83, Main&Lorentz 85]
![Page 21: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/21.jpg)
21
Local Local periodperiodss
minimal (local) square at = minimal square centered at local period at (denoted ) = root length of the minimal square at
internal square
right-external square
left- and right-external square
![Page 22: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/22.jpg)
22
Critical Factorization TheoremCritical Factorization Theorem
for any , global period of
Critical Factorization Theorem: For every , there exists a position such that = global period of
![Page 23: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/23.jpg)
23
Computing local periods (minimal squares)Computing local periods (minimal squares)
compute separately– internal minimal squares– left-external and right-external minimal
squares– both left- and right-external minimal
squares focus on internal minimal squares compute s-factorization for each factor , compute minimal squares
ending in this factor
![Page 24: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/24.jpg)
24
Minimal squares inside a factorMinimal squares inside a factor
![Page 25: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/25.jpg)
25
Minimal squares inside a factorMinimal squares inside a factor
![Page 26: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/26.jpg)
26
Minimal squares crossing factor borderMinimal squares crossing factor border
focus on squares crossing the left border of
![Page 27: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/27.jpg)
27
Minimal squares crossing factor borderMinimal squares crossing factor border
focus on squares crossing the left border of focus on those of them centered inside
![Page 28: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/28.jpg)
28
Minimal squares crossing factor borderMinimal squares crossing factor border
focus on squares crossing the left border of focus on those of them centered inside general idea: compute squares and pick the minimal ones
![Page 29: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/29.jpg)
29
Minimal squares crossing factor borderMinimal squares crossing factor border
focus on squares crossing the left border of focus on those of them centered inside general idea: compute squares and pick the minimal ones be careful, the number of squares can be super-linear!!
![Page 30: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/30.jpg)
30
Minimal squares crossing factor borderMinimal squares crossing factor border
focus on squares crossing the left border of focus on those of them centered inside general idea: compute squares and pick the minimal ones be careful, the number of squares can be super-linear!! compute maximal periodicities in increasing order of periods
![Page 31: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/31.jpg)
31
Minimal squares crossing factor borderMinimal squares crossing factor border
focus on squares crossing the left border of focus on those of them centered inside general idea: compute squares and pick the minimal ones be careful, the number of squares can be super-linear!! compute maximal periodicities in increasing order of periods only a linear number of squares need to be tested for
minimality!!
![Page 32: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/32.jpg)
32
Sketch of the proofSketch of the proof
assume we are looking at squares of period
![Page 33: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/33.jpg)
33
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found
![Page 34: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/34.jpg)
34
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found if , then test all squares of period (at most )
![Page 35: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/35.jpg)
35
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found if , then test all squares of period (at most ) if , then either , or
![Page 36: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/36.jpg)
36
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found if , then test all squares of period (at most ) if , then either , or
![Page 37: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/37.jpg)
37
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found if , then test all squares of period (at most ) if , then either , or
![Page 38: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/38.jpg)
38
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found if , then test all squares of period (at most ) if , then either , or
![Page 39: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/39.jpg)
39
Sketch of the proofSketch of the proof
assume we are looking at squares of period consider largest period for which squares have
been found if , then test all squares of period (at most ) if , then either , or at most squares need to be tested
![Page 40: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/40.jpg)
40
Computing (right-)external squaresComputing (right-)external squares
![Page 41: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/41.jpg)
41
Computing (right-)external squaresComputing (right-)external squares
use extension functions!
![Page 42: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/42.jpg)
42
Computing (right-)external squaresComputing (right-)external squares
use extension functions!
![Page 43: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/43.jpg)
43
Computing (right-)external squaresComputing (right-)external squares
use extension functions!
![Page 44: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/44.jpg)
44
Computing (right-)external squaresComputing (right-)external squares
use extension functions! for each , find minimal such that can be done in time
![Page 45: Linear-time computation of local periods Linear-time computation of local periods Gregory Kucherov INRIA/LORIA Nancy, France joint work with Roman Kolpakov](https://reader034.vdocuments.mx/reader034/viewer/2022052309/5a4d1b607f8b9ab0599ad31f/html5/thumbnails/45.jpg)
45
ConclusionsConclusions
All local periods can be computed in
note that the global period of is