1. Finding patterns in DNA sequences is a common task inbioinformatics. A DNA sequence is composed of characters A, C, Gand T representing adenine, cytosine, guanine and thymine,respectively. The KMP algorithm is used when the text and thepattern are not too long. Before running KMP, we must calculate thefailure function of the pattern. We need to find the pattern“GACAGATGA” in a DNA sequence. Calculate the failure function forthe given pattern.
Expert Answer
An answer will be send to you shortly. . . . .