Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(4 points) A strand of DNA is represented as a string over the alphabet -{a, c, g,t). You are given a DNA text T E
(4 points) A strand of DNA is represented as a string over the alphabet -{a, c, g,t). You are given a DNA text T E and a DNA pattern P E ", n-m. Explain how to compute the Hamming distance between the pattern and every offset of the text, i.e., you want to compute the array where, for equal length strings X, Y, HamDist(X, Y) is the number of positions where they differ: Give an O(n log n) algorithm to compute the array A. Just for fun: show how to speed up the algorithm to run in O(n log m) time Hint: convolutions (4 points) A strand of DNA is represented as a string over the alphabet -{a, c, g,t). You are given a DNA text T E and a DNA pattern P E ", n-m. Explain how to compute the Hamming distance between the pattern and every offset of the text, i.e., you want to compute the array where, for equal length strings X, Y, HamDist(X, Y) is the number of positions where they differ: Give an O(n log n) algorithm to compute the array A. Just for fun: show how to speed up the algorithm to run in O(n log m) time Hint: convolutions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started