Smith 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 (bmBc[A]=qsBc[G])

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 (bmBc[G]=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 (bmBc[G]=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
  1 2 3 4 5 6 7 8  
  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 Smith algorithm performs 15 character comparisons on the example.

Smith algorithm