# A Metric on the Space of Partly Reduced Phylogenetic Networks

Authors: Juan Wang
Journal: BioMed Research International
 (2016)

---

## Abstract

Phylogenetic networks are a generalization of phylogenetic trees that allow for the representation of evolutionary events acting at the population level, such as recombination between genes, hybridization between lineages, and horizontal gene transfer. The researchers have designed several measures for computing the dissimilarity between two phylogenetic networks, and each measure has been proven to be a metric on a special kind of phylogenetic networks. However, none of the existing measures is a metric on the space of partly reduced phylogenetic networks. In this paper, we provide a metric,d
e-distance, on the space of partly reduced phylogenetic networks, which is polynomial-time computable.


---

## Body

## 1. Introduction

Phylogenies reveal the history of evolutionary events of a group of species, and they are central to comparative analysis methods for testing hypotheses in evolutionary biology [1]. Computing the distance between a pair of phylogenies is very important for understanding the evolutionary history of species.A metricd on a space S satisfies four properties for all a
,
b
,
c
∈
S:(I)
d
(
a
,
b
)
≥
0 (nonnegative property);
(II)
d
(
a
,
b
)
=
0 if and only if a
=
b (separation property);
(III)
d
(
a
,
b
)
=
d
(
b
,
a
) (symmetry property);
(IV)
d
(
a
,
b
)
+
d
(
b
,
c
)
≥
d
(
a
,
c
) (triangle inequality).Phylogenetic network can represent reticulate evolutionary events, such as recombinations between genes, hybridization between lineages, and horizontal gene transfer [2–5]. For the comparison of phylogenetic networks, there are many metrics on the restricted subclasses of networks including the tripartition metric on the space of tree-child phylogenetic networks [6–9], the μ-distance on the space of tree-sibling phylogenetic networks [10], and the m-distance on the space of reduced phylogenetic networks [11]. Later the m-distance was also proved to be a metric on the space of tree-child phylogenetic networks, semibinary tree-sibling time consistent phylogenetic networks, and multilabeled phylogenetic trees [12–15].For any rooted phylogenetic networkN, we can obtain its reduced version by removing all nodes in maximal convergent sets (will be discussed in the following) and all the nodes, with indegree 1 and outdegree 1, from N. The reduced versions of all rooted phylogenetic networks form the space of reduced phylogenetic networks (m-distance, defined by Nakhleh, is on this space). In this paper, we will discuss the partly reduced version of a phylogenetic network by removing the nodes in a part of the convergent sets and all the nodes, with indegree 1 and outdegree 1, from the phylogenetic network. The partly reduced versions of all rooted phylogenetic networks form the space of partly reduced phylogenetic networks. Then we will introduce a novel metric on the space of partly reduced phylogenetic networks. The space is not the space of rooted phylogenetic networks, but it is the largest space on which a polynomial-time computable metric has been defined so for. The papers [16, 17] have proved that the isomorphism for rooted phylogenetic networks is graph isomorphism-complete. Unless the graph isomorphism problem belongs to P, there is no hope of defining a polynomial-time computable metric on the space of all rooted phylogenetic networks. However, our paper’s aim is mainly to find a larger space on which a polynomial-time computable metric can be defined such that the space is closer to the space of rooted phylogenetic networks.


## 2. Preliminaries

LetN
=
(
V
,
E
) be a directed acyclic graph, or DAG for short. We denote the indegree of a node u as indeg(u) and the outdegree of u as outdeg(u). We will say that a node u is atree node if i
n
d
e
g
(
u
)
≤
1. Particularly, u is aroot of N if i
n
d
e
g
(
u
)
=
0 of N. If a single root exists, we will say that the DAG isrooted. We will say that a node u is areticulate node if i
n
d
e
g
(
u
)
≥
2. A tree node u is aleaf if o
u
t
d
e
g
(
u
)
=
0. A node is called aninternal node if its o
u
t
d
e
g
≥
1. For a DAG N
=
(
V
,
E
), we will say that v is achild of u if (
u
,
v
)
∈
E; in this case, we will also say that u is aparent of v. Note that any tree node has a single parent, except for the root of the graph. Whenever there is a directed path from a node u to v, we will say that v is adescendant of u or u is anancestor of v.Theheight of a node is the length of a longest path starting at the node and ending in a leaf. The absence of cycles implies that the nodes of a DAG N can be stratified by means of their heights: the nodes of height 0 are the leaves; if a node has height a
>
0, then all its children have heights that are smaller than a and at least one of them has height exactly a
-
1.Thedepth of a node is the length of a longest path starting at the root and ending in the node. Similarly, the absence of cycles implies that the nodes of a DAG N can also be stratified according to their depths: the node of depth 0 is the root; if a node has depth b
>
0, then all its parents have depths that are smaller than b and at least one of them has depth exactly b
-
1.LetX be a set of taxa. A rooted phylogenetic network N on X is a rooted DAG such that(i)
no tree node has outdeg 1;
(ii)
its leaves are labeled byX by a bijective mapping f.We use the notationN
=
(
(
V
,
E
)
,
f
) (or N
=
(
V
,
E
)) for the rooted phylogenetic network N and the notation V
N for its leaf set.Definition 1.
Two rooted phylogenetic networksN
1
=
(
(
V
1
,
E
1
)
,
f
1
) and N
2
=
(
(
V
2
,
E
2
)
,
f
2
) are isomorphic if and only if there is a bijection G from V
1 to V
2 such that (i)
(
u
,
v
) is an edge in E
1 if and only if (
G
(
u
)
,
G
(
v
)
) is an edge in E
2;
(ii)
f
1
(
w
)
=
f
2
(
G
(
w
)
) for all w
∈
V
N
1.Moret et al. (2004) discussed the concept of reduced phylogenetic networks from a reconstruction standpoint. Subsequently, we briefly review the concept of reduced phylogenetic networks and introduce a new definition of partly reduced phylogenetic networks. In the following section, we present a metric on the space of all partly reduced phylogenetic networks. First we review the concept of a maximal convergent set that has been given in [7, 11].Definition 2.
Given a networkN
=
(
V
,
E
), we say that a set U of internal nodes in V is convergent if |
U
|
≥
2 and every leaf reachable from some node inU is reachable from all nodes in U.If there is no convergent set U
0 containing U except U itself, we say that U is a maximal convergent set.Here the leaf set reachable from the nodes in a convergent setU is called the leaf set of U.We will take Figure1 as an example in the following. The two networks N
1,  N
2 on {
1
,
2
,
3
,
4
,
x
} are adapted from refinements (1) and (2) in Table 1 in [11].Figure 1
NetworksN
1 and N
2 from refinements (1) and (2) in Table 1 in [11]. H
1 and H
2 (resp., h
1 and h
2) are the reticulate nodes,A~G (resp.,a~g); H
1 and H
2 (resp., h
1 and h
2) as well as the root R (resp., r) are the internal tree nodes in network N
1 (resp., N
2).Example 3.
Consider the networks in Figure1. The set {
H
1
,
H
2
,
G
} is the only maximal convergent set of N
1 and the set {
h
1
,
h
2
,
g
} is the only maximal convergent set of N
2.
For a phylogenetic networkN
=
(
(
V
,
E
)
,
f
) on X, the reduced version of N can be obtained by the following reduction procedures:(1)
For each maximal pendant subtree (i.e., the maximal clade that includes no reticulate nodes)t, rooted at node r
t, create a new node h
t and an edge (p
t
,
h
t), where p
t is the parent of r
t, delete the edge (p
t
,
r
t) and the subtree t, and label h
t as t. Then we denote the resulting network as N
0.
(2)
Repeat the following two steps onN
0 until no change occurs:
(I)
For each maximal convergent setU with leaf set L
U
⊆
V
N
0, remove all nodes and edges on the paths from a node in U to the parent of leaf in L
U, including all nodes in U and excluding the parent of leaf in L
U. For each edge (p
,
v), where p lies outside the deleted set and v lies inside the deleted set, replace it with a set of edges {
(
p
,
q
)
:
q is the parent of leaf in L
U
}.
(II)
For each nodew in the network, with indeg(w) = outdeg(w) = 1, remove the edges (u
,
w), (w
,
v) and the node w, add an edge (u
,
v), where u is the parent of w and v is the child of w. Repeat this step until no such node can be removed.
(3)
Replace each leaf labeled by the subtreet by its root r
t.Figure2 shows the results of applying the reduction procedures to the network N. For the networks in Figure 1, their reduced versions are the same (see Figure 3). The reduced versions of all rooted phylogenetic networks form the space of reduced phylogenetic networks. Nakhleh has introduced a polynomial-time computable metric on this space [11]. In order to enlarge the space in which a polynomial-time computable metric can be defined, we will introduce a new metric and a new space that contains the space of reduced phylogenetic networks.Figure 2
The rooted phylogenetic networkN is on {
1,2
,
3,4
,
5,6
,
7,8
,
9,10
}. N
0, N
1, and N
2 are the networks obtained by applying each one of the three reduction procedures to N, respectively.Figure 3
The reduced version of the networks in Figure1.Definition 4.
Given a networkN
=
(
V
,
E
), let P
(
v
) be the set of parents of a node v in V. We say that U
⊂
V is a super convergent set, if(i)
U is a convergent set;
(ii)
P
(
u
1
)
=
P
(
u
2
) for any two nodes u
1
,
u
2
∈
U;
(iii)
P
(
u
) is a convergent set for a node u
∈
U, if |
P
(
u
)
|
≥
2.Example 5.
The set{
H
,
J
} is the only superconvergent set for any one network in Figure 4, while the networks in Figure 1 have no superconvergent set.Figure 4
NetworksN
1 and N
2 are not isomorphic.We will obtain the new reduction procedures, called partial reduction procedures, from the above reduction procedures by just processing superconvergent sets rather than maximal convergent sets in step (I) of step (2). After applying the partial reduction procedures to a rooted phylogenetic networkN, the partly reduced version of N is obtained. The partly reduced versions of all rooted phylogenetic networks form the space of partly reduced phylogenetic networks. This space contains the space of reduced phylogenetic networks, but they are not identical. Next we will introduce a polynomial-time computable metric for the partly reduced phylogenetic networks.We begin with the notion of node semiequivalence. For the sake of simplicity, we will hereafter refer to the rooted phylogenetic networks as the networks.


## 3. A Metric

Definition 6.
Given a networkN
=
(
(
V
,
E
)
,
f
), we say that two nodes u
,
v
∈
V (not necessarily different) are semiequivalent, denoted by u
≜
v, if (i)
u
,
v
∈
V
N and f
(
u
)
=
f
(
v
) or
(ii)
nodeu has k  (
≥
1
) children u
1
,
u
2
,
…
,
u
k; node v has k children v
1
,
v
2
,
…
,
v
k, and u
i
≜
v
i for 1
≤
i
≤
k.By the definition, it follows that the semiequivalence of nodes is an equivalence relation; that is, it is reflexive, symmetric, and transitive, and the semiequivalent nodes must have the same height.Example 7.
Consider the networkN
1 in Figure 1. For any node u
∈
V
1
∖
{
H
1
,
H
2
}, u is only semiequivalent to u itself, while the nodes H
1 and H
2 are semiequivalent.Property 1.
Ifu
1
,
u
2
,
…
,
u
k are semiequivalent from the network N
=
(
(
V
,
E
)
,
f
), then u
1
,
u
2
,
…
,
u
k are the same nodes or there are the nodes v
1 (u
1 or a descendant of u
1), v
2 (u
2 or a descendant of u
2
)
,
…
,
v
k (u
k or a descendant of u
k) such that v
1
,
v
2
,
…
,
v
k have the same children. See Figure 5.Figure 5
The topology relation of semiequivalent nodes.Proof.
We use induction on the heighta of u
1 to prove it. If a
=
0, obviously u
1
,
u
2
,
…
,
u
k are the only leaf. Thus, in this case, the property holds. We assume that the result is tenable when a
≤
n, and let a
=
n
+
1. Then the children of u
1
,
u
2
,
…
,
u
k are semiequivalent, respectively (let the children of u
i be a
i
1
,
a
i
2
,
…
,
a
i
l for 1
≤
i
≤
k; then a
1
j
,
a
2
j
,
…
,
a
k
j are semiequivalent for 1
≤
j
≤
l), and their height is at most n by the property of node height. By the induction hypothesis, the children of u
1
,
u
2
,
…
,
u
k satisfy the property. The descendants of children of u
1
,
u
2
,
…
,
u
k are the descendants of u
1
,
u
2
,
…
,
u
k. Thus, the property holds.Definition 8.
Given a networkN
=
(
V
,
E
), we say that two nodes u
,
v
∈
V (not necessarily different) are equivalent, denoted by u
≡
v, if u
≜
v, and(i)
u
,
v are the root or
(ii)
nodeu has l  (
≥
1
) parents u
1
,
u
2
,
…
,
u
l; node v has l parents v
1
,
v
2
,
…
,
v
l, and u
i
≡
v
i for 1
≤
i
≤
l.For any nodeu in N, it is equivalent to itself. The equivalence of nodes is also an equivalence relation. The equivalent nodes have the same height and depth.Example 9.
Consider the networkN
1 in Figure 1. For any node u
∈
V
1, it is equivalent to itself. Consider the network N
1 in Figure 4. For any node u
∈
V
1
∖
{
H
,
J
}, it is equivalent to itself, while the nodes H and J are equivalent to each other.Property 2.
Ifu
1
,
u
2
,
…
,
u
k are equivalent in the network N
=
(
(
V
,
E
)
,
f
), then u
1
,
u
2
,
…
,
u
k are the same nodes or there are the nodes p
1 (u
1 or an ancestor of u
1), p
2  (
u
2 or an ancestor of u
2
)
,
…
,
p
k (u
k or an ancestor of u
k) such that p
1
,
p
2
,
…
,
p
k have the same parents. See Figure 6.Figure 6
The topology relation of equivalent nodes.Proof.
We use induction on the depthb of u
1 to prove it. If b
=
0, then u
1
,
u
2
,
…
,
u
k are the unique root node. Thus, in this case, the property holds. We assume that the result is tenable when b
≤
n, and let b
=
n
+
1. Then the parents of u
1
,
u
2
,
…
,
u
k are equivalent, respectively (let the parents of u
i be a
i
1
,
a
i
2
,
…
,
a
i
l for 1
≤
i
≤
k; then a
1
j
,
a
2
j
,
…
,
a
k
j are equivalent for 1
≤
j
≤
l), and their depth is at most n by the property of node depth. By the induction hypothesis, the parents of u
1
,
u
2
,
…
,
u
k satisfy the property. The ancestors of the parents of u
1
,
u
2
,
…
,
u
k are the ancestors of u
1
,
u
2
,
…
,
u
k. Thus, the property holds.In this paper, we are mainly concerned with comparing networks; the notion of node semiequivalence and equivalence will be extended to nodes from two different networks, as established in the semiequivalence and equivalence mapping of Definitions10 and 13, respectively.Given a setV, we use P
(
V
) to denote the set of all subsets of V.Definition 10.
LetN
1
=
(
(
V
1
,
E
1
)
,
f
1
) and N
2
=
(
(
V
2
,
E
2
)
,
f
2
) be two networks on X. We define the semiequivalence mapping between N
1 and N
2, h
:
V
1
→
P
(
V
2
), such that v
∈
h
(
u
), for u
∈
V
1 and v
∈
V
2, if(i)
u
∈
V
N
1, v
∈
V
N
2, and f
1
(
u
)
=
f
2
(
v
) or
(ii)
nodeu has k  (
≥
1
) children u
1
,
u
2
,
…
,
u
k; node v has k children v
1
,
v
2
,
…
,
v
k, and v
i
∈
h
(
u
i
) for 1
≤
i
≤
k.Further, while inequation|
h
(
u
1
)
|
≤
1 holds in phylogenetic trees, it is not always the case for general phylogenetic networks.Example 11.
Consider the networks in Figure1. h is a semiequivalence mapping between N
1 and N
2. For the reticulate nodes H
1 and H
2 in N
1, h
(
H
1
)
=
{
h
1
,
h
2
} and h
(
H
2
)
=
{
h
1
,
h
2
}. For the other nodes in N
1, h
(
A
)
=
{
a
},  h
(
B
)
=
{
b
}
,
…
,
h
(
G
)
=
{
g
},  h
(
1
)
=
{
1
}
,
…
,
h
(
4
)
=
{
4
},  h
(
x
)
=
{
x
}, and h
(
R
)
=
{
r
}.Theorem 12.
LetN
1
=
(
(
V
1
,
E
1
)
,
f
1
) and N
2
=
(
(
V
2
,
E
2
)
,
f
2
) be two networks on X, and let u
1
,
u
2 be two nodes in V
1 and h a semiequivalence mapping between N
1 and N
2. Assume that h
(
u
1
)
≠
∅ and h
(
u
2
)
≠
∅. Then, u
1
≜
u
2 if and only if v
1
≜
v
2, for v
1
∈
h
(
u
1
) and v
2
∈
h
(
u
2
).Proof.
For the “only if” direction, letv
1
∈
h
(
u
1
), v
2
∈
h
(
u
2
), and u
1
≜
u
2. Obviously, u
1,  u
2,  v
1, and v
2 have the same height a. Then, we use induction on such height a to prove v
1
≜
v
2. In particular, if a
=
0, that is, u
1
,
u
2
∈
V
N
1, and f
1
(
u
1
)
=
f
1
(
u
2
), then v
1
,
v
2
∈
V
N
2 and f
2
(
v
1
)
=
f
1
(
u
1
)
=
f
1
(
u
2
)
=
f
2
(
v
2
). Thus, in this case, v
1
≜
v
2. We assume that the result is tenable when a
≤
n, and let a
=
n
+
1. We assume that node u
1 has k children p
1
,
p
2
,
…
,
p
k. Due to u
1
≜
u
2, it follows that node u
2 has k children q
1
,
q
2
,
…
,
q
k, and p
i
≜
q
i (1
≤
i
≤
k). Due to v
1
∈
h
(
u
1
) and v
2
∈
h
(
u
2
), it follows that v
1 has k children w
1
,
w
2
,
…
,
w
k, and w
i
∈
h
(
p
i
) (1
≤
i
≤
k), v
2 has k children y
1
,
y
2
,
…
,
y
k, and y
i
∈
h
(
q
i
) (1
≤
i
≤
k). The height of p
i, q
i, w
i, and y
i is at most n. By the induction hypothesis, w
i
≜
y
i. Thus, v
1
≜
v
2.
For the “if” direction, letv
1
∈
h
(
u
1
), v
2
∈
h
(
u
2
), and v
1
≜
v
2. Similarly, we also use induction on the same height a of u
1, u
2, v
1, and v
2 to prove u
1
≜
u
2. If a
=
0, that is, v
1
,
v
2
∈
V
N
2, and f
2
(
v
1
)
=
f
2
(
v
2
), then u
1
,
u
2
∈
V
N
1 and f
1
(
u
1
)
=
f
2
(
v
1
)
=
f
2
(
v
2
)
=
f
1
(
u
2
). Thus, in this case, u
1
≜
u
2. We assume that the result is tenable when a
≤
n, and let a
=
n
+
1. We assume that node v
1 has k children w
1
,
w
2
,
…
,
w
k. Since v
1
≜
v
2, node v
2 has k children y
1
,
y
2
,
…
,
y
k, and w
i
≜
y
i (1
≤
i
≤
k). Since v
1
∈
h
(
u
1
) and v
2
∈
h
(
u
2
), u
1 has k children p
1
,
p
2
,
…
,
p
k, and w
i
∈
h
(
p
i
) (1
≤
i
≤
k), u
2 has k children q
1
,
q
2
,
…
,
q
k, and y
i
∈
h
(
q
i
) (1
≤
i
≤
k). The height of p
i,  q
i,  w
i, and y
i is at most n by the property of node height. By the induction hypothesis, p
i
≜
q
i. Thus, u
1
≜
u
2.Theorem12 tells us that the semiequivalence mapping keeps the semiequivalence of nodes. Thus, all nodes in h
(
u
) are semiequivalent. Sometimes we use h
(
u
) to denote an arbitrary node in the set. We say that the nodes in h
(
u
) are semiequivalent with u.Definition 13.
LetN
1
=
(
(
V
1
,
E
1
)
,
f
1
) and N
2
=
(
(
V
2
,
E
2
)
,
f
2
) be two networks on X. We define the equivalence mapping between N
1 and N
2, g
:
V
1
→
P
(
V
2
), such that v
∈
g
(
u
), for u
∈
V
1 and v
∈
V
2, if v
∈
h
(
u
), and(i)
u
,
v are the roots or
(ii)
nodeu has l  (
≥
1
) parents u
1
,
u
2
,
…
,
u
l; node v has l parents v
1
,
v
2
,
…
,
v
l, and v
i
∈
g
(
u
i
), for 1
≤
i
≤
l, where h is a semiequivalence mapping between N
1 and N
2.Example 14.
Consider the networks in Figure1. h is the semiequivalence mapping between N
1 and N
2 discussed in Example 11. g is an equivalence mapping between N
1 and N
2 defined in Definition 13. For any node u
∈
V
1
∖
{
H
1
,
H
2
,
G
a
n
d
x
}, g
(
u
)
=
h
(
u
), while g
(
v
)
=
∅ when v
∈
{
H
1
,
H
2
,
G
a
n
d
x
}
.Theorem 15.
LetN
1
=
(
(
V
1
,
E
1
)
,
f
1
) and N
2
=
(
(
V
2
,
E
2
)
,
f
2
) be two networks on X, and let u
1
,
u
2 be two nodes in V
1. g is an equivalence mapping between N
1 and N
2. Assume that g
(
u
1
)
≠
∅ and g
(
u
2
)
≠
∅. Then, u
1
≡
u
2 if and only if v
1
≡
v
2, for v
1
∈
g
(
u
1
) and v
2
∈
g
(
u
2
).Proof.
Letv
1
∈
g
(
u
1
), v
2
∈
g
(
u
2
). Then v
1
∈
h
(
u
1
), v
2
∈
h
(
u
2
) based on Definition 13. For the “only if” direction, let u
1
≡
u
2. We can deduce that v
1
≜
v
2 according to Theorem 12, and u
1, u
2 and v
1 and v
2 have the same depth b. Then, we use induction on b to prove that v
1
≡
v
2. If b
=
0, that is, u
1, u
2 are the unique root node of N
1, then v
1, v
2 are the unique root node of N
2. Thus, in this case, v
1
≡
v
2. We assume that the result is tenable when b
≤
n, and let b
=
n
+
1. We assume that node u
1 has l parents p
1
,
p
2
,
…
,
p
l. Due to u
1
≡
u
2, node u
2 has l parents q
1
,
q
2
,
…
,
q
l, and p
i
≡
q
i (1
≤
i
≤
l). Due to v
1
∈
g
(
u
1
) and v
2
∈
g
(
u
2
), v
1 has l parents w
1
,
w
2
,
…
,
w
l, and w
i
∈
g
(
p
i
) (1
≤
i
≤
l), v
2 has l parents y
1
,
y
2
,
…
,
y
l, and y
i
∈
g
(
q
i
) (1
≤
i
≤
l). The depth of p
i, q
i, w
i, and y
i is at most n by the property of node depth. By the induction hypothesis, w
i
≡
y
i. Thus, v
1
≡
v
2.
For the “if” direction, letv
1
∈
g
(
u
1
), v
2
∈
g
(
u
2
), and v
1
≡
v
2. We can deduce first that u
1
≜
u
2 according to Theorem 12. Similarly, we also use induction on the same depth b of u
1, u
2 and v
1, v
2 to prove that u
1
≡
u
2. If b
=
0, that is, v
1, v
2 are the unique root node of N
2, then u
1, u
2 are the unique root node of N
1. Thus, in this case, u
1
≡
u
2. We assume that the result is tenable when b
≤
n, and let b
=
n
+
1. We assume that node v
1 has l parents w
1
,
w
2
,
…
,
w
l. Due to v
1
≡
v
2, node v
2 has l parents y
1
,
y
2
,
…
,
y
l, and w
i
≡
y
i (1
≤
i
≤
l). Due to v
1
∈
g
(
u
1
) and v
2
∈
g
(
u
2
), u
1 has l parents p
1
,
p
2
,
…
,
p
l, and w
i
∈
g
(
p
i
) (1
≤
i
≤
l), u
2 has l parents q
1
,
q
2
,
…
,
q
l, and y
i
∈
g
(
q
i
) (1
≤
i
≤
l). The depth of p
i, q
i, w
i, and y
i is at most n. So, by the induction hypothesis, p
i
≡
q
i. Thus, u
1
≡
u
2.Theorem15 tells us that the equivalence mapping keeps the equivalence of nodes. Thus, all nodes in g
(
u
) are equivalent. Sometimes we use g
(
u
) to denote an arbitrary node in the set. We say that the nodes in g
(
u
) are equivalent to u.Lemma 16.
LetN
=
(
(
V
,
E
)
,
f
) be a network and u, v
∈
V two equivalent nodes. Then u, v belong to a superconvergent set.Proof.
This lemma is obtained easily from Properties1 and 2.Lemma 17.
LetN
=
(
(
V
,
E
)
,
f
) be a partly reduced phylogenetic network. Then u
1
≢
u
2 for any two nodes u
1
,
u
2
∈
V.Proof.
From the partial reduction procedures of the network, we have that all superconvergent sets in a partly reduced network have been deleted.Given two networksN
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
), assume that V
1
=
{
v
1
,
v
2
,
…
,
v
p
}. The unique nodes of N
1, denoted by L
(
N
1
), is defined by the following processes. First let L
N
1
=
∅. Then for each one node u
∈
V
1, if there exists no node u
′
∈
L
(
N
1
) such that u
′
≡
u, add u to L
(
N
1
). We define L
(
N
2
) in a similar way. Further for each node v
i
∈
L
(
N
1
), we define e
N
1
(
v
i
)
=
|
{
v
∈
V
1
:
v
≡
v
i
}
| and e
N
2
(
u
i
) similarly for each node u
i
∈
V
2. We define e
(
∅
)
=
0 for any network N. When the context is clear, we drop the subscript of e. We are now in a position to define the measure on pairs of partly reduced phylogenetic networks.Definition 18.
LetN
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
) be two phylogenetic networks on X. Then d
e
(
N
1
,
N
2
) equals (1)
1
2
∑
v
∈
L
N
1
max
⁡
0
,
e
v
-
e
v
′
+
∑
u
∈
L
N
2
max
⁡
0
,
e
u
-
e
u
′
,where v
′
(
u
′
) is a node in L
(
N
2
)
(
L
(
N
1
)
) that is equivalent to v
(
u
), and if no such equivalent node exists, then v
′
(
u
′
)
=
∅.Lemma 19.
Ifd
e
(
N
1
,
N
2
)
=
0 for two networks N
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
), then |
V
1
|
=
|
V
2
|.Proof.
Letg
1
:
V
1
→
P
(
V
2
) and g
2
:
V
2
→
P
(
V
1
) be two equivalence mappings from Definition 13. Since d
e
(
N
1
,
N
2
)
=
0, it follows that e
(
v
1
)
=
e
(
g
1
(
v
1
)
) (where g
1
(
v
1
) denotes a node u, which is equivalent to g
1
(
v
1
) and in L
(
N
2
)
) along with |
g
1
(
v
1
)
|
>
0 for all v
1
∈
L
(
N
1
) and e
(
v
2
)
=
e
(
g
2
(
v
2
)
) (where g
2
(
v
2
) denotes a node u, which is equivalent to g
2
(
v
2
) and in L
(
N
1
)
) along with |
g
2
(
v
2
)
|
>
0 for all v
2
∈
L
(
N
2
). From this and Theorem 15, we have that |
V
1
|
=
∑
v
1
∈
L
(
N
1
)
‍
e
(
v
1
)
=
∑
v
1
∈
L
(
N
1
)
‍
e
(
g
1
(
v
1
)
)
≤
|
V
2
| (due to g
1
(
v
1
)
∈
V
2) and |
V
2
|
=
∑
v
2
∈
L
(
N
2
)
‍
e
(
v
2
)
=
∑
v
2
∈
L
(
N
2
)
‍
e
(
g
2
(
v
2
)
)
≤
|
V
1
| (due to g
2
(
v
2
)
∈
V
1). Thus |
V
1
|
=
|
V
2
|.Theorem 20.
LetN
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
) be two partly reduced networks. Then, N
1 and N
2 are isomorphic if and only if d
e
(
N
1
,
N
2
)
=
0.Proof.
Letg
:
V
1
→
P
(
V
2
) be an equivalence mapping, as given in Definition 13. From Lemma 19, it follows that |
V
1
|
=
|
V
2
| and e
(
v
)
=
e
(
g
(
v
)
) for all v
∈
L
(
N
1
). From Lemmas 16 and 17, we have that g
(
v
1
) is defined and unique for each v
1
∈
V
1. We now prove that if (
u
,
v
)
∈
E
1, then (
u
0
,
v
0
)
∈
E
2, where v
0
=
g
(
v
) and u
0
=
g
(
u
). Given that v
0
=
g
(
v
), that is, v and v
0 are equivalent, this implies that v
0 and v have equivalent parents. Since u
0
=
g
(
u
) is defined and unique, u
0 is a parent of v
0. Thus, (
u
0
,
v
0
)
∈
E
2. It shows that the mapping g is bijective, which also preserves the labels of the leaves and the edges of networks. Thus, N
1 and N
2 are isomorphic.
The converse implication is obvious.From the definition of the measure, the symmetry property follows immediately.Lemma 21.
For any pair networksN
1 and N
2, one has d
e
(
N
1
,
N
2
)
=
d
e
(
N
2
,
N
1
).The measured
e
(
N
1
,
N
2
) can be viewed as half of the symmetric difference of two multisets on the same set of elements, where the multiplicity of element u in N
1 is e
N
1
(
u
) and similarly for N
2. Since the symmetric difference defines a metric on multisets [12], we have the following triangle inequality.Lemma 22.
LetN
1, N
2, and N
3 be three networks. Then, d
e
(
N
1
,
N
2
)
+
d
e
(
N
2
,
N
3
)
≥
d
e
(
N
1
,
N
3
).From Theorem20 and Lemmas 21 and 22, we have the following main result.Theorem 23.
The measured
e is a metric on the space of partly reduced phylogenetic networks.Proof.
It follows from Theorem20 and Lemmas 21 and 22 and the fact that max0
,
e
(
v
)
-
e
(
v
′
)
≥
0.LetN
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
) be two phylogenetic networks. For a node u in N
1, we refer to its semiequivalent nodes from N
1 as internal semiequivalence (equivalence) nodes and its semiequivalent (equivalence) nodes from N
2 as external semiequivalence (equivalence) nodes. When computing the distance between two networks, we first compute internal and external equivalence nodes for every node in the two networks; subsequently by formula (1) we obtain the distance between the two considered networks. The maximum of measure d
e
(
N
1
,
N
2
) is (
|
V
1
|
+
|
V
2
|
)
/
2.0, when any node in N
1 and in N
2 has no external equivalence nodes.In order to show the results of the distance computed by formula (1), we give an example as follows.Example 24.
Consider the networks in Figure1. N
1, N
2 are two different networks on {
1
,
2
,
3
,
4
,
x
}. However, in [11], they are indistinguishable and their m-distance [11] is 0. Now, we compute the d
e-distance between them: d
e
(
N
1
,
N
2
)
=
4 (see Example 14).


## 4. Computational Aspects

From the definition of semiequivalent nodes, whether in the same network or in two different networks, we have that the semiequivalent nodes can be computed by means of a bottom-up technique. Similarly, the equivalent nodes can be computed by means of a top-down technique. LetN
1
=
(
(
V
1
,
E
1
)
,
f
1
) and N
2
=
(
(
V
2
,
E
2
)
,
f
2
) be two phylogenetic networks. For a pair of nodes u and v, whether in the same network or in different networks, the following shows the pseudocode (Algorithm 1) that decides whether they are internal semiequivalent to each other, the pseudocode (Algorithm 2) that decides whether they are internal equivalent to each other, and the pseudocode (Algorithm 3) that computes the d
e-distance for a pair of networks (where ISE is the abbreviation for the set of internal semiequivalent nodes, ESE is the abbreviation for the set of external semiequivalent nodes, IE is the abbreviation for the set of internal equivalent nodes, and EE is the abbreviation for the set of external equivalent nodes). If two nodes u and v from the same network are semiequivalent, then we add u to the ISE of v and add v to the ISE of u. Obviously, this decision costs at most O
(
n
3
) time, where n
=
max
⁡
(
|
V
1
|
,
|
V
2
|
). So, it takes totally O
(
n
5
) time to find out all internal and external semiequivalent nodes for every node in the two networks. In a similar way, we have that it also takes O
(
n
5
) time to find out all internal and external equivalent nodes for every node in the two networks. Subsequently we spend O
(
n
) time computing the formula (1). In conclusion, it costs totally O
(
n
5
) time to compute the distance between two networks, where n is the maximum between their node numbers.Algorithm 1:Deciding semiequivalence for two nodes u and v.
(
1) input: nodes u and v
(2) ifthe outdeg of u and the outdeg of v are not equal then
(3)  return
(4) end if
(5) if
u and v are leaves and f
1
(
u
)
=
f
1
(
v
) (or f
1
(
u
)
=
f
2
(
v
) i.e., u and v are from two networks) then
(6)  add v to the ISE of u
(7)  add u to the ISE of v
(8) else
(9)  flag ≔ false
(10)  foreach child a of u
do
(11)   foreach child b of v
do
(12)    if
b.label = truethen
(13)      continue
(14)    end if
(15)    if the ISE of a has b
then
(16)     flag = true
(17)      b.label = true
(18)     end if
(19)   end for
(20)   ifflag = falsethen
(21)     return
(22)   else
(23)     flag = false
(24)   end if
(25)  end for
(26)  add v to the ISE of u
(27)  add u to the ISE of v
(28) end ifAlgorithm 2:Deciding equivalence for two nodes u and v.
(1) input: nodes u and v
(2) if the indeg of u and the indeg of v are not equal, or the ISE of u doesn’t have v (the ESE of u
doesn’t havev i.e., u and v are from two networks) then
(3)  return
(4) end if
(5) if
u and v are rootsthen
(6)  add v to the IE of u
(7)  add u to the IE of v
(8) else
(9)  flag ≔ false
(10)  foreach parent a of u
do
(11)   foreach parent b of v
do
(12)    if
b.label= truethen
(13)     continue
(14)    end if
(15)    ifthe IE of a has b
then
(16)     flag = true
(17)     b.label= true
(18)    end if
(19)   end for
(20)   ifflag = falsethen
(21)    return
(22)   else
(23)    flag = false
(24)   end if
(25)  end for
(26)   add v to the IE of u
(27)  add u to the IE of v
(28) end ifAlgorithm 3:Computing the d
e-distance for N
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
).
(1) input: networksN
1
=
(
V
1
,
E
1
) and N
2
=
(
V
2
,
E
2
)
(2) output:d
e-distance
(3)foreach pair of nodes u and v in V
1
do
(4)  decide semi-equivalence and equivalence for them
(5)end for
(6)foreach pair of nodes u and v in V
2
do
(7)  decide semi-equivalence and equivalence for them
(8)end for
(9)foreach pair of nodes u in V
1 and v in V
2
do
(10)  decide semi-equivalence and equivalence for them
(11)end for
(12)L
(
N
1
)
=
∅; L
(
N
2
)
=
∅
(13) flag1 = false; flag2 = false
(14) foreach node u in V
1
do
(15)  foreach node v in L
(
N
1
)
do
(16)   ifthe IE of v contains u
then
(17)    flag1 = true
(18)   end if
(19)  end for
(20)  ifflag1 = falsethen
(21)   add u to L
(
N
1
)
(22)  end if
(23) end for
(24) foreach node u in V
2
do
(25)  foreach node v in L
(
N
2
)
do
(26)   ifthe IE of v contains u
then
(27)    flag2 = true
(28)   end if
(29)  end for
(30)  ifflag2 = false then
(31)   add u to L
(
N
2
)
(32)  end if
(33) end for
(34) d = 0
(35) foreach node u in L
(
N
1
)
do
(36)  c
=
I
E
-
E
E
(37)  if
c
>
0
then
(38)   d
=
d
+
c
(39)  end if
(40) end for
(41) foreach node u in L
(
N
2
)
do
(42)  c
=
I
E
-
E
E
(43)  if
c
>
0
then
(44)   d
=
d
+
c
(45)  end if
(46) end for
(47) return
d
=
d
/
2


## 5. Conclusion

In [11], Nakhleh introduced a polynomial-time computablem-distance in the space of reduced phylogenetic networks. In order to enlarge the space of phylogenetic networks we can compare, we devised a polynomial-time computable d
e-distance on the space of partly reduced phylogenetic networks, which can be viewed as half of the symmetric difference of two multisets on the same set of elements. To our knowledge, the space is the largest space that has a polynomial-time computable metric. d
e-distance is also a metric on the space of reduced phylogenetic networks which is included in the space of partly reduced phylogenetic networks. In general, for two phylogenetic networks, their d
e-distance is larger than theirm-distance. From [12], we have that the d
e-distance is also a metric on the space of tree-child phylogenetic networks, semibinary tree-sibling time consistent phylogenetic networks, and multilabeled phylogenetic trees. However, the d
e-distance is not a metric on the space of all rooted phylogenetic networks; for example, in the two phylogenetic networks in Figure 4, their d
e-distance is 0, but they are not isomorphic.d
e-distance can also apply to computing the dissimilarity for other types of networks, such as spiking neural networks [18–20], which will be a direction of further research.



---

*Source: 7534258-2016-06-23.xml*