Skip to main content
Fig. 3 | Algorithms for Molecular Biology

Fig. 3

From: Using Robinson-Foulds supertrees in divide-and-conquer phylogeny estimation

Fig. 3

Algorithm 1 working on \(T_1\) and \(T_2\) from Fig. 1 as source trees; the indices of leaves in \(X =\{l_1,l_2,\dots ,l_7\}\) represent the leaves and the notation of \(\pi _1,\dots ,\pi _8\) is from Fig. 2. In (a)–(f), the \(p_1(\cdot )\) score of the trees are 14, 16, 20, 23, 27, 29, in that order. We explain how the algorithm obtains the tree in c from \({\tilde{T}}\) by adding \(\pi _2 = [123|4567]\) to the backbone of \({\tilde{T}}\). Let \(A =\{l_1,l_2,l_3\}\) and \(B = \{l_4,l_5,l_6,l_7\}\). The center vertex c of \({\tilde{T}}\) is split into two vertices \(v_a,v_b\) with an edge between them. Then all neighbors of c between c and A are made adjacent to \(v_a\) while the neighbors between c and B are made adjacent to \(v_b\). All neighbors of c which are roots of extra subtrees are moved around such that all extra subtrees in \(\mathcal {TR}^*(\pi _2)\) are attached onto \((v_a,v_b)\); all extra subtrees in \(\mathcal {TRS}(A) = \{a_1, a_2, b_2\}\) are attached to \(v_a\) and all extra subtrees in \(\mathcal {TRS}(B) = \{b_4,b_5,b_6\}\) are attached to \(v_b\). We note that in this step, \(b_3\) can attach to either \(v_a\) or \(v_b\) because it is not in \(\mathcal {TRS}(A)\) or \(\mathcal {TRS}(B)\). However, when obtaining the tree in d from c, \(b_3\) can only attach to the left side because for \(A' = \{l_1,l_2,l_3,l_4,l_6\}\), \([124|3567] \in \mathcal {BP}(A')\) and thus \(b_3 \in \mathcal {TRS}(A')\)

Back to article page