Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Winder is a new smartphone app designed to make it easier for everyone to eat their vegeta - bles. Vinder compares your genetic information with
Winder is a new smartphone app designed to make it easier for everyone to eat their vegetables. Vinder compares your genetic information with a large database of vegetable genetic sequences to match you with the right vegetable based on sequence similarity. Specifically, it computes the longest common subsequence between your DNA sequence and the DNA sequences of thousands of vegetables. An nlength DNA sequence, A is an ordered collection of elements A CG T or A A C G T A subsequence is a sequence formed by deleting elements from another sequence, thus preserving the original order. A klength prefix of sequence A is the first k elements of A For example, A A C C G G A A T C is a sequence. A C A T and C are subsequences of A but T Aj is not. A CC G is a prefix of A and is the prefix. Our goal is to find the longest common subsequence LCS of A the human DNA sequence, and sequences Bk D where D is the database of vegetable DNA sequences and k ID This solution can be found efficiently using dynamic programming. At a highlevel, the algorithm is: For each sequence Bk D Initialize the length of the LCS to Let A; denote the ith element of A Consider each pair of A; and Bk; either Ai B: or A # B; If A; Bk then the length of the LCS of the iprefix of A and jprefix of Bk is one more than the LCS of the i prefix of A and jprefix of Bk If Ai # Bk then we cannot extend the LCS Instead, we conclude that the LCS up to Ai B; is the maximum of the LCS up to Ai B; or Ai B; The two aforementioned cases sum up the possibilities at Ai Bj We can use these to recursively define the LCS in terms of smaller problem solutions. Your goal is to describe the algorithm to do this. Describe an algorithm to find the length of the LCS that does not use dynamic programming. You do not have to write pseudocode, simply describe the algorithm in enough detail so that we understand it What is the runtime? Why is it correct? You may keep your answers informal. Hint: a bruteforce or recursive solution should have exponential runtime. CSE Homework Write out the recurrence relation used in the algorithm defined in the problems description not part of the answers That is write out how the LCS length can be expressed in terms of smaller instances of the problem. Think about how to convert this into a dynamic program. What size table would you need for the LCS problem? Interpret each table entry. That is give your explanation for what each entry
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