Given a DNA sequence S ¼ s 1 ,s 2 , . . . ,s n , GINðmÞ ¼ k, where k¼min value of i such that s m ¼ s m þ i ,m þ i rn else k¼nÀ m.