next up previous
Next: Edit Distance Up: Pairwise Alignment Previous: The Algorithm:

   
Alignment Graph

It is often useful to represent dynamic programming solutions of string problems in terms of a weighted graph.

 
\begin{dfn}{\rm Given two strings $S$\space and $T$\space of lengths
$n$\space a...
...(0\leq i\leq n , 0\leq j\leq m)$ , with the
following weighted edges:} \end{dfn}

1.
((i,j),(i+1 , j)) with weight $\sigma(S_{i+1}, -)$
2.
((i , j+1)) with weight $\sigma( - , T_{j+1})$
3.
((i,j),(i+1 , j+1)) with weight $\sigma(S_{i+1}, T_{j+1})$

A path from node (0, 0) to node (n, m) in the alignment graph corresponds to an alignment and its total weight is the alignment score. Our goal is to find the heaviest path from node (0,0) to node (n,m).

This alignment graph is used to map the problem of optimal alignment into the world of graphs, opening the door for new and exciting algorithms.



Itshack Pe`er
1999-01-03