Not So Naive 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  
G C A G A G A G  

Shift by: 2 (l)

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 (k)

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 2  
  G C A G A G A G  

Shift by: 2 (l)

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

Shift by: 2 (l)

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 (k)

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

Shift by: 1 (k)

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 (k)

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 (k)

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 (k)

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 (k)

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 (k)

Twelfth 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 (k)

Thirteenth 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 (k)

Fourteenth 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: 2 (l)

The Not So Naive algorithm performs 27 character comparisons on the example.

Not So Naive algorithm