gusfieldsolutions

# gusfieldsolutions - 1[Answer(1 Algorithm unrestricted on k...

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

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.

Unformatted text preview: 1. [Answer] (1) Algorithm unrestricted on k . Algorithm 1 Pattern Matching without length requirment t ( i, 0) ⇐ 0, for all i t (0 , j ) ⇐ t (0 , j − 1) + σ (“ ” , t [ j ]), for all j for i = 1 to m do for j = 1 to n do t ( i, j ) = max t ( i − 1 , j ) + σ (“ ” , T [ i ]) t ( i, j − 1) + σ (“ ” , P [ j ]) t ( i − 1 , j − 1) + σ ( T [ i ] , p [ j ]) end for end for return argmax j t [ j, m ] (2) Algorhithm with length requirement on k . Define t [ i, l, j ] to be the maximum score of the global alignment between P [1 , j ] and T [ i, i + l ]. Let | P | = m and | T | = n . See the algorithm in the next page. Algorithm 2 Pattern Matching with length requirment for i = 1 to m do t [ i, , 0] = 0 for l = 1 to m do t [ i, l, 0] = t [ i, l − 1 , 0] + σ ( T [ i ] , “ ”) end for for j = 1 to m do t [ i, , j ] = t [ i, , j − 1] + σ (“ ” , P [ j ]) end for end for for i = 1 to m do for j = 1 to n do for l = 1 to n − i do t [ i, l, j ] = max t [ i, l − 1 , j − 1] + σ ( T [ i + 1] , P [ j ]) t [ i, l − 1 , j ] + σ ( T [ i + 1] , “ ”) t ( i, l, j − 1] + σ (“ ” , P [ j ]) end for end for end for return max i,l ≥ k t [ i, l, m ] 2. [Answer] The table-computing step and the traceback step need not change....
View Full Document

## This note was uploaded on 10/01/2009 for the course CS BCB/Co taught by Professor Olivereulenstein during the Fall '06 term at Iowa State.

### Page1 / 4

gusfieldsolutions - 1[Answer(1 Algorithm unrestricted on k...

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

View Full Document
Ask a homework question - tutors are online