Maximal Shift 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  
G C A G A G A G  

Shift by: 1 (qsBc[G]=adaptedGs[0])

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: 2 (qsBc[A])

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: 2 (qsBc[A])

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
  8 7 2 1 6 5 4 3  
  G C A G A G A G  

Shift by: 9 (qsBc[T])

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: 7 (qsBc[C])

The Maximal Shift algorithm performs 12 character comparisons on the example.

Maximal Shift algorithm