Rosalind第101题:Quartet Distance

Problem

In “Counting Quartets”, we found an expression for , the number of quartets that can be inferred from an unrooted binary tree containing  taxa.

If  and  are both unrooted binary trees on the same  taxa, then we now let  denote the number of inferred quartets that are common to both trees. The quartet distance between  and ,  is the number of quartets that are only inferred from one of the trees. More precisely, .

Given: A list containing  taxa () and two unrooted binary trees  and  on the given taxa. Both  and  are given in Newick format.

Return: The quartet distance .

“计数四重奏”中,我们找到了,可以从包含以下内容的无根二叉树推断出的四重奏数 分类单元。

如果  和  都是无根的二叉树  分类,那么我们现在让  表示两棵树共有的推断四重奏数。该四重奏距离之间 和 , 是仅从其中一棵树推断出的四重奏的数量。更确切地说,。

给出:包含以下内容的列表 类别()和两个无根的二叉树  和  在给定的分类单元上。都 和 以Newick格式给出。

回程:四重奏距离

Sample Dataset

A B C D E
(A,C,((B,D),E));
(C,(B,D),(A,E));

Sample Output

4
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值