Using Dynamic Programming Algorithm find out the longest common subsequence (LCS) between the following two strings: X = "AGGTAB" Y = "GXTXAYB" Find out the length of the LCS and the LCS string. (10 pts)
Added by Yolanda D.
Close
Step 1
The problem asks us to find the longest common subsequence (LCS) between two strings X and Y. The LCS is the longest sequence that can be derived from both strings by deleting some characters (possibly none) without changing the order of the remaining characters. Show more…
Show all steps
Your feedback will help us improve your experience
Deepak Kumar and 77 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Find an increasing subsequence of maximal length and a decreasing subsequence of maximal length in the sequence $22,5,7,2,23,10,15,21,3,17$.
Counting
The Pigeonhole Principle
Find an increasing subsequence of maximal length and a decreasing subsequence of maximal length in the sequence 22, 5, 7, 2, 23, 10, 15, 21, 3, 17.
Question 4. (5 points) Longest common subsequence problem Suppose that you have a very fast machine to execute the Smith-Waterman algorithm with any user-specific substitution cost matrix and linear gap penalty (such special-purpose machines exist and were fashionable in the 90's). How would you use it to solve the longest common subsequence: Given two DNA sequences S and T, find the longest sequence X that is a subsequence of both S and T. Note: Subsequences and substrings are two different things. A subsequence is made of characters that occur in the right order in the input spring, but not necessarily consecutively. A substring is a set of consecutive characters of the input string. So every substring is a subsequence, but not vice-versa. For example, BOICS is a subsequence of BIOINFORMATICS, but it is not a substring. IRO is neither a subsequence nor a substring of BIOINFORMATICS.
Sri K.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD