1 / 7

Longest Common Subsequence

Longest Common Subsequence. Chris Carpenter Charles Cobb Lance Hymel. Problem. Given two strings, find the longest subsequences (LCS) shared by both strings. Dynamic Programming Solution. Construct a n 1 ×n 2 table Fill in table Top-left to bottom-right

conlan
Download Presentation

Longest Common Subsequence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Longest Common Subsequence Chris Carpenter Charles Cobb Lance Hymel

  2. Problem • Given two strings, find the longest subsequences (LCS) shared by both strings.

  3. Dynamic Programming Solution • Construct a n1×n2 table • Fill in table • Top-left to bottom-right • Increment whenever match is found • Bottom-right number is length of LCS • Scan table bottom-right to top-left • Locations where number decreases diagonally are included in LCS

  4. Hirschberg Solution

  5. Hirschberg Solution (cont) • Recursively scan • Still runs in linear time • Uses O(min(string1, string2)) memory

  6. Real-World Implementations • File comparison • Source-code control • Insertion, Deletion, Merging • Bioinformatics • Sequence analysis • Comparative genomics

  7. Bioinformatics • Sequence analysis is the process of subjecting a DNA, RNA or peptide sequence to any of a wide range of analytical methods • The analytical methods include : • Sequence Alignment • Methodical biological database searches

More Related