Question: Introduction: ( Assembly MIPS ) Longest Common Sequence ( LCS ) is the longest subsequence that is common in two given sequences, provided that the
Introduction: Assembly MIPS
Longest Common Sequence LCS is the longest subsequence that is common in two given sequences, provided that the elements of the subsequence are not required to occupy consecutive positions within the original sequences. LCS is used in compressing genome resequencing data and to authenticate users within their mobile phone through inair signatures
Implementation:
Define Function: findlcs
Inputs:
an address of the first nullterminated string in Register $
S an address of the second nullterminated string in Register $a
Outputs:
the size of the longest common sequence in Register $
You are asked to write recursive function that find the LCS between two nullterminated strings. The function receives the address of two strings S and S as a parameter and return the length of the longest common sequence as an output. The label of the function should be declared as global ie can be called from another file Refer to the code given below:
int findlcsstring s string s
if return when reach the end of
either strings.
return ;
if advance both pointers if the first chars are
matching
return ::;
else
return ;
Test function find Ics :
Write assembly program that test the function you defined in part The code should prompt the user to enter two strings of maximum of characters then it calls function findlcs The program should print the output to the user. An example is shown below:
Example :
Enter the first string max character: AGGTAB
Enter the second string max character: GXTXAYB
The length of LCS is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
