# The Comparison of Tree-Sibling Time Consistent Phylogenetic Networks Is Graph Isomorphism-Complete

Authors: Gabriel Cardona; Mercè Llabrés; Francesc Rosselló; Gabriel Valiente
Journal: The Scientific World Journal
 (2014)

---

## Abstract

Several polynomial time computable metrics on the class of semibinary tree-sibling time consistent phylogenetic networks are available in the literature; in particular, the problem of deciding if two networks of this kind are isomorphic is in P. In this paper, we show that if we remove the semibinarity condition, then the problem becomes much harder. More precisely, we prove that the isomorphism problem for generic tree-sibling time consistent phylogenetic networks is polynomially equivalent to the graph isomorphism problem. Since the latter is believed not to belong to P, the chances are that it is impossible to define a metric on the class of all tree-sibling time consistent phylogenetic networks that can be computed in polynomial time.


---

## Body

## 1. Introduction

After the realization that reticulation processes, like hybridizations, recombinations, or lateral gene transfers, have been more relevant in the evolution of life on Earth than previously thought [1], there has been a growing interest in the development of algorithms for the reconstruction ofphylogenetic networks: graphical models of evolutionary histories that go beyond phylogenetic trees by includinghybrid nodes of in-degree greater than one representing reticulation events. As the number of available such algorithms increases, the need of methods for the comparison of phylogenetic networks also increases, as they are used, for instance, to assess the reliability and robustness of these algorithms [2, 3].One of the types of phylogenetic networks for which there exist reconstruction methods [4, 5] are thetree-sibling time consistent networks,TSTC networks, for short (see [6] for a formal definition). Two metrics on the class of allsemibinary TSTC networks, where all hybrid nodes have in-degree two, have been proposed in the last years. Both metrics are based on encodings of phylogenetic networks that turn out to single out any TSTC network among all such networks: the μ
-vectors (where each node in the network is represented by the vector of numbers of paths from it to each leaf) [7] and thenested labels (where each node in the network is represented by a certain Newick-like representation of the subnetwork rooted at it) [8, 9]. Actually, this last metric turns out to be sound also for the class of all semibinary tree-sibling networks, without the time-consistency restriction [6].But, although there have been several attempts to define a metric on the class of all TSTC networks on a given set of taxa [10], none of the metrics for phylogenetic networks computable in polynomial time proposed so far satisfies the separation axiom (distance 0 means isomorphism) for TSTC networks [8, 11, 12]. In this paper we show why it should come as no surprise; such a metric would solve in polynomial time the graph isomorphism problem.The graph isomorphism problem is one of the most important decision problems for which the computational complexity is not known yet [13, 14]. It is believed to be neither in P nor NP complete, and subexponential time solutions for it are known. A problem is said to begraph isomorphism-complete when it is polynomially equivalent to the graph isomorphism problem [15]. In this paper we show that, for every set S with more than two elements, the isomorphism problem for TSTC phylogenetic networks with taxa bijectively labeled in S is graph isomorphism-complete.


## 2. Preliminaries

LetG
=
(
V
,
E
) be a nonempty rooted directed acyclic graph (a rDAG, for short). A node of G is aleaf if it has out-degree 0,internal if its out-degree is ⩾
1, oftree type if its in-degree is ⩽
1, ofhybrid type if its in-degree is >
1, andelementary if it is a tree node of out-degree 1. A node v is achild of another node u (and, hence, u is aparent of v) if (
u
,
v
)
∈
E. Two nodes u and v aresiblings of each other if they share a parent. An arc (
u
,
v
) in a rDAG is atree arc when v is a tree node and ahybridization arc when v is a hybrid node. Theheight of a node v is the longest length of a directed path from v to a leaf, and thedepth of v is the longest length of a directed path from the root to v.Given a finite setS oflabels, a S
-rDAG is a rDAG with its leaves injectively labelled by S. By an isomorphism of S-rDAGs we understand an isomorphism of directed graphs that preserves and reflects the labelling, that is, that matches each leaf in one network with the leaf with the same label in the other network. In a S-rDAG, we will always identify without any further reference every leaf with its label.Aphylogenetic network on a set S oftaxa is a S-rDAG such that(i)
no tree node is elementary;
(ii)
every hybrid node has out-degree1, and its single child is a tree node.Aphylogenetic tree is a phylogenetic network without hybrid nodes.We will say that a phylogenetic network istree-sibling if every hybrid node has at least one sibling that is a tree node.Atemporal assignment [16] on a network N
=
(
V
,
E
) is mapping τ
:
V
→
ℕ such that(a)
ifv is a hybrid node and (
u
,
v
)
∈
E, then τ
(
u
)
=
τ
(
v
);
(b)
ifv is a tree node and (
u
,
v
)
∈
E, then τ
(
u
)
<
τ
(
v
).We will say that a phylogenetic network istime-consistent if it admits a temporal assignment. The following alternative characterization of time consistency will be used later. For a proof, see [16, 17].Proposition 1.
LetN
=
(
V
,
E
) be a phylogenetic network, let E
H be its set of hybridization arcs, and let N
*
=
(
V
,
E
*
) be the directed graph with the same set V of nodes as N and set of arcs E
*
=
E
∪
{
(
v
,
u
)
∣
(
u
,
v
)
∈
E
H
}. Then, N is time consistent if, and only if, N
* does not have any cycle containing some tree arc of N.For short, we will refer henceforth to tree-sibling time consistent phylogenetic networks simply asTSTC networks.The underlying biological motivation for the definitions on phylogenetic networks introduced so far is the following. In a phylogenetic network, tree nodes model species (either extant, the leaves, or nonextant, the internal tree nodes), while hybrid nodes model reticulation events, where different species interact to create new species. The parents of the hybrid node represent the species involved in this event and its single child being the resulting species. The tree children of a tree node represent direct descendants through mutation. The first condition in the definition of phylogenetic network says that every nonextant species is assumed to have at least two different direct descendants. This is a very common restriction in any definition of phylogeny (be it a tree or a network), since species with only one child cannot be reconstructed from biological data.The tree-sibling condition says then that, for every reticulation event, at least one of the species involved in it must have some descendant through mutation. This condition was introduced with the nameclass I in L. Nakhleh’s Ph.D. thesis [10], and it has reappeared in several phylogenetic network reconstruction methods [4, 5]. As far as the time consistency goes, we understand that the time assigned to a node represents the time when the corresponding species existed, or when the reticulation event took place. The first condition in time consistency means then that the species involved in a reticulation event must coexist in time in order to interact, while the second condition means that speciation takes some amount of time to take place.


## 3. Main Results

It is well known [13, 18] that the isomorphism problem for rDAGs is graph isomorphism-complete. It turns out that the isomorphism problem for rDAGs with their leaves injectively labeled in any given set of labels is also graph isomorphism-complete; since we have not been able to find a proof of this easy result in the literature, we provide one here.Proposition 2.
For every nonempty setS of labels, the isomorphism for S-rDAGs is graph isomorphism-complete.Proof.
Without any loss of generality, we assume thatS
=
{
1
,
…
,
n
}
⊆
ℕ.
Let us prove first that the isomorphism ofS-rDAGs reduces to the isomorphism of rDAGs. For every S-rDAG G, let G
′ be the rDAG obtained from G by unlabelling its leaves and, then, for each k
=
1
,
…
,
n, if G contained a leaf labeled with k, then adding to this leaf k tree-children leaves; see Figure 1. The construction of G
′ from G
=
(
V
,
E
) adds O
(
n
2
)
⩽
O
(
|
V
|
2
) nodes and arcs, and therefore it is polynomial in the size of G. And G can be reconstructed from G
′ by simply replacing, for each k
=
1
,
…
,
n, the node of height 1 with k leaves by a leaf labeled with k. Then, it is straightforward to check that, for every pair of S-rDAGs G
1 and G
2 over S, G
1
≅
G
2 as S-rDAGs if, and only if, G
1
′
≅
G
2
′ as rDAGs.
Let us prove now that the isomorphism of rDAGs reduces to the isomorphism ofS-rDAGs. For every rDAG G, let G
′′ be the S-rDAG obtained from G by adding a new node a, arcs from each leaf of G to a, and finally labeling the new node a with 1; see Figure 2. The construction of G
′′ from G
=
(
V
,
E
) adds 1 node and O
(
|
V
|
) arcs, and therefore it is polynomial. And G can be reconstructed from G
′′ by simply removing its leaf and all arcs pointing to it. It is straightforward to check that, for every pair of rDAGs G
1 and G
2 over S, G
1
≅
G
2 if, and only if, G
1
′
≅
G
2
′ as S-rDAGs.Figure 1
The construction involved in the reduction of the isomorphism ofS-rDAGs to the isomorphism of rDAGs.Figure 2
The construction involved in the reduction of the isomorphism of rDAGs to the isomorphism ofS-rDAGs.Let us see now that the isomorphism problem forS-rDAGs reduces to the isomorphism problem for TSTC networks on a new set of labels consisting of S and two extra labels. This entails that the isomorphism of TSTC networks on sets with at least three labels is graph isomorphism-complete.Theorem 3.
For every setS with |
S
|
⩾
3, the isomorphism of TSTC networks on S is graph isomorphism-complete.Proof.
Without any loss of generality, we assume thatS
=
{
1
,
…
,
n
}
⊆
ℕ.
The isomorphism of TSTC networks onS clearly reduces to the isomorphism of S-rDAGs, since the former is a special case of the latter. Let us prove now the converse reduction.
We will associate to eachS-rDAG N
=
(
V
,
E
) a TSTC network N
¯ on S
∪
{
n
+
1
,
n
+
2
}. If N is a phylogenetic tree, then it is already a TSTC network, and in this case we take N
¯
=
N. Consider now the case when N has some hybrid node or some elementary node, and let m be the largest label actually appearing in N. In this case, we define the TSTC network N
¯ as follows.(1)
For every hybrid nodeh in N, remove all arcs from h to its children, and then add a new (tree) node u
h, an arc from h to u
h, and new arcs from u
h to the children of h in N. If h was a leaf, say with label k, then u
h becomes the new leaf labeled with k.
(2)
For every hybridization arce
=
(
v
,
h
) in the resulting S-rDAG, split it into arcs (
v
,
v
e
) and (
v
e
,
h
), with v
e a new (tree and, for the moment, elementary) node. Let N
′ denote the resulting S-rDAG after these two first steps.
(3)
For every elementary nodev in N, add a new (tree) node v
′ and an arc (
v
,
v
′
).
(4)
Split the arc(
w
,
m
) in N
′ pointing to the leaf m into two arcs (
w
,
w
m
) and (
w
m
,
m
).
(5)
Add two new nodesa and b, and, for every node v
′ added in step (3), add arcs (
v
′
,
a
) and (
v
′
,
b
). Add also arcs (
w
m
,
a
) and (
w
m
,
b
). Notice that the nodes a and b will be hybrid.
(6)
Add a tree leaf children labelledn
+
1 to a and another one labelled n
+
2 to b.
An example of this construction is displayed in Figure3.
Let us prove now thatN
¯ is a tree-sibling time consistent phylogenetic network. (i)
It is rooted (with the same root asN) and acyclic, because all new arcs are either used to split arcs in N into pairs of consecutive arcs, or to define paths that end in the new leaves n
+
1 or n
+
2 without forming cycles.
(ii)
It has no elementary node. Indeed, any elementary node inN gets an extra child in step (3), and the tree nodes that are added to N either get an extra child in step (3) or they get two children in (5).
(iii)
Its hybrid nodes have only one child, and it is a tree node; this is ensured for the hybrid nodes inN in step (1), and for the new hybrid nodes a and b by construction.
(iv)
It is tree-sibling. All hybrid nodes inN get a tree sibling in steps (2) and (3) (for every hybrid node h in N, if e is any arc pointing to h, then the tree child v
e
′ of the new node v
e added in the middle of e is such a tree sibling of h), and the hybrid nodes a and b have the tree sibling m.
(v)
It is time consistent. To check this, we use Proposition1 (and the notations introduced therein). Since we already know that N
¯ is acyclic, any cycle in N
¯
* must contain some inverse of a hybridization arc. There are two possibilities for this inverse. If it has the form (
h
,
x
), with h one of the new hybrid nodes a or b introduced in step (5) and x one of the tree nodes v
′ introduced in step (3) or the tree node w
m introduced in step (4), then the only tree arcs that can be reached from x in N
¯
* are those pointing to the leaves m, n
+
1 or n
+
2, and therefore no cycle in N
¯
* contains this arc (
h
,
x
) together with a tree arc. And if this inverse is of the form (
h
,
v
e
), with h a hybrid node in N and v
e one of the tree nodes introduced in step (2), then it must be followed in the cycle by the arc (
v
e
,
v
e
′
) added in step (3), and, as we have just said, the only tree arcs that can be reached from v
e
′ point to a leaf, and hence no cycle in N
¯
* contains this arc (
h
,
v
e
′
) and a tree arc, either.
It is clear that the construction ofN
¯ from N adds O
(
|
V
|
+
|
E
|
) nodes and arcs to N, and thus it is polynomial in the size of N. Notice also that in this case N
¯ always contains hybrid nodes, and in particular that it is never a phylogenetic tree. Moreover, in this nontree case, the S-rDAG N can be easily reproduced from N
¯ by simply undoing its construction as follows.(1)
Remove the leavesn
+
1 and n
+
2 and their hybrid parents a and b, together with all arcs pointing to them.
(2)
Remove the elementary parent of the leafm (which will be the remaining leaf with largest label in S) and replace it by an arc from the parent of the removed node to m.
(3)
Remove all nonlabeled leaves of the resulting rDAG together with the arcs pointing to them.
(4)
Remove each parentv
e of every hybrid node, and replace it by an arc from the parent of v
e to the hybrid child of v
e.
(5)
Remove the only tree child of each hybrid node, and replace it by an arc from the hybrid node to each one of the children of the removed node.
(6)
The resultingS-rDAG is N.
It is straightforward to check now that, for every pair ofS-rDAGs N
1 and N
2, N
1
≅
N
2 if, and only if, N
1
¯
≅
N
2
¯ as phylogenetic networks over S
∪
{
n
+
1
,
n
+
2
}.Figure 3
An example of the construction involved in the reduction of the isomorphism ofS-rDAGs to the isomorphism of TSTC networks.We cannot remove the condition|
S
|
⩾
3 in the previous result because there are only two TSTC networks with less than 3 leaves (up to the actual names of the labels). In particular, this implies that, in the proof of the previous result, we cannot add less than 2 new leaves in the construction of N
¯ from N.Proposition 4.
There is only one TSTC network with one leaf, and only one TSTC phylogenetic with two leaves (up to relabeling), and in both cases they are trees.Proof.
The{
1
}-rDAG consisting of a single node, labeled 1, and the {
1,2
}-rDAG consisting of the phylogenetic tree with Newick code(1,2); are clearly TSTC networks. Let us check now that any other (up to relabeling) TSTC network has at least 3 leaves.
LetN
=
(
V
,
E
) be a TSTC network other than those described in the last paragraph, let τ
:
V
→
ℕ be a time assignment, and let v be an internal node with largest τ-value and, among those with this largest time assignment, of largest depth.
Ifv is a tree node, then all its children are either leaves or hybrid nodes with leaf children (because any tree descendant node of v has time assignment larger than τ
(
v
)). And v’s hybrid children would have the same time assignment as v but depth largest than v’s depth, against the assumption. Therefore all children of v are leaves, and it has at least 2 children, because it cannot be elementary. Now, if v has more than 2 children, we are done, while if it has only two children, say the leaves 1 and 2, then v will have a parent in N (because N is not the tree(1,2);). If the parent of v is a tree node, let w be this node, and let z be another child of w. Since N does not contain cycles, and any path to 1 or 2 must contain w, we deduce that any descendant leaf of z must be different from 1 or 2; this gives at least 3 leaves. If, on the contrary, the parent of v is a hybrid node x, let w be the parent of x that has a tree child, say z. The time consistency prevents x to be a descendant of z (because τ
(
z
)
>
τ
(
w
)
=
τ
(
x
)) and, therefore, since any path leading to 1 or 2 must contain x, any leaf that is a descendant of z will be different from 1,2; this gives again at least 3 leaves.
Ifv is a hybrid node, then its child is a leaf, say 1. Let v
1 be a parent of v that has a tree child. Since τ
(
v
1
)
=
τ
(
v
) is the largest τ value of an internal node of N, this tree child must be a leaf, say 2. Now let v
2 be another parent of v. Since it is a tree node, it must have another child other than v, say x. If x is a tree node, it is a leaf, as we have just seen. If x is hybrid, then since τ
(
x
)
=
τ
(
v
2
)
=
τ
(
v
), the tree child of x must be a leaf. In both cases, we obtain a leaf that is different from 1 and 2; that is, N contains at least 3 leaves.It is usual in the literature to define a phylogenetic network on a setS of taxa as an rDAG with its leaves bijectively labeled in S. Theorem 3 also holds in this case.Corollary 5.
For every setS with |
S
|
⩾
3, the isomorphism of TSTC networks with leaves bijectively labeled on S is graph isomorphism-complete.Proof.
The isomorphism of TSTC networks with leaves bijectively labeled onS clearly reduces to the isomorphism of TSTC networks with leaves injectively labeled on S, since the former is a special case of the latter. For the converse reduction, let N
1 and N
2 be two TSTC networks with leaves injectively labeled on S, let S
1
⊆
S be the leaf labels of N
1, and let S
2
⊆
S be the leaf labels of N
2. If S
1
≠
S
2, then N
1 and N
2 are not isomorphic. If S
1
=
S
2, let N
¯
1 and N
¯
2 be the TSTC networks obtained by adding to the roots of N
1 and N
2, respectively, |
S
∖
S
1
| leaf children bijectively labeled on S
∖
S
1. These TSTC networks N
¯
1 and N
¯
2 have their leaves bijectively labeled on S, their construction from N
1 and N
2 is polynomial in the size of N
1, N
2, and S, and it is clear that N
1
≅
N
2 if, and only if, N
¯
1
≅
N
¯
2.
This shows that the isomorphism problem for TSTC networks with leaves bijectively labeled onS is polynomially equivalent to the isomorphism problem for TSTC networks with leaves injectively labeled on S, which is graph isomorphism-complete by Theorem 3.


## 4. Conclusion

We have proved that, unless the graph isomorphism problem belongs to P, there is no hope of defining a polynomially computable metric on the class of all TSTC networks on a setS of at least 3 taxa. It remains open the problem of defining polynomially computable metrics on the class of all TSTC networks on a given set S with all their hybrid nodes of in-degree bounded by some d
∈
ℕ. When d
=
2, the μ-distance [7] and Nakhleh’s m metric [8, 9] are such metrics, but they are no longer metrics for d
=
3 (Figure  4 in [8]). Actually, we do not even know whether the isomorphism problem for TSTC networks on a given set S of taxa with globally bounded in-degree hybrid nodes (but without bounding the out-degree of the tree nodes; otherwise, Luks’ theorem [19] would apply) is always in P, but we conjecture that this is the case.



---

*Source: 254279-2014-04-02.xml*