Green University of Bangladesh
Longest Common Subsequence(LCS)
Submited By
Md. Murad Hossain (213002132)
Md Asaduzzaman (213002257)
Submited To
Jargis Ahmed
Lecturer & Program Coordinator
Dept. Of CSE
Green University of Bangladesh
Content
Introduction
What is LCS?
Applications of LCS
Pseudocode
Example & Simulation
Introduction
Longest Common Subsequence (LCS) is a concept that has applications in
various fields, from computer science to bioinformatics. LCS refers to the
longest sequence of characters that are common between two or more
strings. Also on LCS always prove that it can be solved any complex
problem at a time.
What is LCS?
LCS is a concept that is commonly used in computer science and other fields to
find similarities between different strings.
It refers to the longest sequence of characters that are common between two
or more strings. For example, if we have two strings 'ABCD' and 'ACDF', the LCS
between them would be 'ACD'.
Applications of LCS
01. In Bioinformatics.
02. In Plagiarism Detection. 03. In Version Control Systems.
PesuCode
Example & Simulation
Let us understand LCS with an example.
S1 = {R,G,B,G,A,R}
S2 = {B,G,R,A,R}
Among these subsequences, {B,G,A,R} is the longest common subsequence
Simulation
Step-1
j
i
Step-2:
j
i
Step-3:
j
i
Step-4:
j
i
Step-5:
j
i
Step-6:
j
i
Step-7:
Result: “BGAR”
j
i
THANK YOU

Algorithm ppt1.pptx