Rosalind第62题:Finding Disjoint Motifs in a Gene

Problem

Given three strings , , and , we say that  and  can be interwoven into  if there is some substring of  made up of  and  as disjoint subsequences.

For example, the strings "" and "" can be interwoven into "". However, they cannot be interwoven into "" because of the appearance of the four 'A's in the middle of the subsequences. Similarly, even though both "" is a shortest common supersequence of  and , it is not possible to interweave these two strings into "" because the two desired subsequences must be disjoint; see “Interleaving Two Motifs” for details on finding a shortest common supersequence of two strings.

Given: A text DNA string  of length at most 10 kbp, followed by a collection of  () DNA strings of length at most 10 bp acting as patterns.

Return: An  matrix  for which  if the th and th pattern strings can be interwoven into  and  otherwise.

给定三个字符串 , 和 ,我们说  和 可以交织成 如果有一些子字符串  由...组成  和 作为不相交的子序列

例如,字符串““和”“可以交织成”“。但是,不能将它们交织为““是因为在子序列中间出现了四个'A'。类似地,即使这两个'“是最短共同超序列的  和 ,则无法将这两个字符串交织成“”,因为两个所需的子序列必须不相交;有关找到两个字符串的最短公共超序列的详细信息,请参见“交织两个基序”

鉴于:一个文本 DNA串 的长度最大为10 kbp,随后是 (DNA串的长度最多为10 bp作为模式

返回:一个 矩阵  为此  如果 和 图案线可以交织成  和  除此以外。

Sample Dataset

GACCACGGTT
ACAG
GT
CCG

Sample Output

0 0 1
0 1 0
1 0 0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值