Dynamic programming and sequence alignment