Applying Constraint Programming to sequence alignment/analysis
First read how local and global alignment differ from each other. Then decide an objective function, i.e. how to measure the similarity between two sequences? Maybe use Hamming distance? Or Levenshtein distance? After this the optimization part probably comes out quite naturally.

Be sure to check the existing softwares. Easy things have been tried out already. (And by the way, for some reason biologists call n-grams as k-mers.)