5 BRANCH AND BOUND FOR
LLPP
The basic idea for the branch and bound is to apply
the same strategy used for LPP, proposed in (Hendy
and Penny, 1982). It is based on an incremental con-
struction of the tree, inserting one species at a time
and analyzing all possible edges where the new node
can be included. Before completing the construction
of the tree, the parsimony score is calculated, solv-
ing the SPP, and then compared to the best score ob-
tained so far. If the current score is greater than or
equal to the current best, the tree under construction
is discarded and the algorithm continues from the next
possible alternative.
We will extend the traditional strategy allowing
species to be inserted into hypothetical internal nodes,
turning them to live internal nodes. Figure 7 il-
lustrates two possibilities for the inclusion of node
4 (among others not shown). Figure 7(a) and Fig-
ure 7(b) show the inclusion of node 4 as a leaf and
as a live internal node, respectively.
Figure 7: Two possible inclusion scenarios for node 4.
One of the premises of branch and bound is that all
possible trees can be obtained and some of them are
discarded by a good pruning. In the traditional case,
as noted by (Hendy and Penny, 1982), the order of
inclusion of the species does not matter. However, in
live phylogeny, depending on the previously defined
order of inclusion of the nodes, some trees will not be
generated, as we can see on Figure 8 if the order of
the species is 0, 1,2,3, 4. We avoid this problem with
extra computational effort.
Figure 8: A tree that cannot be reached if the order of
species inclusion is 0,1,2,3,4.
The algorithm works with three nested loops. The
outer loop generates all possible orders of inclusion
the species stored in a n-position array OS. The next
loop generates all possible orders of construction of
trees, controlling at which edge or node each species
will be included. This order will be stored in an n-
position array OC. Finally, the inner loop repeats the
following sequence of steps, controlled by i, to com-
plete the tree or give up the current construction: (1)
traverse the partial tree setting numbers for the edges
and internal nodes; (2) insert species OS[i] breaking
the edge OC[i] or at the internal node indicated by
OC[i] (making it live); (3) test whether the partial tree
can generate an optimal solution, and if it don’t, in-
terrupt the loop, indicating i as the position where
the current search for the optimal tree failed and re-
questing the next OC position. At this step, we use
the polynomial-time solution of SLPP to calculate the
parsimony score of the partial tree and test against the
best score so far.
To illustrate the branch, we will use the input ma-
trix M shown in Figure 9, with six species and two
characters. By using the inclusion order of species
0,1,. .. 5 and construction order 0,0,0,0, 0,0, we get
the tree shown in Figure 10.
1 2
0 A A
1 T T
2 C G
3 A C
4 G A
5 C T
Figure 9: Input matrix M with species 0, 1, . . . , 5 and two
characters 1 and 2 with states A, C, G and T.
Figure 10: Initial tree with score 7, obtained by using inclu-
sion order 0,1,...,5 and construction order 0,0,0,0,0,0.
As another example, the central tree shown in Fig-
ure 11 is obtained using the inclusion order of species
0,1,2, 3 and construction order 0,0,1. Figures 11(a)
and 11(b) show, respectively, possible inclusions of
species 3 as a leaf and as a live internal node.
Figure 12 shows a most parsimonious tree with
minimal score for M obtained by the proposed branch
and bound strategy. Note that a most parsimonious
tree obtained by branch and bound may be equal to
the tree obtained by traditional branch and bound, or
at least have the same score. If we want a most parsi-
monious tree with l > 0 live internal nodes, we only
need to change the second loop to generate construc-
tion orders that have l live internal nodes.
As pointed by (Hendy and Penny, 1982), the
running time of traditional branch and bound for n
BIOINFORMATICS 2017 - 8th International Conference on Bioinformatics Models, Methods and Algorithms
188