**0**wrote:

Hello, I have been struggling to understand about gap penalty. I learned how to use dynamic programming to align two sequences. In class, we use gap penalty as 0 including opening and extension gap.

Now I'm dealing with problem with internal gap penalty of -2 and opening/extension gap penalty of 0. I though all zeros in first column and row are opening and extension gap, but it didn't seems right when I tried to back trace.

So for example if I have a sequence called x (GTATTGA) and sequence y (AGTCCTATGCA), then how do I know where opening and extension gap are? I'm not asking you to solve my problem, but I'm confused about the concept.

Maybe somebody can help me understand clearly about this? I appreciate for your help in advance!

**3.6k**• written 5.2 years ago by junghyunjulie •

**0**