To do Dynamic Programming: First write one sequence across the top, and one down along the side 2 5 Gap V D 0 Gap -8-16-24 32-40 2 E Global alignments: Needleman-Wunsch-Sellers 3 S 24 o(n2)using linear gap penalty 32 Si= max of: $1, j 1+o(x, yj)(diagonal) 40 S1i-A(from left to right) 18 SiM-1"A(trom top to bottom)1 2 3 4 5 6 To do Dynamic Programming: First write one sequence across the top, and one down along the side i =0 1 2 3 4 5 Gap V 0 -8 sij 4 4 -8 D S C Y j = 0 Gap -16 -24 -32 -40 -8 V -8 E -16 Global alignments: Needleman-Wunsch-Sellers S -24 O(n2) using linear gap penalty L -32 Sij = max of: Si-1, j-1 + σ(xi, yj) (diagonal) C -40 Si-1, j –A (from left to right) Y -48 Si, j-1–A (from top to bottom)