Problem
For the computation of an alignment score generalizing the edit alignment score, let denote the score assigned to matched symbols, denote the score assigned to mismatched non-gap symbols, and denote the score assigned a symbol matched to a gap symbol '-' (i.e., is a linear gap penalty).
Given: Two DNA strings and in FASTA format (each of length at most 5000 bp).
Return: The maximum number of gap symbols that can appear in any maximum score alignment of and with score parameters satisfying , , and .
对于的计算比对得分概括的编辑比对得分,让 表示分配给匹配符号的分数, 表示分配给不匹配的非空白符号的分数,并且 表示分配了与间隙符号“-”匹配的符号的分数(即,是线性间隙罚分)。
给出:两个DNA字符串 和 以FASTA格式(每个长度最多5000 bp)。
返回值:在以下任何最大分数对齐中可以出现的最大间隔符号数量 和 得分参数令人满意 , 和 。
样本数据集
Sample Dataset
>Rosalind_92 AACGTA >Rosalind_47 ACACCTA
Sample Output
3