Subject Computer Science Data Structures and Algorithms

Question

Given two strings (sequences of characters), the longest common subsequence (LCS) problem is to find the longest subsequence (not necessarily contiguous) that exists in both of the input strings. For example, given strings “mangoes” and “mementos”, the subsequence “mnos” is common in both and is in fact the longest common subsequence. Given two strings of sizes n1 and n2 respectively, find a dynamic programming algorithm to find the longest common subsequence in O(n1n2) time.

The [report] should include:

(1) Briefly describe the problem.
(2) Analyze the problem and give the algorithm to solve the problem. This algorithm should be based on Dynamic Programming. It is the most important part in this assignment, please describe this solution with your detailed and well-developed explanations and analysis.
(3) Introduce your program and describe how it implements the algorithm and solves the problem. Please do not copy all your codes on the report, but you could write some core codes with detailed annotations to help you illustrate your program.
(4) As a way to analyze your program/algorithm, please state the input and output of your program. And, you need to get numerous results for different input sizes.
(5) Briefly analyze the time complexity of your algorithm.

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Description of the Problem – in this assignment it is intended to find the length of the longest common subsequence of two strings. It is not compulsory for the searched subsequence to be contiguous, but it needs to have the same relative order in both input strings. The scope of the problem is not to check all letters from one string against the letters of the other string, but to identify efficient ways for evaluating the common sub-sequences....

This is only a preview of the solution. Please use the purchase button to see the entire solution

$30.00

or free if you
register a new account!

Assisting Tutor

Related Homework Solutions

Big Data (530 words)
Homework Solution
$20.00
Big
Data
Algorithm
Input
Output
Complexity
Technical
Scientific
Theory
Performance
Criteria
Cost
Euclidean
Machine
Learning
Structured
Unstructured
Analytics
Business
Voronoi
NP-Hard
Partition
Clustering
Mean
Dynamic Programming Model for A Version of Job Scheduling Problem
Homework Solution
$30.00
Knapsack
Reduction
Algorithm
Complexity
Problem
Job
Scheduling
Dynamic
Programming
OPT
Optimal
Swapping
Exchange
Argument
Playful
Subset
Deadline
Value
Size
Profit
Function
Solution
Set
Array
Two
Dimensional
Selection
Reorder
M
Get help from a qualified tutor
Live Chats