greed2411 / LCS

The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences). It differs from problems of finding common substrings: unlike substrings, subsequences are not required to occupy consecutive positions within the original sequences. The longest common subsequence problem is a classic computer science problem, and has applications in bioinformatics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LCS

The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences). It differs from problems of finding common substrings: unlike substrings, subsequences are not required to occupy consecutive positions within the original sequences. The longest common subsequence problem is a classic computer science problem, and has applications in bioinformatics.

Use Python 2.7 (while entering the string, enter them in quotes :P)

This algorithm, printing the Longest Common Subsequence problem falls under Dynammic programming and has been implemented two compare two DNA strands and get the lenghthiest subsequence of all the genereated subsequences and print it's length. It also focuses on avoiding the overlapping i.e., avoid calculating the subsequence that has already been generated.

Random DNA sequences can be generated here

Screenshot:

repl python27 screenshot

The above is a screenshot of py2 version of the code.

For python3 version , execute the try.py

For python2 version , execute the main.py

About

The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences). It differs from problems of finding common substrings: unlike substrings, subsequences are not required to occupy consecutive positions within the original sequences. The longest common subsequence problem is a classic computer science problem, and has applications in bioinformatics.


Languages

Language:Python 100.0%