Galil-Seiferas example


First attempt
G C A T C G C A G A G A G T A T A C A G T A C G
1 2 3 4  
G C A G A G A G  

Shift by: 1

Second attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Third attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Fourth attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Fifth attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Sixth attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1 2 3 4 5 6 7 8  
  G C A G A G A G  

Shift by: 7 (p1)

Seventh attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Eighth attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Ninth attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Tenth attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G  

Shift by: 1

Eleventh attempt
G C A T C G C A G A G A G T A T A C A G T A C G
  1  
  G C A G A G A G

Shift by: 1

The Galil-Seiferas algorithm performs 25 character comparisons on the example.

Galil-Seiferas algorithm