{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

linear_space_alignment

# linear_space_alignment - University of North Texas...

This preview shows pages 1–10. Sign up to view the full content.

Biocomputing University of North Texas Linear Space Alignment: Source: www.bioalgorithms.info

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
University of North Texas Biocomputing Divide and Conquer Algorithms Divide problem into sub-problems Conquer by solving sub-problems recursively. If the sub-problems are small enough, solve them in brute force fashion Combine the solutions of sub-problems into a solution of the original problem (tricky part)
University of North Texas Biocomputing Sorting Problem Revisited Given: an unsorted array Goal: sort it 5 2 4 7 1 3 2 6 1 2 2 3 4 5 6 7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
University of North Texas Biocomputing Mergesort: Divide Step Step 1 – Divide 5 2 4 7 1 3 2 6 5 2 4 7 1 3 2 6 5 2 4 7 1 3 2 6 5 2 4 7 1 3 2 6 log( n) divisions to split an array of size n into single elements
University of North Texas Biocomputing Mergesort: Conquer Step Conquer (Sort and Merge) 1 2 2 3 4 5 6 7 2 4 5 7 1 2 3 6 2 5 4 7 1 3 2 6 5 2 4 7 1 3 2 6 O( n ) O( n ) O( n ) O( n ) O( n log n ) log n iterations, each iteration takes O (n) time. Total Time:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
University of North Texas Biocomputing Divide and Conquer Approach to LCS         Path (source, sink )    if ( source sink  are in consecutive columns)     output the longest path from  source   to  sink    else      middle    middle vertex between  source sink      Path (source, middle )      Path (middle, sink) The only problem left is how to find this “middle vertex”!
University of North Texas Biocomputing Computing Prefix( i ) prefix ( i ) is the length of the longest path from (0,0) to ( i , m /2) Compute prefix ( i ) by dynamic programming in the left half of the matrix 0 m/2 m store prefix ( i ) column

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
University of North Texas Biocomputing Computing Suffix( i ) suffix ( i ) is the length of the longest path from ( i , m /2) to (n,m) suffix ( i ) is the length of the longest path from ( n,m ) to ( i , m /2) with all edges reversed Compute suffix ( i ) by dynamic programming in the right half of the “reversed” matrix 0 m/2 m store suffix ( i ) column
University of North Texas

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 36

linear_space_alignment - University of North Texas...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online