Maximizing All-Paths Phylogenetic Diversity: Parameterized Approaches for Networks1


Abstract

Phylogenetic Diversity (PD) is a fundamental measure of biodiversity, originally defined on phylogenetic trees and widely used in conservation biology. Phylogenetic trees are often generalised to directed acyclic graphs, called phylogenetic networks. As such, a corresponding generalization of PD is needed. A natural generalization to edge-weighted phylogenetic networks is the all-paths measure, where the diversity of a set \(S\) of species (taxa) is defined as the total weight of all edges that lie on a path from the root to at least one species in \(S\). While maximizing PD on trees can be solved in polynomial time, the corresponding problem on networks is NP-hard and difficult to approximate. We undertake a systematic parameterized complexity study of the Max-All-Paths-PD(MapPD) problem. We establish W[2]-hardness when parameterized by the number of species that are included in a solution, and W[1]-hardness for the number of species that are excluded. On the positive side, we show that the problem is fixed-parameter tractable with respect to the threshold of diversity and the acceptable loss of diversity. We further analyze how the network’s proximity to a tree influences algorithmic behavior and present single-exponential fixed-parameter algorithms when parameterized by the number of reticulations and by the treewidth of the underlying graph. Finally, we present a polynomial kernelization for MapPD with respect to the number of reticulation edges.

1 Introduction↩︎

Phylogenetic diversity, first introduced in 1992 by Faith [2], is a well-established measure of the amount of biodiversity in a set of species. It formalizes the intuitive notion that a set of species is likely to have a greater range of biological features when they are distantly related. Such a measure is of crucial importance in the field of biological conservation, where there are often insufficient resources available to save every threatened species, one must make hard decisions about which species to prioritize. Phylogenetic diversity forms the basis of the Fair Proportion Index and the Shapley Value [3][5], which are used to evaluate the individual contribution of individual species to overall biodiversity. These measures are used by conservation initiatives such as the IUCN’s Phylogenetic Diversity Task Force (https://www.pdtf .org/) and the Zoological Society of London’s EDGE of Existence program [6].

The subject of phylogenetic diversity is the phylogenetic tree; that is, a rooted tree, with weights on the edges, whose leaves represent a subset of present-day species. The phylogenetic diversity \({PD_{{\mathcal{N}}}}(S)\) of a set of species \(S\) is the total weight of edge on a (directed) path from the root to one of the leaves in \(S\). Here the weight of an edge corresponds to phylogenetic distance, which is taken to be proportional to the number of features of interest (e.g. biological characteristics) that emerge along that edge.

Phylogenetic diversity as originally proposed by Faith is defined for phylogenetic trees. Consequently, it does not allow for models of evolutionary history with reticulation events (where a species inherits genetic data from two or more species), such as hybridization or lateral gene transfer. Such events are modeled in phylogenetic networks (directed acyclic graphs with a single source), which extend the class of phylogenetic trees [7]. There are a number of ways to extend phylogenetic diversity to phylogenetic networks [8][10]. In this paper, we consider one of the simplest, all-paths phylogenetic diversity (first introduced under the name ‘phylogenetic subnet diversity’ in [10] and further studied in [8]). Under this measure, given a rooted phylogenetic network \({\mathcal{N}}\) with edge weights, the phylogenetic diversity of \(S\) is again the total weight of all edges on a (directed) path from the root to one of the leaves in \(S\).

Assuming it is not possible to preserve all threatened species (e.g. due to limited resources), we would like to find a subset of species that can be preserved, for which the overall diversity is maximized. This gives rise to the maximum all-paths phylogenetic diversity problem (MapPD): given a network \({\mathcal{N}}\) and integer \(k\), find a set of at most \(k\) species that maximizes the all-paths phylogenetic diversity score. Fortunately, in the case of trees, this turns out to be a tractable problem—given as input a phylogenetic tree and number \(k\), there is a polynomial-time greedy algorithm that outputs the set of \(k\) species with maximum phylogenetic diversity [11], [12]. Unfortunately, this result does not extend to phylogenetic networks—MapPD is NP-hard, and cannot be approximated in polynomial time with approximation ratio better than \(1-\frac{1}{e}\) unless \(\texttt{P} = {\normalfont\texttt{NP}}\) [8]. For this reason, we study the problem from the perspective of parameterized complexity.

Related work

All-paths phylogenetic diversity as a measure on networks was first introduced in [10]. The computational complexity of MapPD was first studied in [8], where the authors showed that the problem is NP-hard and cannot be approximated in polynomial time with approximation ratio better than \(1-\frac{1}{e}\) unless \(\texttt{P} = {\normalfont\texttt{NP}}\), but is polynomial-time solvable on the class of level-1 networks (in which the undirected cycles are pairwise vertex-disjoint).

Phylogenetic diversity forms the basis of the Shapley Value, a measure that describes how much a single species contributes to overall biodiversity. The definition of the Shapley Value involves the phylogenetic diversity of every possible subset of species, and so is difficult to calculate directly. However, it was shown in [13] that (on phylogenetic trees) the Shapley Value is equivalent to the Fair Proportion Index [5], which can be calculated in polynomial time. In the case of phylogenetic networks, it was shown that this result also extends to Shapley Value based on all-paths phylogenetic diversity. This is in contrast to the NP-hardness result of [8]—while it is easy to determine the individual species that contributes the most phylogenetic diversity across all sets of species, it is hard to find a set of species for which the phylogenetic diversity is maximal.

The phylogenetic networks considered in this paper are explicit networks, in which each vertex represents a different species in evolutionary history and the edges represent the transfer of genetic information from one species to another. Phylogenetic diversity has also been studied on split networks. Such networks do not represent a single explicit evolutionary history, but can represent structural information from several sources (e.g. conflicting phylogenetic trees)—see e.g. [14][16].

Reactions to the previous version of this work

The initial publication of this paper in 2023 marked the beginning of a deeper study of phylogenetic diversity on networks. More realistic models of phylogenetic diversity such as Network-PD, in which each reticulation edge has an inheritance probability [8], [17], and Average-Tree-PD, in which the average PD of all displayed trees is considered [9], have been introduced and analyzed. As these problem turn out to be computationally even harder, MapPD seems to be a good, tractable core model when analyzing phylogenetic diversity on networks. Following up on our algorithms, two version of MapPD on semi-directed phylogenetic networks have been presented in the software-package PaNDA [18], [19]. Further to our study, MapPD has also been analyzed when ecological dependencies are taken into account [20]. (For more information on phylogenetic diversity with ecological dependencies, see [21][26].)

Our contribution

We conduct a comprehensive parameterized analysis of the problem Max-All-Paths-PD(MapPD), in which the task is to find a set of at most \(k\) leaves maximizing the all-paths phylogenetic diversity in a network (see Section 2 for a formal definition). Our results delineate a sharp complexity boundary. We show in Section 3 that MapPD is \({\normalfont\texttt{{W}}}[2]\)-hard with respect to \(k\), the number of saved species, and W[\(1\)]-hard with resect to \({\overline{k}}\), the number of excluded species, by establishing an equivalence between this parameterization of MapPD and a generalization of Set Cover called Item-Weighted Partial Set Cover. Both parameterizations are clearly XP, as it is sufficient to check all sets of size \(k\) as a solution or sets of size \({\overline{k}}\) as the complement of a solution.

On the positive side, we show in Section 4.1 that MapPD is fixed-parameter tractable (FPT) with respect to \(D\), the total phylogenetic diversity of the desired solution, and also with respect to the ‘dual’ \({\overline{D}}\), i.e. the acceptable loss in phylogenetic diversity.

Finally we turn to structural parameters. In Section 4.2 we give single-exponential fixed-parameter algorithms for MapPD with respect to the number of reticulations in the network, and with respect to the treewidth of the underlying graph of the network, two parameters that are small in practice on natural networks that are relatively tree-like. In the case of reticulations, this algorithm is asymptotically tight under the Strong Exponential Time Hypothesis. We complete this work by showing in Section 5 that MapPD admits a polynomial kernel when parameterized by the number of reticulation edges.

Together, these results provide a detailed parameterized complexity landscape for MapPD. 1 depicts a summary of the results presented in this paper.

Table 1: An overview over the parameterized complexity results for .
Parameter
Budget \(k\) -hard, [thm:k43maxw]
Diversity \(D\) Cor. [thm:D]
Species-loss \(\kbar\) -hard, [thm:kbar]
Diversity-loss \(\Dbar\) [thm:Dbar]
Number of [thm:ret]
reticulations  poly-kernel open
Number of [thm:ret]
ret.-edges  poly-kernel [thm:kernel]
Treewidth [thm:tw]

2 Preliminaries↩︎

For an integer \(\ell\), by \([\ell]\) we denote the set \(\{1,\dots,\ell\}\) and \([\ell]_0:=\{0\}\cup [\ell]\).

In our running time analyses, we assume a unit-cost RAM model where arithmetic addition of integers \(N\) and \(M\) can be done in \(\mathcal{O}(\log N + \log M)\) time. We use \(\mathcal{O}^*\) to denote running time complexity ignoring polynomial factors.

Phylogenetic Networks and Phylogenetic Diversity

A phylogenetic \(X\)-network \({\mathcal{N}}=(V,E,{\omega})\) is a directed, acyclic graph \(G = (V,E)\) with edge-weight function \({\omega}: E\to \mathbb{N}_{>0}\) and a single vertex of in-degree \(0\) (the root), in which the vertices of out-degree \(0\) (the leaves) have in-degree \(1\) and are bijectively labeled with elements from a set \(X\), and such that all vertices have in-degree at most \(1\) or out-degree at most \(1\). For brevity, we usually refer to a phylogenetic \(X\)-network as an \(X\)-network, or more simply a network when the set \(X\) is not relevant. The vertices with in-degree at least \(2\) and out-degree \(1\) are called reticulations; the other non-leaf vertices are called tree vertices. Any edge incoming at a reticulation is a reticulation edge.

In biological applications, the set \(X\) is a set of taxa (species), the internal vertices of \({\mathcal{N}}\) correspond to biological ancestors of these taxa and \({\omega}(e)\) describes the phylogenetic distance between the endpoints of \(e\) (as these endpoints correspond to distinct species, we may assume this distance is greater than \(0\)). Throughout the paper we use the conventions that \(n:= |V|\), \(m:= |E|\), and \(\rho\) is the root of the network.

For a vertex \(v\), the set of descendants \(\mathop{\mathrm{desc}}(v)\) of \(v\) is the set of vertices \(u\) for which there is a path from \(v\) to \(u\) (note that \(v \in \mathop{\mathrm{desc}}(v)\)). We analogously define the set of ancestors \(\mathop{\mathrm{anc}}(v)\) of \(v\) as the set of vertices \(u\) for which there is a path from \(u\) to \(v\). The offspring \(\mathop{\mathrm{off}}(v)\) of \(v\) is the intersection of \(\mathop{\mathrm{desc}}(v)\) and \(X\). Further, for each edge \(e=(v,w)\), we define \(\mathop{\mathrm{anc}}(e)=\mathop{\mathrm{anc}}(v)\), \(\mathop{\mathrm{desc}}(e)=\mathop{\mathrm{desc}}(w)\) and \(\mathop{\mathrm{off}}(e)=\mathop{\mathrm{off}}(w)\). For each set of taxa \(Y\), an edge \(e\) is affected by \(Y\) if \(\mathop{\mathrm{off}}(e)\cap Y \ne \emptyset\) and strictly affected by \(Y\) if \(\mathop{\mathrm{off}}(e)\subseteq Y\). The sets \(T_Y\) and \(E_Y\) are the sets of edges strictly affected and affected by \(Y\), respectively. For each set of taxa \(Y\), the all-paths phylogenetic diversity \({PD_{{\mathcal{N}}}}(Y)\) of \(Y\) is

\[{PD_{{\mathcal{N}}}}(Y) := \sum_{e\in E_Y} {\omega}(e).\]

That is, \({PD_{{\mathcal{N}}}}(Y)\) is the total weight of all edges \((u,v)\) in \({\mathcal{N}}\) such that there is a path from \(v\) to a vertex in \(Y\). We refer to \({PD_{{\mathcal{N}}}}(Y)\) simply as the phylogenetic diversity of \(Y\).

Parameterized Complexity and Kernelizations

For a detailed introduction to parameterized complexity refer to the standard monographs [27], [28]. We only present a small introduction.

There is a natural bijection between decision problems and formal languages over some alphabet \(\Sigma\). A parameterized language is subset \(L \subseteq \Sigma^* \times \mathbb{N}_0\). For each pair \((\sigma,k) \in L\), \(k\) is called the parameter of this pair. A parameterized language is fixed-parameter tractable (FPT) if there exists an algorithm \(\mathcal{A}\) that decides for any input \((\sigma,k) \in \Sigma^* \times \mathbb{N}_0\) whether \((\sigma,k) \in L\) in time \(f(k) \cdot \mathop{\mathrm{poly}}(|\sigma|)\), for some \(f(\cdot)\) computable function. A parameterized language is slicewise polynomial (XP) if there exists an algorithm \(\mathcal{A}\) that decides for any input \((\sigma,k) \in \Sigma^* \times \mathbb{N}_0\) whether \((\sigma,k) \in L\) in time \(|\sigma|^{f(k)}\), for some computable function \(f(\cdot)\). Every problem that is FPT is also in XP. It is widely believed that \({\normalfont\texttt{{W}}}[h]\)-hard problems, for \(h \ge 1\), are not in FPT.

A kernel—also called kernelization or kernelization algorithm—for a parameterized language \(\Pi \subseteq \Sigma^* \times \mathbb{N}_0\) is an algorithm \(\mathcal{A}\) which, given a pair \((\sigma,k) \in \Sigma^* \times \mathbb{N}_0\), constructs in \(\mathop{\mathrm{poly}}(|\sigma|+k)\) time another pair \((\tau,\ell) \in \Sigma^* \times \mathbb{N}_0\) such that \(\ell \le f(k)\), and \((\sigma,k) \in \Pi\) if and only if \((\tau,\ell) \in \Pi\), where \(f(\cdot)\) is some computable function. A kernel \(\mathcal{A}\) is polynomial if \(f(\cdot)\) is a polynomial.

Problem Definitions and Parameterizations

Our main object of study is the following problem, introduced in [8]:

Max-All-Paths-PD(MapPD)

Input: A phylogenetic \(X\)-network \(\mathcal{N}\) and two integers \(k\) and \(D\).
Question: Is there a subset \(Y\subseteq X\) of taxa with size at most \(k\) and phylogenetic diversity at least \(D\)? That is, \(|Y|\le k\) and \({PD_{{\mathcal{N}}}}(Y)\ge D\).

When \(Y\) satisfies the conditions above, we say \(Y\) is a solution for MapPD on \(({\mathcal{N}},k,D)\).

In Section 3, we show that there is a strong connection between MapPD and the problem Item-Weighted Partial Set Cover, which is defined as follows.

Item-Weighted Partial Set Cover(wpSC)

Input: A universe \(\mathcal{U}\), a family \(\mathcal{F}\) of subsets over \(\mathcal{U}\), an integer weight \({\omega}(u)\) for each item \(u\in\mathcal{U}\) and two integers \(k\) and \(D\).
Question: Are there sets \(F_1,\dots,F_k\in \mathcal{F}\) such that sum of the weights of the elements in \(L := \bigcup_{i=1}^k F_i\) is at least \(D\)? That is \(\sum_{u\in L} {\omega}(u) \ge D\).

When \(F_{1},\dots,F_{\ell}\) satisfy the above condition, then \(\{F_{1},\dots,F_{\ell}\}\) is a solution for wpSC on \((\mathcal{U}, \mathcal{F},{\omega}, k, D)\).

Set Cover is the special case of wpSC with \(D=|\mathcal{U}|\) and \({\omega}(u)=1\) for each \(u\in\mathcal{U}\).

In addition to the parameters \(k\) and \(D\), which are the number of saved taxa and the preserved phylogenetic diversity, we also study the ‘dual’ parameters which are the minimum number of species that will go extinct \({\overline{k}}:= |X|-k\) and the acceptable loss of phylogenetic diversity \({\overline{D}}:= {PD_{{\mathcal{N}}}}(X) - D\). By \(\max_{\omega}\), we denote the biggest weight of any edge. By \(\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}\), we denote the number of reticulations in \(\mathcal{N}\) and, by \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\), we denote the number of reticulation-edges which need to be removed such that \(\mathcal{N}\) is a tree. More formally, \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}:= \sum_{r \in R} (\deg^-(r) -1) = |E| - |V| + 1\), where \(R\) is the set of reticulations of \(\mathcal{N}\) and \(\deg^-(v)\) is the in-degree of a vertex \(v\). Some authors refer to \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\) as the reticulation number, since  \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}= {\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\) on binary networks. By \(\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}\), we denote the treewidth of the underlying undirected graph of \(\mathcal{N}\). We formally define treewidth in 2. For further insight into treewidth, we refer to [27].

A phylogenetic \(X\)-network is called binary if the root has a degree of 2 and each other non-leaf has a degree of 3. Throughout this work, we do not assume the network to be binary. In a previous version of this paper [1], we mistakenly stated that it is possible to transform phylogenetic networks in polynomial time to binary phylogenetic networks without increasing the treewidth. The construction was false, but the remaining algorithms are correct.

3 Relationship to Item-Weighted Partial Set Cover↩︎

In this section, we demonstrate a relationship between MapPD and wpSC by presenting reductions in both directions. Bordewich et al. already proved a similar reduction from Set Cover to MapPD[8].

Lemma 1. For every instance \({\mathcal{I}}= (\mathcal{U},\mathcal{F},{\omega},k,D)\) of wpSC,

  1. an equivalent instance \({\mathcal{I}}' =({\mathcal{N}},k',D')\) of MapPD with \(k'=k\) and \(|X|={\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}=|\mathcal{F}|\), can be computed in time polynomial in \(|\mathcal{U}|+|\mathcal{F}|\);

  2. an equivalent instance \({\mathcal{I}}_2' = ({\mathcal{N}}= (V,E,{\omega}'),k',D')\) of MapPD in which \(k'=k\) and each edge has weight 1, can be computed in time polynomial in \(|\mathcal{U}|+|\mathcal{F}|+\max_{\omega}\).

This lemma has several implications for the complexity of MapPD. Because Set Cover is W[\(2\)]-hard with respect to the size of the solution \(k\), wpSC and consequently MapPD are as well.

Theorem 1. MapPD is \({\normalfont\texttt{{W}}}[2]\)-hard when parameterized with \(k\), even if \(\max_{\omega}=1\).

In Red-Blue Non-Blocker an undirected bipartite graph \(G\) with vertex bipartition \(V=V_r \cup V_b\) and an integer \(k\) are given. The question is whether there is a set \(S\subseteq V_r\) of size at least \(k\) such that each vertex \(v\) of \(V_b\) has a neighbor in \(V_r \setminus S\). There is a standard reduction from Red-Blue Non-Blocker to Set Cover: Let \(V_b\) be the universe, for each vertex \(v\in V_r\) add a set \(F_v:=N(v)\) to \(\mathcal{F}\) and finally set \(k':=|V_r|-k\). Red-Blue Non-Blocker is W[\(1\)]-hard when parameterized by the size of the solution [29]. Hence, Set Cover is W[\(1\)]-hard with respect to \(|\mathcal{F}|-k\) and with 1 we conclude as follows.

Theorem 2. MapPD is \({\normalfont\texttt{{W}}}[1]\)-hard when parameterized with \({\overline{k}}=|X|-k\).

MapPD can be solved in \(\mathcal{O}^*(2^{|X|})\) with a brute force algorithm that tries every possible subset of species as a solution. In 6, we prove that MapPD can be solved in \(\mathcal{O}^*(2^{{\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}})\) time. In order to prove that these algorithms can not be improved significantly, we apply the well-established Strong Exponential Time Hypothesis (SETH) [30], [31].

Unless SETH fails, Set Cover can not be solved in \(\mathcal{O}^*(2^{\epsilon \cdot |F|})\) time for any \(\epsilon<1\) [32], [33]. By 1, this implies MapPD can not be solved in time \(\mathcal{O}^*(2^{\epsilon \cdot |X|})\) or \(\mathcal{O}^*(2^{\epsilon \cdot {\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}})\) for any \(\epsilon <1\). Therefore, the \(\mathcal{O}^*(2^{|X|})\) and \(\mathcal{O}^*(2^{{\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}})\) time algorithms described above are tight under SETH.

Corollary 1. MapPD can not be solved in \(\mathcal{O}(2^{\epsilon\cdot |X|}) \cdot \mathop{\mathrm{poly}}(|{\mathcal{I}}|)\) time or in \(\mathcal{O}(2^{\epsilon\cdot {\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}}) \cdot \mathop{\mathrm{poly}}(|{\mathcal{I}}|)\) time for any \(\epsilon < 1\), unless SETH fails.

So now, without further ado, we prove 1.

Proof of 1. Reduction. Let \({\mathcal{I}}= (\mathcal{U},\mathcal{F},k,D)\) be an instance of wpSC. Let \(\mathcal{U}\) consist of the items \(u_1,\dots,u_s\) and let \(\mathcal{F}\) contain the sets \(F_1,\dots,F_t\). We may assume that for each \(u_i\) there is a set \(F_j\) which contains \(u_i\). We define an instance \({\mathcal{I}}' = ({\mathcal{N}},k,D')\) of MapPD as follows. Let \(k' = k\) and define \(D' := D\cdot Q + 1\) for \(Q := t(s+1)\). We define a network \(\mathcal{N}\) with leaves \(x_1,\dots,x_t\), and additional vertices \(\rho,v_1,\dots,v_s,w_1,\dots,w_t\).

Let the set of edges in \(\mathcal{N}\) consist of the edges \((\rho,v_{i})\) for \(i\in [s]\), \((w_j,x_j)\) for \(j\in [t]\), and let \((v_i,w_j)\) be an edge if and only if \(u_i \in F_j\). We define the weight of \((\rho,v_i)\) to be \({\omega}(u_i) \cdot Q\) for each \(i\in [s]\) and 1 for each other edge. 1 depicts an example of this reduction.

Figure 1: This figure depicts the network \mathcal{N} that we reduce to from the instance(\mathcal{U}:=\{u_1,\dots,u_6\},\mathcal{F}:=\{F_1,\dots,F_5\},{\omega},k,D) of wpSC with {\omega}(u_i)=i, F_1:=\{u_2,u_3,u_4\}, F_2:=\{u_1,u_6\}, F_3:=\{u_1,u_3,u_4\}, F_4:=\{u_2,u_5,u_6\}, F_5:=\{u_1,u_3,u_5\}. Unlabeled edges have a weight of 1. Here s=6,t=5 and Q = 35. The value of k' would be k and D' would be 35D + 1.

This completes the construction of instance \({\mathcal{I}}'\) in Case [it:P-62Mweighted] of the theorem. We now describe how to construct an instance \({\mathcal{I}}_2'\) from \({\mathcal{I}}'\) in which the weight of each edge is 1, completing the construction for Case [it:P-62Munweighted]. For each edge \(e=(\rho,v_i)\) with \(w(e) > 1\), make \({\omega}(e)-1\) subdivisions and attach a new leaf as the child of each subdividing vertex. We call these newly-added leaves false leaves, and we call the other leaves of \(\mathcal{N}\)true leaves.

Correctness. The instance \({\mathcal{I}}'\) is computed in time polynomial in \(|\mathcal{U}|+|\mathcal{F}|\) and the instance \({\mathcal{I}}_2'\) is computed in time polynomial in \(|\mathcal{U}|+|\mathcal{F}|+\max_{\omega}\). Clearly, in \({\mathcal{I}}'\) we observe \(k'=k\) and \(|X|={\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}=|\mathcal{F}|\) and in \({\mathcal{I}}_2'\) we observe \(k'=k\) and \(\max_{\omega'}=1\). It remains to show the equivalence of the instances.

Without loss of generality, let \(S:=\{F_{1},\dots,F_{\ell}\}\) with \(\ell\le k\) be a solution for wpSC on the instance \(\mathcal{I}\) that covers the items \(u_1,\dots,u_p\). That is, we assume \(S\) consists of the first \(\ell\) sets in \(\mathcal{F}\) and they cover the first \(p\) elements in \(\mathcal{U}\). We show that \(Y:=\{x_{1},\dots,x_{\ell}\}\) is a solution for MapPD on the instances \({\mathcal{I}}'\) and \({\mathcal{I}}_2'\). Clearly, the size of \(Y\) is at most \(k'\). Now consider the phylogenetic diversity of \(Y\) in the network of \({\mathcal{I}}'\). Let \(\hat{E}\) be the edges in \(\mathcal{N}\) between two vertices of \(v_1,\dots,v_p,w_1,\dots,w_\ell\). Then \[\begin{align} {PD_{{\mathcal{N}}}}(Y) &=& \sum_{i=1}^\ell {\omega}'((w_i,x_i)) + \sum_{e\in \hat{E}} {\omega}'(e) + \sum_{i=1}^p {\omega}'((\rho,v_i)) \ge {\omega}'((w_1,x_1)) + \sum_{i=1}^p {\omega}'((\rho,v_i))\\ &=& 1 + \sum_{i=1}^p {\omega}(u_i)\cdot Q = 1 + Q \cdot \sum_{i=1}^p {\omega}(u_i) \ge 1 + QD = D'. \end{align}\] Here, the first equality holds because the sets in \(S\) cover the items \(u_1,\dots,u_p\) and the last inequality holds because \(S\) is a solution. It is easy to see that the phylogenetic diversity of the set \(Y\) in the network of \({\mathcal{I}}_2'\) is identical. Hence, \(Y\) is a solution for MapPD on \({\mathcal{I}}'\) and \({\mathcal{I}}_2'\).

We now show that the existence of a solution for MapPD on \({\mathcal{I}}'\) or \({\mathcal{I}}_2'\) implies the existence of a solution for wpSC on \({\mathcal{I}}\). Without loss of generality, let \(Y:=\{x_1,\dots,x_\ell\}\) with \(\ell\le k\) be a solution for MapPD on instance \({\mathcal{I}}'\). We show that \(S:=\{F_1,\dots,F_\ell\}\) is a solution for wpSC on instance \(\mathcal{I}\). Clearly, the size of \(S\) is at most \(k\). Without loss of generality, let \(v_1,\dots,v_p\) be the ancestors of \(Y\) that are children of \(\rho\). Thus, there is a path from \(v_i\) to a taxon \(x_j\in Y\), for each \(i\in [p]\). By the construction of \({\mathcal{I}}'\), we conclude \(u_i \in F_j\). Again, let \(\hat{E}\) be the edges between two vertices of \(v_1,\dots,v_p,w_1,\dots,w_\ell\). We have \(D' \le {PD_{{\mathcal{N}}}}(Y) = \sum_{i=1}^\ell {\omega}'((w_i,x_i)) + \sum_{e\in \hat{E}} {\omega}'(e) + \sum_{i=1}^p {\omega}'((\rho,v_i)) \le t + st + \sum_{i=1}^p {\omega}'((\rho,v_i))\). Consequently, \(\sum_{i=1}^p Q\cdot {\omega}(u_i) = \sum_{i=1}^p {\omega}'((\rho,v_i)) \ge D' - Q = Q(D-1) + 1\). We conclude that \(\sum_{i=1}^p {\omega}(u_i) \ge D-1 + 1/Q\). Since the weights of \(u_i\) are integers, it follows that \(\sum_{i=1}^p {\omega}(u_i) \ge D\).

It remains to show that for each solution \(Y\) for MapPD on instance \({\mathcal{I}}_2'\), an equivalent solution for MapPD on instance \({\mathcal{I}}'\) exists. If \(Y\) does not contain false leaves, then as previously observed, the phylogenetic diversity of \(Y\) is the same in \({\mathcal{I}}'\) as in \({\mathcal{I}}_2'\). Assume now otherwise and let \(z\) be a false leaf in \(Y\) and let \(p_z\) be the parent of \(z\). We consider two different cases, \(p_z\) has an offspring in \(Y\setminus\{z\}\), or not. In the former case, we observe \({PD_{{\mathcal{N}}}}(Y) = {PD_{{\mathcal{N}}}}(Y\setminus\{z\}) + {\omega}((p_z,z)) = {PD_{{\mathcal{N}}}}(Y\setminus\{z\}) + 1\). Consequently, we can replace \(z\) with any true leaf that is not yet in \(Y\) to receive another solution for MapPD on \({\mathcal{I}}_2'\). In the second case, let the true leaf \(x_i\) be an offspring of \(p_z\). Because of the assumption, \(x_i\not\in Y\). Then, \({PD_{{\mathcal{N}}}}(Y) - {\omega}((p_z,z)) \le {PD_{{\mathcal{N}}}}((Y\setminus \{z\}) \cup \{x_i\}) - {\omega}((w_i,x_i))\). Consequently, \(Y\setminus \{z\} \cup \{x_i\}\) is also a solution. Therefore, we can replace all false leaves and we are done. ◻

Note that the network constructed in the proof of 1 has one layer of tree vertices and one layer of reticulations. It might appear that by adding more layers of reticulations and tree vertices to the construction of \({\mathcal{N}}\), one could reduce from problems even more complex than wpSC, and thereby show that MapPD has an even higher position in the W-hierarchy. This however is unlikely, because of the reduction to wpSC that we are about to show.

Lemma 2. For every instance \({\mathcal{I}}=({\mathcal{N}},k,D)\) of MapPD, we can compute an equivalent instance \((\mathcal{U},\mathcal{F},{\omega},k',D')\) of wpSC with \(k'=k\), \(D'=D\) and \(\max_{{\omega}'}=\max_{{\omega}}\) in time polynomial in \(|{\mathcal{I}}|\).

Proof. Reduction. Let \({\mathcal{I}}= ({\mathcal{N}},k,D)\) be an instance of MapPD. We define an instance \({\mathcal{I}}' = (\mathcal{U},\mathcal{F},{\omega}',k',D')\) of wpSC as follows. Let \(k' := k\) and \(D':= D\). For each edge \(e\) of \(\mathcal{N}\), define an item \(u_e\) with weight \({\omega}'(u_e)={\omega}(e)\) and let \(\mathcal{U}\) be the set of these \(u_e\). For each taxon \(x\), define a set \(F_x\) which contains item \(u_e\) if and only if \(e\) is affected by \(\{x\}\). Let \(\mathcal{F}\) be the family of these \(F_x\).

Correctness. Clearly, the reduction is computed in polynomial time. We show the equivalence of the two instances.

Let \(Y\) be a solution for MapPD on instance \(\mathcal{I}\). Without loss of generality, assume \(Y=\{x_1,\dots,x_\ell\}\) with \(\ell\le k\). We show that \(F_1,\dots,F_\ell\) is a solution for wpSC on \({\mathcal{I}}'\). By definition, \(\ell\le k'\). Let \(E_Y\) be the edges affected by \(Y\). Observe that \(e\) is in \(E_Y\) if and only if \(u_e\) is in \(F^+ := \bigcup_{i=1}^\ell F_i\). Then, \(D \le {PD_{{\mathcal{N}}}}(Y) = \sum_{e\in E_Y} {\omega}(e) = \sum_{u_e\in F^+} {\omega}'(u_e)\). Hence, \(F_1,\dots,F_\ell\) is a solution for wpSC on \({\mathcal{I}}'\).

Now, without loss of generality, let \(F_1,\dots,F_\ell\) be a solution for wpSC on \({\mathcal{I}}'\). Let \(u_{e_1},\dots,u_{e_p}\) be the items in the union of \(F_1,\dots,F_\ell\). By the construction, the edges \(e_1,\dots,e_p\) are affected by \(Y=\{x_1,\dots,x_\ell\}\). Then, \({PD_{{\mathcal{N}}}}(Y)\ge \sum_{i=1}^p {\omega}(e_i) = \sum_{i=1}^p {\omega}'(u_{e_i}) \ge D\). Because the size of \(Y\) is at most \(k'\), \(Y\) is a solution for MapPD on \({\mathcal{I}}\). ◻

To the best of our knowledge, it is unknown if wpSC is \({\normalfont\texttt{{W}}}[2]\)-complete, like Set Cover. Nevertheless, we obtain the following connection between wpSC and MapPD.

Corollary 2. MapPD is \({\normalfont\texttt{{W}}}[t]\)-complete with respect to \(k\) if and only if wpSC is \({\normalfont\texttt{{W}}}[t]\)-complete with respect to \(k\).

4 Fixed-Parameter Tractability Results↩︎

4.1 Preserved and lost Diversity↩︎

In this subsection, we show that MapPD is FPT with respect to the threshold of phylogenetic diversity \(D\) and the acceptable loss of phylogenetic diversity \({\overline{D}}:= {PD_{{\mathcal{N}}}}(X)-D\).

Let \(\mathcal{I}\) be an instance of MapPD. If there is an edge \(e\) with \({\omega}(e)\ge D\) and \(k\ge 1\), then for each offspring \(x\) of \(e\) we have \({PD_{{\mathcal{N}}}}(\{x\})\ge{\omega}(e)\ge D\), and so \(\{x\}\) is a solution for MapPD on \(\mathcal{I}\). So, we may assume that \(\max_{\omega}< D\). Therefore, each edge \(e\) can be subdivided \({\omega}(e)-1\) times in \(\mathcal{O}(D\cdot m)\) time such that \({\omega}'(e)=1\) for each edge \(e\) of the new network \({\mathcal{N}}'\). Bläser showed that wpSC can be solved in \(\mathcal{O}^*(2^{\mathcal{O}(D)})\) time when \({\omega}(u)=1\) for each item \(u\in\mathcal{U}\) [34]. Consequently, with 2 and the result from Bläser we conclude the following.

Theorem 3. MapPD can be solved in \(\mathcal{O}^*(2^{\mathcal{O}(D)})\) time.

As Set Cover is a special case of wpSC with \(D = \sum_{u\in \mathcal{U}}{\omega}(u)\), wpSC is NP-hard even if the dual \(\sum_{u\in \mathcal{U}}{\omega}(u) - D\) has a size of 0. By contrast, we show in the following that MapPD is FPT with respect to \(\overline{D}\). More precisely, we show the following.

Theorem 4. MapPD can be solved in \(\mathcal{O}(2^{{\overline{D}}+ {\overline{k}}+ o({\overline{D}})} \cdot m\log n)\) time.

Observe that we may assume \({\overline{D}}\ge {\overline{k}}:= |X| - k\), as otherwise no solution exists, because we require each edge to have a positive weight.

To show 4, we use the technique of color coding. Recall that \(\mathop{\mathrm{off}}(e):=\mathop{\mathrm{off}}(w)\) for each edge \(e=(v,w)\). We define the following auxiliary problem, in which we assign a color, red or green, to each taxon. A set \(Y\subseteq X\) is color-fitting if each taxon \(x\in Y\) is red and for each vertex \(v \in V({\mathcal{N}})\), at least one of the following holds:

  • \(v\) has a green offspring,

  • all offspring of \(v\) are in \(Y\), or

  • all offspring of \(v\) are in \(X \setminus Y\).

Effectively, this condition ensures that if we delete all the edges with green offspring, the resulting graph has a set of connected components where for each component, either all the taxa in the component are in \(Y\), or none of them are. We will make use of this fact when considering the auxiliary problem below.

colored-Max-All-Paths-PD(colored-MapPD)

Input: A phylogenetic \(X\)-network \(\mathcal{N}\), integers \(k\) and \(D\), and a coloring on the taxa \(c: X\to \{\text{red},\text{green}\}\).
Question: Is there a subset \(S\subseteq X\) of taxa such that \(|S|\le k\), \({PD_{{\mathcal{N}}}}(S)\ge D\), and \(X\setminus S\) is color-fitting?

Lemma 3. colored-MapPD can be solved in \(\mathcal{O}({\overline{D}}\cdot m \cdot \log({\overline{D}}))\) time.

Proof. Algorithm. Let \({\mathcal{I}}:= ({\mathcal{N}}:=(V,E,{\omega}),k,D,c)\) be an instance of colored-MapPD. Delete all edges \((u,v)\) for which \(v\) has a green offspring, and then delete any isolated vertices. For any vertex \(u\) of in-degree \(0\) with children \(v_1,\dots, v_q\), replace \(u\) with \(q\) vertices \(u_1,\dots, u_q\) and add and edge \((u_i,v_i)\) of weight \({\omega}((u,v_i))\) for each \(i \in [q]\), so that each in-degree-\(0\) vertex now has one child. Let \(G'\) be the resulting graph. An example of this transformation is depicted in 2.

Figure 2: In this figure, an example for the transformation in the proof of 3 is given. A hypothetical network \mathcal{N} with a coloring is given in (1). In (2), the network after deleting edges with green offspring is depicted, and, in (3), the graph G' is depicted. Some edges are labeled with their weights. Unlabeled edges have weight 1. The connected components C_1 and C_2 have weight 13 and 3 and value 1 and 2, respectively.

Compute the set of weakly connected components of \(G'\). For every weakly connected components \(C = (V_C,E_C)\) of \(G'\), proceed as follows. Define an item \(I_C\) with weight \({\omega}(E_C)\) and value \(|Y_C|\), where \(Y_C\) is the set of taxa in \(V_C\).

Let \(M\) be the set of these items. Now, return yes if there is a subset of items in \(M\) whose total weight is at most \({\overline{D}}\) and whose total value is at least \({\overline{k}}=|X|-k\), and no otherwise. Here, \(\overline{k}\) and \(\overline{D}\) are from the original network \({\mathcal{N}}\). Observe that this can be determined by solving an instance of Knapsack with set of items \(M\), budget \({\overline{D}}\), and target value \({\overline{k}}\), which can be done in \(\mathcal{O}({\overline{D}}\cdot |N| \cdot \log({\overline{k}})) \in \mathcal{O}({\overline{D}}\cdot |X| \cdot \log({\overline{k}}))\) time [35], [36].2

Correctness. We show first that if \({\mathcal{I}}\) is a yes-instance of colored-MapPD, then the algorithm return yes and secondly we show the converse.

Assume that \(\mathcal{I}\) is a yes-instance of colored-MapPD. Thus, there is a set \(S \subseteq X\) of size at most \(k\) with \({PD_{{\mathcal{N}}}}(S) \ge D\) and \(X\setminus S\) is color-fitting. We claim that \(X\setminus S\) is also color-fitting in \(G'\). Indeed, suppose for a contradiction that this is not the case. Then, there exists some vertex \(v\) in \(G'\) for which \(v\) has an offspring in \(X\setminus S\) and an offspring in \(S\). Let \(v\) be a lowest such vertex. Then, \(v\) does not have in-degree \(0\) in \(G'\), as in this case \(v\) has a unique child with the same offspring. Furthermore, \(v\) does not have any green offspring in \({\mathcal{N}}\), as the incoming edges of \(v\) were not deleted in the construction of \(G'\). Then, in fact \(v\) has the same offspring in \({\mathcal{N}}\) as in \(G'\), implying that \(X\setminus S\) is not color-fitting. This is a contradiction and we conclude that \(X\setminus S\) is color-fitting in \(G'\).

Since \(X \setminus S\) is color-fitting in \(G'\), and \(G'\) has no green taxa, every vertex \(v\) in \(G\) satisfies \(\mathop{\mathrm{off}}(v) \subseteq X\setminus S\) or \(\mathop{\mathrm{off}}(v) \subseteq S\). Each edge \(e\) in \({\mathcal{N}}\) that is not affected by \(S\) is strictly affected by \(X\setminus S\). Because \(X\setminus S\) is color-fitting, each taxon in \(X\setminus S\) is red and so \(e\) is still an edge in \(G'\). Let \(C_e\) be the connected component of \(G'\) that contains \(e\). Observe that every edge in \(C_e\) is also strictly affected by \(X \setminus S\)—indeed, for any edge \(uv\) in \(C\), \(u\) has all its offspring in \(X\setminus S\) if and only if \(v\) has all its offspring in \(X\setminus S\). Thus, \(C_e\) satisfies the conditions to be in \(M\) for each edge \(e\) that is not affected by \(S\). Let \(C_1,\dots,C_t\) be the unique connected components that contain the edges that are not affected by \(S\). We conclude that \({\omega}(C_1 \cup \dots \cup C_t) \le {\overline{D}}\) and \(C_1 \cup \dots \cup C_t\) is the set of taxa \(X\setminus S\), which has size at least \({\overline{k}}\). Hence, \(I_{C_1},\dots,I_{C_t}\) is a solution for Knapsack on \((M, {\overline{D}}, {\overline{k}})\) and the algorithm returns yes.

For the converse, assume that the algorithm returns yes and let \(I_{C_1},\dots,I_{C_t}\) be a solution for Knapsack on \((M, {\overline{D}}, {\overline{k}})\). Let \(Y_i\) be the set of taxa of \(C_i\) and define \(Y := \bigcup_{i=1}^t Y_i\). We prove that \(S := X \setminus Y\) is a solution for colored-MapPD on instance \(\mathcal{I}\). By the construction, we conclude that all taxa in \(Y_i\) are colored red and that \(Y_i\) and \(Y_j\) are disjoint for any \(i\neq j\). Each vertex \(v \in {\mathcal{N}}\) that has some but not all offspring in \(Y_i\) has at least one green offspring. Consequently, \(Y\) is color-fitting. Further, for any edge \(e = (u,v)\) that is strictly affected by \(Y\) in \({\mathcal{N}}\), we have that \(v\) has no green offspring, and therefore \(e\) is not deleted in the construction of \(G'\). Moreover, as \(v\) has offspring in \(Y_i\) for some \(i \in [t]\), we conclude that \(e\) is in \(C_i\). Because \(\sum_{i=1}^t {\omega}(E_{C_i}) \le {\overline{D}}\) the phylogenetic diversity of \(S\) is \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}}}(X) - \sum_{i=1}^t {\omega}(E_{C_i}) \ge {PD_{{\mathcal{N}}}}(X) - {\overline{D}}= D\). Likewise, as \(\sum_{i=1}^t |Y_i| \ge {\overline{k}}\), we conclude \(|S| = |X| - \sum_{i=1}^t |Y_i| \le |X| - {\overline{k}}= k\).

Running Time. The graph \(G'\) can be computed from \({\mathcal{N}}\) in \(\mathcal{O}(m)\) time. The weakly connected components of \(G'\) can be computed in \(\mathcal{O}(m)\) time as well. For each connected component \(C = (V_C,E_C)\) the item \(I_C\) of \(M\) is computed in \(\mathcal{O}(|E_C| \cdot \log({\overline{D}}))\) time. Consequently, we can compute \(M\) in \(\mathcal{O}(m \cdot \log({\overline{D}}))\) time. As the instance of Knapsack can be solved in \(\mathcal{O}({\overline{D}}\cdot |X| \cdot \log({\overline{k}}))\) time [35], [36], we have an overall running time of \(\mathcal{O}(m \cdot \log({\overline{D}}) + {\overline{D}}\cdot |X| \cdot \log({\overline{k}})) \in \mathcal{O}({\overline{D}}\cdot m \cdot \log({\overline{D}}))\). ◻

To show that MapPD is FPT with respect to \(\overline{D}\), we present an reduction from MapPD to colored-MapPD using standard color coding techniques. In particular, we show that there exists a family \({\cal F}\) of \(2\)-colorings \(c:E\to \{\text{red},\text{green}\}\), with \(|{\cal F}|\) bounded by a function of \({\overline{D}}\) times a polynomial in \(n\), such that \(({\mathcal{N}}, k, D)\) is a yes-instance of MapPD if and only if \(({\mathcal{N}},k,D,c)\) is a yes-instance of colored-MapPD for some \(c \in {\cal F}\). We refer the reader to [27] for an overview of color coding.

Definition 1. An \((n,k)\)-universal set* is a family \({\cal U}\) of subsets of \([n]\) such that for any \(S\subseteq [n]\) of size \(k\), \(\{A \cap S \mid A \in {\cal U}\}\) contains all \(2^k\) subsets of \(S\).*

Theorem 5 ([37]). For any \(n,k \geq 1\), one can construct an \((n,k)\)-universal set of size \(2^k k^{\mathcal{O}(\log k)}\log n\) in time \(2^kk^{\mathcal{O}(\log k)}n\log n\).

Proof of 4. Algorithm. Let \({\mathcal{I}}:= ({\mathcal{N}}:=(V,E,{\omega}),k,D)\) be an instance of MapPD. Arbitrarily order the taxa \(x_1,\dots, x_n\). Construct an \((n,{\overline{D}}+ {\overline{k}})\)-universal

Now for each \(A \in \mathcal{U}\), construct a \(2\)-coloring \(c_A: X\to \{\text{red},\text{green}\}\) where \(x_i\) is colored green if and only if \(i \in A\), and solve colored-MapPD on \(({\mathcal{N}}, k, D, c_A)\). Return yes, if \(({\mathcal{N}}, k, D, c_A)\) is a yes-instance for some \(A \in \mathcal{U}\). Otherwise return no.

Correctness. First observe that if \(({\mathcal{N}}, k, D, c)\) is a yes-instance of colored-MapPD for any coloring \(c: X\to \{\text{red},\text{green}\}\), then \(({\mathcal{N}},k,D)\) is also a yes-instance of MapPD.

Now suppose \(({\mathcal{N}},k,D)\) is a yes-instance for MapPD. Let \(S\subseteq X\) be a subset of taxa of size at most \(k\) and with \({PD_{{\mathcal{N}}}}(S)\ge D\). If necessary, add taxa to \(S\) until \(|S| = k\). Consequently, \(X\setminus S\) has size \({\overline{k}}\). Let \(V_Y\) be the set of vertices \(u\) of \(\mathcal{N}\) which have an offspring \(x_u\) in \(S\) and have a child \(v\) with \(\mathop{\mathrm{off}}(v) \subseteq X\setminus S\). Define \(Y := \{ x_u \mid u\in V_Y \}\). Observe that if we could define a coloring which colors the taxa in \(X\setminus S\) in red and the taxa in \(Y\) in green, then \(X\setminus S\) would be color-fitting.

Define an operation \(\texttt{ind}: 2^X \to [n]\) by \(\texttt{ind}(X') := \{ i \mid x_i \in X' \}\) for any set \(X' \subseteq X\).

For each \(u\in V_Y\) and child \(v\) of \(u\) with \(\mathop{\mathrm{off}}(v) \subseteq X\setminus S\), the edge \(uv\) is strictly affected by \(X\setminus S\). Consequently, \(|Y| \le |V_Y| \le {\omega}(uv) \le {\overline{D}}\). Therefore, \(Z := Y \cup (X\setminus S) \subseteq X\) is a set of size at most \({\overline{k}}+ {\overline{D}}\). If necessary, add taxa until \(Z\) has size \({\overline{D}}+{\overline{k}}\). Consequently, there is a set \(A\in \mathcal{U}\) with \(A \cap \texttt{ind}(Z) = \texttt{ind}(Y)\). Then, the associated \(2\)-coloring \(c_A\) colors every taxa in \(Y\) green and every taxa in \(X \setminus S\) red. So \(X\setminus S\) is color-fitting with respect to \(c_A\), and \(S\) is a solution for colored-MapPD on instance \(({\mathcal{N}}, k, D, c_A)\).

Running Time. The construction of \(\mathcal{U}\) takes \(2^{{\overline{D}}+ {\overline{k}}+ \mathcal{O}(\log^2 ({\overline{D}}))} n\log n\) time, and for each of the \(2^{{\overline{D}}+ {\overline{k}}+ \mathcal{O}(\log^2 ({\overline{D}}))}\log n\) sets in \(\mathcal{U}\) we solve an instance of colored-MapPD, which can be done in \(\mathcal{O}({\overline{D}}\cdot m \cdot \log({\overline{D}}))\) time by 3. The overall running time is \(\mathcal{O}(2^{{\overline{D}}+ {\overline{k}}+ o({\overline{D}})} \cdot m\log n)\). ◻

4.2 Proximity to trees↩︎

MapPD can be solved in polynomial time with Faith’s Greedy-Algorithm, if the given network is a tree [2], [11], [12]. Therefore, in this subsection, we examine MapPD with respect to two parameters that classify the network’s proximity to a tree, the number of reticulations \({\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\) and the smaller parameter treewidth \({\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\).

Theorem 6. MapPD can be solved in \(\mathcal{O}(2^{{\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}} \cdot k \cdot m\cdot \log(\max_{\omega}))\) time.

Observe that by 1, MapPD can not be solved in \(\mathcal{O}^*(2^{\epsilon\cdot {\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}})\) time for any \(\epsilon<1\), unless SETH fails. Therefore, the running time of the previous proof is tight, to some extent.

We note that after the initial publication of this paper, it was shown that MapPD can be solved in \(\mathcal{O}(2^{\text{sw}_{\mathcal{N}}})\) time, where \(\text{sw}_{\mathcal{N}}\) is the scanwidth of the network [19]. A network’s scanwidth is at least its treewidth and at most its number of reticulations minus 1. Consequently, the algorithms in [19] and [18] present neat improvement to our algorithm presented in 6 and demonstrates the algorithmic power behind scanwidth. For more detains and a formal definition of scanwidth, we refer to [38], [39].

Proof. Algorithm. We define two operations, called take and leave, that take as input an instance \({\mathcal{I}}= ({\mathcal{N}},k,D)\) and a reticulation \(v\) of \(\mathcal{N}\) and return another instance of MapPD. Every subset of taxa \(Y\) that contains an offspring of \(v\) should be a solution for MapPD on \(\mathcal{I}\) if and only if \(Y\) is a solution forMapPD on \(\texttt{take}({\mathcal{I}},v)\). Similarly every subset of \(Y\) that does not contain an offspring of \(v\) should be a solution for MapPD on \(\mathcal{I}\) if and only if \(Y\) is a solution forMapPD on \(\texttt{leave}({\mathcal{I}},v)\).

Recall that \(\mathop{\mathrm{off}}(e)\subseteq X\) is the set of offspring of \(w\) for an edge \(e=(v,w)\) and the strictly affected edges \(T_Y\) for a set of taxa \(Y\subseteq X\) is the set of edges \(e\) with \(\mathop{\mathrm{off}}(e)\subseteq Y\). We define \(\texttt{leave}({\mathcal{I}},v)\) to be the instance \({\mathcal{I}}'=({\mathcal{N}}',k,D)\) of MapPD, in which \(k\) and \(D\) are unchanged and \({\mathcal{N}}'\) is the network that results from deleting the edges \(T_{\mathop{\mathrm{off}}(v)}\) and the resulting isolated vertices from \(\mathcal{N}\).

For a reticulation \(v\) in a network \(\mathcal{N}\) with child \(u\), let \(E^{(\uparrow vu)}\) be the set of edges of \(\mathcal{N}\) that are between two vertices of \(\mathop{\mathrm{anc}}(v) \cup \{u\}\). Recall that \({\overline{D}}=\sum_{e\in E} {\omega}(e)-D\). We define \(\texttt{take}({\mathcal{I}},v)\) to be the instance \({\mathcal{I}}'=({\mathcal{N}}',k,D')\) of MapPD with \(D'=D+{\overline{D}}\) and \(k\) is unchanged. \({\mathcal{N}}'\) is the network that results from \(\mathcal{N}\) by deleting the edges \(E^{(\uparrow vu)}\), merging all the ancestors of \(v\) to a single vertex \(\rho\), adding an edge \((\rho,u)\), and setting the weight \({\omega}'((\rho,u))\) to \({\omega}(E^{(\uparrow vu)})+{\overline{D}}\). For each vertex \(w\ne u\) that, in \(\mathcal{N}\), has \(t\ge 1\) parents \(u_1,\dots,u_t\) in \(\mathop{\mathrm{anc}}(v)\), we replace the edges \((u_1,w),\dots, (u_t,w)\) with a single edge \((\rho,w)\) that has weight \(\sum_{i=1}^t {\omega}((u_i,w))\). Observe that \(PD_{{\mathcal{N}}'}(X) = {PD_{{\mathcal{N}}}}(X) + {\overline{D}}\). 3 depicts an example of the operations take and leave.

Figure 3: In this figure, an example for the usage of \texttt{leave} and \texttt{take} is given. A hypothetical instance \mathcal{I} is given in (1). Here, the value of {\overline{D}} is 3. In (2) the instance \texttt{leave}({\mathcal{I}},v), and in (3) the instance \texttt{take}({\mathcal{I}},v) is depicted. Unlabeled edges have a weight of 1. Observe in (3), the weight of the edge (\rho,w) is 4, as w has two edges from ancestors of v in \mathcal{I} which have a weight of 2 each. The weight of (\rho,u) is 12, as in \mathcal{I} the edges of E^{(\uparrow vu)} have a combined weight of 9.

Now, we are at the position to define the branching algorithm. Let \({\mathcal{I}}=({\mathcal{N}},k,D)\) be an instance of MapPD. If \({\mathcal{N}}\) is a phylogenetic tree, solve the instance \(\mathcal{I}\) with Faith’s Algorithm [2], [11], [12]. Otherwise, let \(v\) be a reticulation of \({\mathcal{N}}\).

Then, recursively, solve MapPD on \(\texttt{take}({\mathcal{I}},v)\) and \(\texttt{leave}({\mathcal{I}},v)\). If either of these is a yes-instance of MapPD, return yes. Otherwise, return no.

Correctness. The correctness of the base case is given by the correctness of Faith’s Algorithm. We show that if \(\mathcal{N}\) contains a reticulation \(v\), then \(\mathcal{I}\) is a yes-instance of MapPD if and only if \(\texttt{take}({\mathcal{I}},v)\) or \(\texttt{leave}({\mathcal{I}},v)\) is a yes-instance of MapPD.

Consider any set of taxa \(Y \subseteq X\). Firstly, we claim that if \(Y \cap \mathop{\mathrm{off}}(v) = \emptyset\), then \(PD_{{\mathcal{N}}'}(Y) = {PD_{{\mathcal{N}}}}(Y)\), where \({\mathcal{N}}'\) is the network in \(\texttt{leave}({\mathcal{I}},v)\). Indeed, \({\mathcal{N}}'\) contains all the vertices and edges of \(\mathcal{N}\) that have an offspring outside of \(\mathop{\mathrm{off}}(v)\). Therefore, the set of edges affected by \(Y\) is the same in both networks, and \(PD_{{\mathcal{N}}'}(Y) = {PD_{{\mathcal{N}}}}(Y)\). Secondly, we claim that if \(Y \cap \mathop{\mathrm{off}}(v) \neq \emptyset\), then \(PD_{{\mathcal{N}}'}(Y) = {PD_{{\mathcal{N}}}}(Y) + {\overline{D}}\), where \({\mathcal{N}}'\) is the network in \(\texttt{take}({\mathcal{I}},v)\). Recall that each edge \(e=(u_1,u_2)\) with \(u_1\ne \rho\) of \(E({\mathcal{N}}')\) is also an edge of \({\mathcal{N}}\) and \({\omega}'(e)={\omega}(e)\). Further, for each edge \(e=(\rho,u_2)\in E({\mathcal{N}}')\) with \(u_2\ne u\), there are edges \(e_1=(u_{i_1},u_2),\dots,e_t=(u_{i_t},u_2)\) of \(E({\mathcal{N}})\) with \({\omega}'(e)=\sum_{i=1}^t {\omega}(e_i)\). Now, let \(Q = Q_1 \cup Q_2 \cup \{(\rho,u)\}\) be the edges of \({\mathcal{N}}'\) that have at least one offspring in \(Y\), of which edges in \(Q_1\) have both endpoints in \(V({\mathcal{N}}')\setminus\{\rho\}\), and \(Q_2\) are outgoing edges of \(\rho\). Further, let \(P = P_1 \cup P_2 \cup E^{(\uparrow vu)}\) be the edges of \({\mathcal{N}}\) that have at least one offspring in \(Y\), of which edges in \(P_1\) have both endpoints in \(V({\mathcal{N}}')\setminus \{\rho\}\), and \(P_2\) are edges with one endpoint in \(\mathop{\mathrm{anc}}(v)\setminus \{v\}\) and one endpoint in \(V({\mathcal{N}}')\setminus\{\rho\}\). Observe that, \(Q_1 = P_1\) and \({\omega}'(Q_1) = {\omega}(P_1)\) since any vertex in \(V({\mathcal{N}}')\setminus \{\rho\}\) has the same offspring in \({\mathcal{N}}\) as in \({\mathcal{N}}'\). Further, \({\omega}'(Q_2) = {\omega}(P_2)\) as for each \(u_2 \in V({\mathcal{N}}')\setminus\{\rho\}\), the total weight of edges \((u_1,u_2)\) with \(u_1 \in \mathop{\mathrm{anc}}(v)\setminus \{v\}\) in \({\mathcal{N}}\) is equal to the weight of the edge \((\rho,u_2)\) in \({\mathcal{N}}'\). It follows that \(PD_{{\mathcal{N}}'}(Y) = {\omega}'(Q_1) + {\omega}'(Q_2) + {\omega}'((\rho,u)) = {\omega}(P_1) + {\omega}(P_2) + {\omega}(E^{(\uparrow vu)}) + {\overline{D}}= {PD_{{\mathcal{N}}}}(Y) + {\overline{D}}\).

It follows from the above that if \(Y\) is a solution for MapPD on \(\mathcal{I}\)(that is, \(|Y|\le k\) and \({PD_{{\mathcal{N}}}}(Y)\ge D\)), then either \(Y\) is a solution for MapPD on \(\texttt{leave}({\mathcal{I}},v)\) or \(Y\) is a solution for MapPD on \(\texttt{take}({\mathcal{I}},v)\). Conversely, if \(Y\) is a solution for MapPD on \(\texttt{leave}({\mathcal{I}},v)\) then \(Y \cap \mathop{\mathrm{off}}(e) = \emptyset\) and thus \({PD_{{\mathcal{N}}}}(Y) = PD_{{\mathcal{N}}'}(Y) \geq D\), so \(Y\) is also a solution for MapPD on \(\mathcal{I}\). Finally, if \(Y\) is a solution for MapPD on \(\texttt{take}({\mathcal{I}},v)\) then \(Y \cap \mathop{\mathrm{off}}(e) \neq \emptyset\), as otherwise \(PD_{{\mathcal{N}}'}(Y) \le PD_{{\mathcal{N}}'}(X) - {\omega}'((\rho,v)) = D + 2{\overline{D}}- ({\omega}(E^{(\uparrow vu)}) + {\overline{D}}) \le D + {\overline{D}}- 1 < D'\). Then \(PD_{{\mathcal{N}}'}(Y) = {PD_{{\mathcal{N}}}}(Y) + {\overline{D}}\), from which it follows that \({PD_{{\mathcal{N}}}}(Y) \geq D' - {\overline{D}}= D\) and \(Y\) is also a solution for MapPD on \(\mathcal{I}\).

Running Time. Let \(\mathcal{I}\) be an instance of MapPD that contains a reticulation \(v\). The number of reticulations in \(\mathcal{I}\) is greater than the number of reticulations in \(\texttt{take}({\mathcal{I}},v)\) and \(\texttt{leave}({\mathcal{I}},v)\), because at least the reticulation, \(v\), is removed and no new reticulations are added. Therefore, the search tree contains \(\mathcal{O}(2^{{\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}})\) nodes. It can be checked in \(\mathcal{O}(m)\) time, if \({\mathcal{N}}\) contains a reticulation. Faith’s Algorithm takes \(\mathcal{O}(k \cdot m\cdot \log(\max_{\omega}))\) time [11], [12].

The sets \(\mathop{\mathrm{off}}(v)\) and \(\mathop{\mathrm{anc}}(v)\) for a vertex \(v\), and \(T_Y\) for a set \(Y\) can be computed in \(\mathcal{O}(m)\) time. Once \(\mathop{\mathrm{anc}}(v)\) is computed, we can iterate over \(E\) to find the edges that are outgoing from \(\mathop{\mathrm{anc}}(v)\) and compute the total weight for an edge \((\rho,w)\) in \({\mathcal{N}}'\) in \(\mathcal{O}(m\cdot \log(\max_{\omega}))\) time, which is also the time needed to compute \({\omega}((\rho,u))\) which needs \(\overline{D}\) and the weight of \(E^{(\uparrow vu)}\). Therefore, the instances \(\texttt{take}({\mathcal{I}},v)\) and \(\texttt{leave}({\mathcal{I}},v)\) can be computed in \(\mathcal{O}(m\cdot \log(\max_{\omega}))\) time.

Thus, a solution for MapPD can be computed in \(\mathcal{O}(2^{{\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}} \cdot k \cdot m\cdot \log(\max_{\omega}))\) time. ◻

Bordewich et al. showed that MapPD can be solved in polynomial time on level-1 networks [8]. We extend this result by showing that MapPD is fixed-parameter tractable with respect to treewidth. We note that for every network, the number of reticulations is at least the level, and the level plus one is at least the treewidth.

Theorem 7. MapPD can be solved in \(\mathcal{O}(9^{\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot {\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot k^2 \cdot m \cdot \log D)\) time.

We first provide a sketch of the main ideas here.

We aim to find a set of edges \(E'\) that have an overall weight of at least \(D\) and that are incident with at most \(k\) leaves. Further, for each edge \(e=(u,v)\in E'\) we require that either \(v\in X\) or there is an edge \((v,w)\in E'\). In the algorithm, which is a dynamic program over a nice tree decomposition, we index feasible partial solutions by a 3-coloring of the vertices. At a given node of the tree decomposition, a vertex \(v\) is colored:

  • red, if it is still mandatory that we select an outgoing edge of \(v\) (because we have selected an incoming edge of \(v\)),

  • green, if we can select incoming edges of \(v\) and do not need to select an outgoing edge of \(v\) (because \(v\) is a leaf or we have already selected an outgoing edge of \(v\)),

  • black, if we have to not yet selected an edge incident with \(v\) (such that only the selection of an incoming edge of \(v\) makes the selection of an outgoing edge of \(v\) necessary).

We introduce each leaf as a green vertex and the other vertices as black vertices. In order to consider only feasible solutions, a vertex must be green or black when it is forgotten. The most important step of the algorithm is in the introduction of an edge, where colors may be adjusted depending on whether or not the new edge is included in \(E'\).

For the proof, we require the notion of a nice tree decomposition.

Definition 2 (Nice tree decomposition, treewidth). A tree decomposition of a graph \(G\) consists of a rooted tree \(T\) and, for every node \(t \in T\) a bag \(Q_t \subseteq V(G)\) such that every edge of \(G\) is contained in some bag and such that all the nodes of \(T\) whose bags contain any particular vertex \(v\) is connected.

A tree decomposition is called nice* [40] if the bags of the root and all leafs of \(T\) are empty, and every non-leaf bag \(Q_t\) has one of the following types*

introduce vertex bag:

\(t\) has only one child \(t'\) and \(Q_{t'} = Q_t \setminus \{v\}\) for some vertex \(v\) which is said to be introduced* at \(t\);*

introduce edge bag:

\(t\) has only one child \(t'\) and \(Q_{t'} = Q_t\) and \(t\) is labeled with an edge \(e \subseteq Q_t\) which is said to be introduced at \(t\).

forget bag:

\(t\) has only one child \(t'\) and \(Q_{t'} = Q_t \cup \{v\}\) for some vertex \(v\);

join bag:

\(t\) has exactly two children \(t_1, t_2\) and \(Q_t = Q_{t_1} = Q_{t_2}\);

Every edge of \(G\) must be introduced exactly once, and we may assume this happens as high in \(T\) as possible, i.e., just before some endpoint of that edge is forgotten. For a node \(t\in T\), we denote by \(G_t = (V_t, E_t)\) the subgraph of \(G\) that contains exactly those vertices and edges which are introduced at \(t\) or any descendant of \(t\). Note that at every join bag the graph \(G_t[Q_t]\) is edgeless.

Proof of 7. We define a dynamic programming instance over a nice tree-decomposition \(T\) of the \(X\)-network \({\mathcal{N}}=(V,E,{\omega})\) in which vertices are introduced without incident edges and all edges are induced exactly once.

Definition of the Table. Let \({\mathcal{I}}=({\mathcal{N}},k,D)\) be an instance of MapPD and let \(T\) be a nice tree decomposition of \({\mathcal{N}}\). We index solutions by a node \(t \in T\), a partition \(R\cup G\cup B\) of \(Q_t\), and a non-negative integer \(s\in [k]_0\). For a set of edges \(F \subseteq E_t\), we call a vertex \(u \in V_t\) green with respect to \(F\) if \(u\) is a leaf or has an outgoing edge in \(F\). We call \(u\) red* with respect to \(F\)* if \(u\) is not a leaf and has an incoming but no outgoing edge in \(F\). Finally, we call \(u\) **black* with respect to \(F\)* if \(u\) is not a leaf and has no incident edges in \(F\). For a node \(t\in T\), a partition \(R\cup G\cup B\) of \(Q_t\) and an integer \(s\), we call a set of edges \(F \subseteq E_t\) feasible for \(t,R,G,B,s\), if all the following conditions hold:

  1. If \((u,v)\) is an edge in \(F\) and \(v\notin Q_t\), then \(v\) is a leaf of \({\mathcal{N}}\) or \(v\) has an outgoing edge in \(F\).

  2. The vertices \(R\subseteq Q_t\) are red with respect to \(F\).

  3. The vertices \(G\subseteq Q_t\) are green with respect to \(F\).

  4. The vertices \(B\subseteq Q_t\) are black with respect to \(F\).

  5. The number of leaves in \({\mathcal{N}}\) with an incoming edge in \(F\) is \(s\).

Further, we define \(\mathcal{S}^*_{t,R,G,B,s}\) to be the set of all sets \(F\) that are feasible for \(t,R,G,B,s\).

We define a dynamic programming algorithm over a nice tree decomposition \(T\). In a table entry of \(\mathop{\mathrm{DP}}[t,A,R,G,B,s]\), we store the greatest weight \({\omega}(F)\) of a set \(F \subseteq E_t\) that is feasible for \(t,R,G,B,s\). If there is no feasible \(F\), then we store a large negative value. For our purposes a value of \(-m\cdot \max_{\omega}-1\) will suffice, as even if every edge would be chosen, the entry at the root of the tree decomposition is still negative. Let \(r\) be the root of the nice tree-decomposition \(T\). We claim that \(\mathop{\mathrm{DP}}[r,\emptyset,\emptyset,\emptyset,k]\) stores the greatest phylogenetic diversity that can be preserved with a budget of \(k\). Indeed, for any set \(Y\) of \(k\) taxa, the set of affected edges \(E_Y\) is feasible for \(r,\emptyset,\emptyset,\emptyset,k\) and has weight \({PD_{{\mathcal{N}}}}(Y)\). Conversely if \(F\) is feasible for \(r,\emptyset,\emptyset,\emptyset,k\), then letting \(Y\) be the set of leaves in \({\mathcal{N}}\) with an incoming edge in \(F\), we have that \(E_Y \supseteq F\) and so \({PD_{{\mathcal{N}}}}(Y)\geq {\omega}(F)\). Hence, we can return yes if \(\mathop{\mathrm{DP}}[r,\emptyset,\emptyset,\emptyset,k]\ge D\) and no otherwise.

Now we have everything we need to define the dynamic programming algorithm. In the calculations that follow, any time a value \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) is called for which \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) is not defined (in particular, if \(s < 0\)), we take \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) to be \(-m\cdot \max_{\omega}-1\).

Leaf Node. For a leaf \(t\) of \(T\) the sets \(Q_t\) and \(E_t\) are empty. So if \(s = 0\), we trivially store \[\begin{align} \label{tw:leaf} \mathop{\mathrm{DP}}[t,\emptyset,\emptyset,\emptyset,s] &=& 0. \end{align}\tag{1}\] Otherwise, we store \(\mathop{\mathrm{DP}}[t,R,G,B,s] = -m\cdot \max_{\omega}-1\).

Introduce Vertex Node. Suppose now that \(t\) is an introduce vertex node, i.e., \(t\) has a single child \(t'\)\(Q_t = Q_{t'} \cup \{v\}\), and \(v\) is an isolated vertex in \({\mathcal{N}}_t\). If either \(v\in B\), or \(v\in G\) and \(v\) is a leaf, we store \[\begin{align} \label{tw:insertvertex} \mathop{\mathrm{DP}}[t,R,G,B,s] &=& \mathop{\mathrm{DP}}[t',R,G\setminus\{v\},B\setminus\{v\},s]. \end{align}\tag{2}\] Otherwise, we store \(\mathop{\mathrm{DP}}[t,R,G,B,s] = -m\cdot \max_{\omega}-1\).

Introduce Edge Node. Suppose now that \(t\) is an introduce edge node, i.e., \(t\) has a single child \(t'\)\(Q_t = Q_{t'}\), and \(e=(v,w)\) is introduced at \(t'\). The algorithm must decide whether \(e\) is an affected edge, or not. If \(v\notin G\) or \(w\in B\), \(e\) can not be an affected edge and so we store \(\mathop{\mathrm{DP}}[t,R,G,B,s] = \mathop{\mathrm{DP}}[t',R,G,B,s]\). Otherwise, we store \[\begin{align} \label{tw:insertedge} \mathop{\mathrm{DP}}[t,R,G,B,s] &=& \max\{ \mathop{\mathrm{DP}}[t',R,G,B,s]; \max_{R',G',B'}\mathop{\mathrm{DP}}[t',R',G',B',s'] + {\omega}(e) \}, \end{align}\tag{3}\] where the second maximum is over all possible partitions \(R'\cup G'\cup B'\) of \(Q_t\), such that \(S\setminus\{v,w\} = S'\setminus\{v,w\}\) for all \(S \in \{R,G,B\}\) (i.e. the two partitions agree on \(Q_T\setminus\{v,w\}\)), and such that if \(w \in G'\) then \(w \in G\), and \(w \in R\) otherwise. Here \(s' = s-1\) if \(w\) is a leaf and \(s' = s\) if not.

Forget Node. Suppose now that \(t\) is an forget node, i.e., \(t\) has a single child \(t'\) and \(Q_t = Q_{t'} \setminus \{v\}\). We store \[\begin{align} \label{tw:forget} \mathop{\mathrm{DP}}[t,R,G,B,s] = \max \{ \mathop{\mathrm{DP}}[t',R,G,B\cup\{v\},s]; \mathop{\mathrm{DP}}[t',R,G\cup\{v\},B,s]\}. \end{align}\tag{4}\]

Join Node. Suppose now that \(t\in T\) is an join node, i.e., \(t\) in \(T\) has two children \(t_1\) and \(t_2\) with \(Q_t = Q_{t_1} = Q_{t_2}\). We call two partitions \(R_1\cup G_1\cup B_1\) and \(R_2\cup G_2 \cup B_2\) of \(Q_t\) qualified for \(R\cup G\cup B\) if \(R=(R_1\cup R_2) \setminus (G_1 \cup G_2)\) and \(G = G_1\cup G_2\) (and consequently \(B = B_1 \cap B_2\)). See 4. We store \[\begin{align} \label{tw:join} \mathop{\mathrm{DP}}[t,R,G,B,s] &=& \max_{(\pi_1, \pi_2) \in{\cal Q},s'} ~ \mathop{\mathrm{DP}}[t_1,R_1,G_1,B_1,s'] + \mathop{\mathrm{DP}}[t_2,R_2,G_2,B_2,s-s'], \end{align}\tag{5}\] where \({\cal Q}\) is the set of pairs of partitions \(\pi_1 = R_1\cup G_1\cup B_1\) and \(\pi_2 = R_2\cup G_2 \cup B_2\) that are qualified for \(R,G,B\) and \(s' \in [s]_0\).

Figure 4: This table shows the relationship between the partitions R_1\cup G_1\cup B_1, R_2\cup G_2 \cup B_2 and R\cup G\cup B in the case of a join node, when R_1\cup G_1\cup B_1 and R_2\cup G_2 \cup B_2 are qualified for R\cup G\cup B. The table shows which of the set R,G, or B an element v \in Q_t will be in, depending on its membership in R_1,G_1,B_1,R_2,G_2, and B_2. For example if v \in R_1 and v \in B_2, then v \in R.

Correctness. Let \(t\) be a node of the nice tree-decomposition \(T\), \(s\) an integer, and \(R\cup G\cup B\) a partition of \(Q_t\). We show that the value of \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) is correct, for each type of node individually. As we have already argued that \(\mathop{\mathrm{DP}}[r,\emptyset,\emptyset,\emptyset,k]\) stores the greatest phylogenetic diversity that can be preserved with a budget of \(k\), this is sufficient to prove the correctness of the algorithm.

If \(t\) is a leaf node, then \(Q_t\) and \(E_t\) are empty. Consequently, \(R=G=B=\emptyset\) and any feasible set \(F\) is also empty. Therefore, we also conclude with (F5) that \(s=0\) and \({\omega}(F)=0\) for any \(F \in \mathcal{S}^*_{t,R,G,B,s}\). Hence, the stored value by Equation (1 ) is correct.

Let \(t\) be an introduce vertex node with child \(t'\) and \(Q_t=Q_{t'}\cup\{v\}\). Then, the graph \({\mathcal{N}}_t\) is the graph \({\mathcal{N}}_{t'}\) with an additional isolated vertex \(v\). Thus, \(v\) is black with respect to any \(F \subseteq E_t\), unless \(v\) is a leaf in which case \(v\) is green. Thus, there is no feasible set \(F\) for \(\mathcal{S}^*_{t,R,G,B,s}\) unless either \(v \in B\) or \(v \in G\) and \(v\) is a leaf. Assuming this is the case, any set \(F \subseteq E_t\) is feasible for \(t,R,G,B,s\) if and only if it is feasible for \(t',R,G\setminus\{v\},B\setminus\{v\},s\). Hence, we store the right value.

Let \(t\) be a introduce edge node with child \(t'\) and \(Q_t=Q_{t'}\) and \({\mathcal{N}}_t-e={\mathcal{N}}_{t'}\). Define \(e:=(v,w)\). Clearly, every set \(F\subseteq E_t\setminus\{e\}\) is feasible for \(t,R,G,B,s\) if and only if \(F\) is also feasible for \(t',R,G,B,s\), because then \({\mathcal{N}}_t[F]\) is isomorphic to \({\mathcal{N}}_{t'}[F]\). Now consider a set \(F\subseteq E_t\) with \((v,w) \in F\). Note that \(v\) is green, and \(w\) cannot be black, with respect to any such set \(F\). Therefore such an \(F\) only exists if \(v \in G\) and \(w \notin B\). Now let \(F' = F\setminus\{(v,w)\}\). The colors of vertices \(u\) that are not \(v\) or \(w\) are the same with respect to \(F\) as with respect to \(F'\). Observe that if \(w\) is green with respect to \(F\) if and only if it is green with respect to \(F'\) (as it has the same outgoing edges in \(F\) and \(F'\)). If \(w\) is red or black with respect to \(F'\), then it is red with respect to \(F\) (as it has an incoming edge and no outgoing edge). On the other hand, \(v\) could be any color with respect to \(F'\), but is necessarily green with resepct to \(F\). Likewise, we can show the correctness of \(s'\). Thus, the correct value is stored.

Let \(t\) be a forget node with child \(t'\) and \(Q_t=Q_{t'}\setminus\{v\}\). We show that a set \(F\) is feasible for \(t,R,G,B,s\) if and only if \(F\) is also feasible for \(t',R,G,B\cup\{v\},s\) or for \(t',R,G \cup \{v\},B,s\). It then follows that \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) stores the correct value.

To this end, let \(F\) be a set of edges that is feasible for \(t,R,G,B,s\). Since \(v \notin Q_t\) and condition (F1) holds, \(v\) either has an outgoing edge in \(F\) or is a leaf or does not have any incoming edge in \(F\). It follows that \(v\) is green or black with respect to \(F\). From this it is straightforward to confirm that \(F\) is feasible for \(t',R,G,B\cup\{v\},s\) or for \(t',R,G \cup \{v\},B,s\). Conversely, if \(F\) is feasible for \(t',R,G,B\cup\{v\},s\) or for \(t',R,G \cup \{v\},B,s\), then \(F\) also satisfies condition (F1) for \(t,R,G,B,s\) (in particular, the condition is satisfied for \(v\) as \(v\) is green or black with respect to \(F\)). It is straightforward to confirm that \(F\) satisfies the remaining conditions to be feasible with respect to \(t,R,G,B,s\).

Finally, let \(t\) be a join node with children \(t_1\) and \(t_2\). We show that there is an \(F\in \mathcal{S}^*_{t,R,G,B,s}\) if and only if there are partitions \(R_1 \cup G_1 \cup B_1\) and \(R_2 \cup G_2 \cup B_2\), qualified for \(R,G,B\) and \(s'\le s\) such that there are \(F_1\in \mathcal{S}^*_{t_1,R_1,G_1,B_1,s'}\) and \(F_2\in \mathcal{S}^*_{t_2,R_2,G_2,B_2,s-s'}\) with \(F_1\cup F_2 = F\).

First, let \(F\) be feasible for \(t,R,G,B,s\). Let \(F_i\) be the subset of edges of \(F\) that occur in \({\mathcal{N}}_{t_i}\) for \(i\in\{1,2\}\). Because every edge is introduced exactly once, the sets \(F_1\) and \(F_2\) are disjoint. We define \(s'\) to be the number of edges of \(F_1\) that are incident with a leaf. Further, we define \(R_i\) to be the set of vertices in \(Q_t\) that are not leaves in \(\mathcal{N}\) and have an incoming but no outgoing edge in \(F_i\) for \(i\in \{1,2\}\). Similarly, we define \(G_i\) to be the set of vertices in \(Q_t\) that are leaves or have an outgoing edge in \(F_i\), and we define \(B_i\) to be the set of vertices in \(Q_t\) that are not leaves and have no incident vertices in \(F_i\), for \(i\in \{1,2\}\).

We show that \(F_1\in \mathcal{S}^*_{t_1,R_1,G_1,B_1,s'}\) and \(F_2\in \mathcal{S}^*_{t_2,R_2,G_2,B_2,s-s'}\). Let \(e=(u,v)\) be an edge in \(F_i\) such that \(v\) is not a leaf and \(v\not\in Q_{t_i}\) for \(i\in \{1,2\}\). Because \(Q_t=Q_{t_i}\), we conclude that \(v\not\in Q_{t}\). Thus, with (F1) we conclude that \(v\) has an outgoing edge \(e^*\) in \(F\). Because \(v\) is not in \(Q_t\) and \(v\) is in \(V_{t_i}\), the vertex \(v\) is not in \(V_{t_{3-i}}\). Thus, the edge \(e^*\) is also in \(F_i\) and so \(F_i\) satisfies (F1). By construction, \(F_i\) satisfies (F2) to (F4). Also, \(F_1\) satisfies (F5), by definition of \(s'\). As \(F_2\) contains the edges of \(F\) that are not in \(F_1\), there are \(s-s'\) edges in \(F_2\) that are incident with a leaf. Hence, \(F_2\) holds (F5) and so, \(F_1\in \mathcal{S}^*_{t_1,R_1,G_1,B_1,s'}\) and \(F_2\in \mathcal{S}^*_{t_2,R_2,G_2,B_2,s-s'}\).

It remains to show that \(R_1\cup G_1 \cup B_1\) and \(R_2\cup G_2 \cup B_2\) are qualified for \(R,G,B\). If \(v\) is a leaf, we conclude that \(v\) is in \(G_1,G_2\) and \(G\). Further, \(v\) has an outgoing edge in \(F\) if and only if \(v\) has an outgoing edge in \(F_1\) or \(F_2\). We conclude that \(G=G_1\cup G_2\). For each \(v\in R\) there is an incoming edge \(e\) but no outgoing edge in \(F\). Consequently, if \(v\in R\) then \(v\not\in G_1\cup G_2\). Further, \(e \in F_i\) for some \(i \in \{1,2\}\) but there is no outgoing edge for \(v\) in \(F_i\). Thus, \(v\in R_i\) and so \(R\subseteq (R_1\cup R_2) \setminus (G_1 \cup G_2)\). If \(v\in (R_1\cup R_2) \setminus (G_1 \cup G_2)\) then there is an incoming edge for \(v\) in \(F_1\) or \(F_2\) and therefore in \(F\), but no outgoing, and so \(v\in R\). We conclude that \(R=(R_1\cup R_2) \setminus (G_1 \cup G_2)\). From \(G=G_1\cup G_2\) and \(R=(R_1\cup R_2) \setminus (G_1 \cup G_2)\) we have that \(B = B_1 \cap B_2\), and so \(R_1\cup G_1 \cup B_1\) and \(R_2\cup G_2 \cup B_2\) are qualified for \(R,G,B\), as required.

For the converse, assume that there are partitions \(R_1\cup G_1 \cup B_1\) and \(R_2\cup G_2 \cup B_2\) qualified for \(R\) and \(G\), and \(s'\le s\) such that there are \(F_1\in \mathcal{S}^*_{t_1,R_1,G_1,B_1,s'}\) and \(F_2\in \mathcal{S}^*_{t_2,R_2,G_2,B_2,s-s'}\). We show that \(F:=F_1\cup F_2\) is feasible for \(t,R,G,B,s\). Let \(e=(u,v)\) be an edge in \(F\) such that \(v\) is not a leaf and \(v\not\in Q_t\). Without loss of generality, \(e\in F_1\). Because \(Q_t=Q_{t_1}\), we conclude that \(v\not\in Q_{t_1}\). Thus, \(v\) has an outgoing edge in \(F_1\) and therefore in \(F\) and \(F\) holds (F1). Let \(v\) be a vertex of \(Q_t\). If \(v\in R=(R_1\cup R_2) \setminus (G_1 \cup G_2)\), then there is an incoming edge \(e\) for \(v\) in \(F_1\) or \(F_2\) but \(F_1\) and \(F_2\) do not contain an outgoing edge for \(v\). Consequently, \(v\) has an incoming edge in \(F\) but no outgoing edge. Analogously, we can see that if \(v\in G=G_1\cup G_2\) then \(v\) has an outgoing edge in \(F\) and if \(v\in B=B_1\cap B_2\), then \(v\) is not incident with any edge in \(F\). Because that covers all options, \(F\) holds (F2) to (F4). Let \(\hat{E}_1\) and \(\hat{E}_2\) be the edges of \(F_1\) and \(F_2\), respectively, that are incident with a leaf. Thus, \(|\hat{E}_1|=s'\) and \(|\hat{E}_2|=s-s'\). Because every edge is introduced exactly once, the sets \(F_1\) and \(F_2\) and therefore \(\hat{E}_1\) and \(\hat{E}_2\) are disjoint. Consequently, \(\hat{E}_1\cup \hat{E}_2\) contains \(s\) edges that are incoming at leaves. Thus, \(F\) holds (F5). Hence, the value that is stored with Equation (5 ) is correct.

Running Time. The tree decomposition \(T\) has \(\mathcal{O}(m)\) nodes. Note that comparing and adding numbers takes \(\mathcal{O}(\log D)\) time, as we may assume we do not deal with numbers larger than \(\mathcal{O}(D)\).

For a leaf node, an introduce vertex nodes and a forget node, the value of each entry \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) can clearly be computed in linear time in \({\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot \log D\). Checking the conditions in an introduce edge node requires checking the colors of \(v\) and \(w\). Further, the partition \(R'\cup G'\cup B'\) agrees on all vertices but \(v\) and \(w\). Therefore, we can also compute the values of entries in time linear in \({\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot \log D\) for an introduce edge node. Altogether, we can compute the value of all entries of nodes that are not join nodes in \(\mathcal{O}(3^{\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot {\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot k \cdot m \cdot \log D)\) time.

For the computation of a join node \(t\), we first store \(-m\cdot \max_{\omega}-1\) in each entry \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) for partitions \(R\cup G\cup B\) of \(Q_t\) and an integer \(s\in [k]_0\). Then, iterate over partitions \(R_1\cup G_1\cup B_1\) and \(R_2\cup G_2\cup B_2\) of \(Q_t\). From the partitions \(R_1\cup G_1\cup B_1\) and \(R_2\cup G_2\cup B_2\), compute the implicitly defined partition \(R\cup G\cup B\) of \(Q_t\) in \(\mathcal{O}({\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}})\) time. (See 4). Iterate over \(s\in [k]_0\) and \(s'\in [s]_0\). If \(\mathop{\mathrm{DP}}[t_1,R_1,G_1,B_1,s'] + \mathop{\mathrm{DP}}[t_2,R_2,G_2,B_2,s-s']\) exceeds the value of \(\mathop{\mathrm{DP}}[t,R,G,B,s]\), then replace it. Otherwise let \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) stay unchanged. After the iterations, we have computed the values of \(\mathop{\mathrm{DP}}[t,R,G,B,s]\) for all partitions \(R\cup G\cup B\) of \(Q_t\) and integer \(s\in [k]_0\). Therefore, \(\mathcal{O}(9^{{\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}} \cdot {\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot k^2 \cdot \log D)\) time is required to compute all values of entries for each join node \(t\).

Hence, a solution for MapPD can be computed in \(\mathcal{O}(9^{\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot {\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\cdot k^2 \cdot m \cdot \log D)\) time. ◻

5 A Kernelization for Reticulation-Edges↩︎

In 6, we presented a branching algorithm that proves that MapPD is FPT when parameterized by the number of reticulations, \({\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\). In this section, we show that MapPD admits a kernelization algorithm of polynomial size with respect to \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\). Recall that \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\) is the number of reticulation-edges which need to be removed such that \(\mathcal{N}\) is a tree. Observe \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\ge {\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\) and in binary networks they are equal.

We first show how to bound the number of vertices and edges by a polynomial in \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\), without giving any such bound on the weights of the edges. Afterwards, we will apply a result from [41], [42] to get an appropriate bound on the edge weights.

Theorem 8. Given an instance \({\mathcal{I}}= ({\mathcal{N}}, k, D)\) of MapPD, we can compute an equivalent instance \({\mathcal{I}}^* = ({\mathcal{N}}^* = (V^*,E^*,{\omega}^*), k^*, D^*)\) of MapPD with \(|V^*|,|E^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}^2)\) and \(k^* \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\), in \(\mathcal{O}(m^2 \log^2 m \cdot \log \max_{\omega})\) time.

Throughout this section, assume that \({\mathcal{I}}= ({\mathcal{N}}= (V,E,{\omega}), k, D)\) is an instance of MapPD with \(\rho\) being the root of \(\mathcal{N}\). We recall that we do not assume \(\mathcal{N}\) to be binary and we even allow vertices with an in- and out-degree of 1. Here, we slightly bend our own definitions in which we required that \({\omega}(e) > 0\) for each edge \(e\) and that each vertex either has an in-degree of 1 or an out-degree of 1. We note that after applying all reduction rules exhaustively, we can adjust the instance to ensure these requirements are met again. We discuss this step after describing all the reduction rules.

We apply the following reduction rules exhaustively, and each rule is applied only if none of the previous rules apply. After any of the reduction rules let \({\mathcal{N}}' = (V',E',w')\) denote the new network. We assume that at any application of a reduction rule, all previous rules have been applied exhaustively.

Reduction Rule 1. Let \(v\in V\) be a vertex with children \(x\) and \(y\) that are leaves. Assume \({\omega}((v,x)) \ge {\omega}((v,y))\). If \(v\ne \rho\), then replace the edge \((v,y)\) with an edge \((\rho,y)\) of weight \({\omega}'((\rho,y)) = {\omega}((v,y))\).

Lemma 4. 1 is correct and can be applied in \(\mathcal{O}(|X| + \log\max_{{\omega}})\) time.

Proof. Correctness. We show first that if \(\mathcal{I}\) is a yes-instance of MapPD then \({\mathcal{I}}' := ({\mathcal{N}}',k,D)\) is a yes-instance of MapPD. Let \(S\subseteq X\) be a solution for MapPD on \(\mathcal{I}\). If \(y\in S\) but \(x\not\in S\), then set \(S' := {(S\cup \{x\})} \setminus \{y\}\). Then, because \({PD_{{\mathcal{N}}}}(S') = {PD_{{\mathcal{N}}}}(S) + {\omega}((v,x)) - {\omega}((v,y)) \ge {PD_{{\mathcal{N}}}}(S)\), also \(S'\) is a solution. Therefore, we may assume without loss of generality that \(x \in S\) or \(y \notin S\). If \(x \notin S\) and \(y \notin S\), then observe that \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S)\) since all edges affected by \(S\) appear in both networks with the same weight. Similarly, if \(x \in S\) and \(y \notin S\), then \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S)\). Finally, if \(x \in S\) and \(y \in S\), then any edge \(e \in E({\mathcal{N}})\setminus \{(v,y)\}\) is affected by \(S\) in \({\mathcal{N}}\) if and only if \(e\) is affected by \(S\) in \({\mathcal{N}}'\) (in particular, if \(y\) is an offspring of \(e\) in \({\mathcal{N}}\) then \(x\) is an offspring of \(e\) in \({\mathcal{N}}'\)). It follows that \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S) - {\omega}'((\rho,y)) + {\omega}((v,y)) = {PD_{{\mathcal{N}}'}}(S)\). Thus, \(S\) is a solution for MapPD on \({\mathcal{I}}'\) in all cases.

Conversely, observe that for any edge \(e \in E({\mathcal{N}}')\setminus \{\rho y\}\) and any \(S \subseteq X\), if \(e\) is affected by \(S\) in \({\mathcal{N}}'\) then it is also affected by \(S\) in \({\mathcal{N}}\). Thus, \({PD_{{\mathcal{N}}'}}(S) \le {PD_{{\mathcal{N}}}}(S)\), and so each solution for MapPD on \({\mathcal{I}}'\) is also a solution for MapPD on \(\mathcal{I}\). Thus, if \({\mathcal{I}}'\) is a yes-instance of MapPD, then so is \(\mathcal{I}\).

Running Time. In \(\mathcal{O}(|X|)\) time, we can determine whether there exists a vertex \(v\) which has two children in \(X\), by iterating over \(X\) and marking each taxon’s parent. If such a vertex \(v\) exists, we only need to compare \({\omega}((v,x))\) and \({\omega}((v,y))\) in \(\mathcal{O}(\log\max_{{\omega}})\) time. ◻

Note that 1 might create degree-2-vertices; these are handled by the next reduction rule.

Reduction Rule 2. Let \(v\in V\) be a vertex with an in- and out-degree of 1. Let \(u\) be the parent and \(w\) be the child of \(v\). Remove \(v\) and its incident edges and create an edge \((u,w)\) of weight \({\omega}'((u,w)) = {\omega}((u,v)) + {\omega}((v,w))\).

Lemma 5. 2 is correct and can be applied in \(\mathcal{O}(n + \log\max_{{\omega}})\) time.

Proof. Correctness. The correctness follows from the observation that \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S)\) for any \(S \subseteq X\).

Running Time. In \(\mathcal{O}(n)\) time, we can find out whether there exists a vertex of degree 2. If such a vertex \(v\) exists, it takes \(\mathcal{O}(\log\max_{{\omega}})\) time to remove \(v\) and its incident edges and create the new edge \(uw\) with the appropriate weight. ◻

To evaluate the size of the network after applying reduction rules, we adapt the language of network generators. We refer the reader to [43], [44] for an in-depth study.

Definition 3.

  • We use \(R\) to denote the set of reticulation vertices of \(\mathcal{N}\)(including vertices of in- and out-degree greater than \(1\)).

  • A vertex \(v \in V\setminus R\) is a core-vertex* if \(v\) has two children, \(u_1\) and \(u_2\), where \(u_1 \ne u_2\), and \(\mathop{\mathrm{desc}}(u_i) \cap R \ne \emptyset\) for each \(i \in \{1, 2\}\).*

  • We use \(Q\) to denote the set of core-vertices of \(\mathcal{N}\).

  • A side-path* in \({\mathcal{N}}\) is a path from \(u\) to \(w\) for two vertices \(u,w \in R \cup Q\) with no internal vertices in \(R\cup Q\). The internal vertices of a side-path are side-vertices.*

  • We use \(P\) to denote the set of side-vertices of \(\mathcal{N}\).

Note that after exhaustively applying [rr:trees,rr:deg-2], every non-leaf vertex is either a reticulation or has at least one reticulation as a descendant. Therefore, every non-leaf vertex is in \(Q\), in \(R\), or in \(P\). Every side-vertex has exactly one child which is a leaf.

The following result is similar to one in [43]. For completeness we prove it here.

Every network \(\mathcal{N}\) has \(\mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\) side-paths, and \(|R|+|Q| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\)

Proof. Observe that \(|R| = {\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\leq {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\).

To show the other two claims, we give a bound on the number of side-paths from above and below. As every side-path in \({\mathcal{N}}\) ends at a core vertex or reticulation, we have that the number of side-paths is at most \[\sum_{v \in Q\cup R} \deg^-(v) = \sum_{r \in R} (\deg^-(r) - 1) + |Q| + |R| = {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}+ |Q| + |R| \leq 2\cdot {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}+ |Q|.\] To give a bound from below, consider that each core-vertex has at least two side-paths leaving it, from which it follows that the number of side-paths is at least \(2|Q|\). It follows that \(2|Q| \leq 2\cdot {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}+ |Q|\) and so \(|Q| \leq 2{\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\). This in turn implies that the number of side-paths is at most \(4\cdot {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\). ◻

Reduction Rule 3. Let \(v\) and \(w\) be side-vertices and let \(v\) be the parent of \(w\). Further, let \(x_v\) and \(x_w\) be the only leaf-children of \(v\) and \(w\), respectively. If \({\omega}((v,x_v)) \le {\omega}((v,w)) + {\omega}((w,x_w))\), then replace the edge \((v,x_v)\) with an edge \((\rho,x_v)\) of weight \({\omega}'((\rho,x_v)) = {\omega}((v,x_v))\).

Lemma 6. 3 is correct and can be applied in \(\mathcal{O}(n \cdot \log\max_{{\omega}})\) time.

Proof. Correctness. The proof follows similar lines as the proof of 4. Let \(S\subseteq X\) be a solution for MapPD on \({\mathcal{I}}\). Assume that \(x_v \in S\) but \(S \cap \mathop{\mathrm{off}}(w) = \emptyset\). Then, define \(S' := {(S\cup \{x_w\})} \setminus \{x_v\}\). Observe that \((w,x_w)\) and \((v,w)\) are affected by \(S'\) but not by \(S\), while the only edge affected by \(S\) and not by \(S'\) is \((v,x_v)\). Thus \({PD_{{\mathcal{N}}}}(S') = {PD_{{\mathcal{N}}}}(S) - {\omega}((v,x_v)) + {\omega}((w,x_w)) + {\omega}((v,w))\), which, by the condition of the reduction rule, is at least \({PD_{{\mathcal{N}}}}(S)\). Therefore, also \(S'\) is a solution for MapPD on \(\mathcal{I}\) with \(x_v\not\in S'\). Thus, we may now assume that \(S\) contains a taxon from \(\mathop{\mathrm{off}}(w)\) or \(x_v\not\in S\). In either case we can observe that \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S)\).

Conversely, observe that any edge \(e \in E({\mathcal{N}}')\setminus\{(\rho,x_v)\}\) affected by \(S\) in \({\mathcal{N}}'\) is also affected by \(S\) in \({\mathcal{N}}\). Thus, \({PD_{{\mathcal{N}}'}}(S) \le {PD_{{\mathcal{N}}}}(S)\) for any \(S \subseteq X\), and so each solution for MapPD on \({\mathcal{I}}'\) is also a solution for MapPD on \(\mathcal{I}\).

Running Time. In \(\mathcal{O}(n \cdot \log\max_{{\omega}})\) time, we can find out whether there exists a vertex satisfying the conditions of \(v\) in 3, and if so edit the network accordingly. ◻

Reduction Rule 4.

Let \(u\) and \(w\) be core-vertices or reticulations with \(u \neq \rho\) and for some \(\ell > 1\) let \(v_1,\dots,v_\ell\) be side-vertices such that \((u,v_1), (v_\ell,w), (v_i,v_{i+1}) \in E\) for each \(i\in [\ell-1]\). Remove the edge \((v_1,v_2)\) and add edges \((\rho,v_2)\) and \((v_1,w)\) of respective weight \({\omega}'((\rho,v_2)) = {\omega}((v_1,v_2))\) and \({\omega}'((v_1,w)) = 0\).

An application of this reduction rule is depicted in Figure 5.

Figure 5: This figure in (1) depicts the path from a core-vertex v to another core vertex w and in (2) an application of 4 to the path depicted in (1).

Lemma 7. 4 is correct and can be applied in \(\mathcal{O}(m + \log\max_{\omega})\) time.

Proof. Correctness. Observe that any edge \(e \in E({\mathcal{N}}')\setminus\{(\rho,v_2), (v_1,w)\}\) that is affected by \(S \subseteq X\) in \({\mathcal{N}}'\) is also affected by \(S\) in \({\mathcal{N}}\). Furthermore, \((\rho,v_2)\) is affected by \(S\) in \({\mathcal{N}}'\) if and only if \((v_1,v_2)\) is affected by \(S\) in \({\mathcal{N}}\). Therefore, \({PD_{{\mathcal{N}}'}}(S) \le {PD_{{\mathcal{N}}}}(S) + {\omega}'((v_1,w)) = {PD_{{\mathcal{N}}}}(S)\) for every set \(S \subseteq X\), and each solution for MapPD on \({\mathcal{I}}'\) is also a solution for MapPD on \(\mathcal{I}\).

It remains to show that if \({\mathcal{I}}\) is a yes-instance of MapPD, then so is \({\mathcal{I}}'\). We first observe some facts. Let \(x_i\) denote the leaf child of \(v_i\) for each \(i \in [\ell]\). Note that due to 3 we may assume that \({\omega}((v_i,x_i)) \ge {\omega}((v_i,v_{i+1})) + {\omega}((v_{i+1},x_{i+1}))\) for each \(i \in [\ell - 1]\). Consequently, \[\begin{align} {\omega}((v_1,x_1)) &\geq& {\omega}((v_2,x_2)) + {\omega}((v_1,v_2))\\ &\geq& {\omega}((v_3,x_3)) + {\omega}((v_2,v_3)) + {\omega}((v_1,v_2))\\ &\geq& {\omega}((v_i,x_i)) + \sum_{j = 1}^{i-1}{\omega}((v_j,v_{j+1})) \end{align}\] for each \(i \in [\ell - 1]\).

Let \(S\) be a solution for MapPD on \(\mathcal{I}\). Observe that if \(S\) contains \(x_1\) or an offspring of \(w\), then \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S)\). Similarly, if \(S\) does not contain a taxon in \(x_1, \dots, x_\ell\) then \({PD_{{\mathcal{N}}}}(S) = {PD_{{\mathcal{N}}'}}(S)\). So assume \(S\) does not contain \(x_1\) nor an offspring of \(w\) but \(x_i \in S\) for some \(i\in [\ell]\) with \(i>1\). Define \(S':= (S \cup \{x_1\}) \setminus \{x_i\}\). Then, \({PD_{{\mathcal{N}}}}(S') \ge {PD_{{\mathcal{N}}}}(S) + {\omega}((v_1,x_1)) - {\omega}((v_i,x_i)) - \sum_{j = 1}^{i-1}{\omega}((v_j,v_{j+1}))\), which by the observation above is at least \({PD_{{\mathcal{N}}}}(S)\). As \(x_1 \in S'\) we have \({PD_{{\mathcal{N}}'}}(S') = {PD_{{\mathcal{N}}}}(S')\), and so \(S'\) is a solution for MapPD on \({\mathcal{I}}'\).

Running Time. To find the vertices \(u\) and \(w\) we iterate over the vertices in \(Q\) as vertex \(u\) and consider each outgoing edge as a path to \(u\). Therefore, all possible combinations of \(u\) and \(w\) are found in \(\mathcal{O}(m)\) time. Each operation can be executed in \(\mathcal{O}( \log\max_{\omega})\) time. ◻

We now categorize the vertices in some sets to be able to easier refer to them.

Definition 4.

  • Define \(A\) to be the set of leaf-children of \(\rho\).

  • Define \(B\) to be the set of descendants of any vertex in \(R \cup (Q \setminus \{\rho\})\).

  • Define \(Y\) to be the side-vertices which are children of \(\rho\) and define \(Y_X\) to be the leaf-children of \(Y\).

  • Define \(Z\) to be the side-vetices which are not in \(B\cup Y\)—that is, vertices that are in a side which is outgoing of the root, but not the top vertex of that side—and define \(Z_X\) to be the leaf-children of \(Z\).

  • Define \(x^* := \arg\max_{x\in A} {\omega}((\rho,x))\) and \(a^* := {\omega}((\rho,x^*))\).

  • Define \(y^* := \arg\max_{y\in Y_X} {\omega}((\rho,v_y)) + {\omega}((v_y,y))\) and \(c^* := {\omega}((v_{y^*},y^*))\), where \(v_y\) is the parent of \(y\).

[rr:trees,rr:a>a+b,rr:strings] have only transformed the instance and not made it smaller. We are now ready to start removing vertices. In the following, for a taxon \(x\in X\), we use an operation remove \(x\) when we delete \(x\) from \(X\) and \(V\) as well as the incoming edge of \(x\) from \(E\). Further, we use an operation save \(x\) consisting of these steps:

  • Reduce \(k\) by \(1\);

  • Reduce \(D\) by \({PD_{{\mathcal{N}}}}(\{x\})\);

  • Delete \(x\) from \(X\);

  • Delete all edges affected by \(x\) (denoted with \(E_{\{x\}}\)); and

  • Identify all vertices with no incoming edge to a single root.

Lemma 8. For a given instance \(\mathcal{I}\) of MapPD and a taxon \(x\),

  • \(\mathcal{I}\) has a solution \(S\) with \(x \in S\) if and only if \(S\setminus \{x\}\) is a solution for the instance after \(x\) is saved; and

  • \(\mathcal{I}\) has a solution \(S\) with \(x \notin S\) if and only if \(S\) is a solution for the instance after \(x\) is removed.

Proof. To see the first claim, let \({\mathcal{N}}'\) be the network after saving \(x\) and let \(S \subseteq X\) contain \(x\). Any edge in \({\mathcal{N}}'\) affected by \(S\setminus\{x\}\) has a corresponding edge in \(E({\mathcal{N}})\setminus E_{\{x\}}\) with the same offspring, from which it follows that \({PD_{{\mathcal{N}}}}(S) \geq {PD_{{\mathcal{N}}'}}(S\setminus\{x\}) + {PD_{{\mathcal{N}}}}(\{x\})\).

Conversely, if \(x \in S \subseteq X\) then any edge in \(E_S \setminus E_{\{x\}}\) has a corresponding edge in \({\mathcal{N}}'\) affected by \(S \setminus \{x\}\), from which it follows that \({PD_{{\mathcal{N}}'}}(S\setminus \{x\}) \geq {PD_{{\mathcal{N}}}}(S) - {PD_{{\mathcal{N}}}}(\{x\})\).

The second claim follows immediately from the definition of \({PD_{{\mathcal{N}}}}(S)\). ◻

Reduction Rule 5. If \(k > |B| + |Y|\) and \(a^* > c^*\), then save \(x^*\). If \(k > |B| + |Y|\) and \(a^* \le c^*\), then save \(y^*\).

Lemma 9. Reduction Rule 5 is correct and can be applied in \(\mathcal{O}(m \log\max_{\omega})\) time.

Proof. Correctness. Let \(v_{1,1}, v_{2,1}, \dots v_{|Y|,1}\) denote the vertices of \(Y\). Let \(v_{j,1} v_{j,2},\dots v_{j, \ell_j}\) be the side-vertices on the path from \(v_{j,1}\) to a core vertex for each \(j \in [|Y|]\). Let \(z_{j,i}\) be the leaf child of \(v_{j,i}\) for each \(j \in [|Y|]\), and \(i \in [\ell_j]\). This mapping is unique after [rr:trees,rr:deg-2] have been applied exhaustively. Observe that \(Z\) is the set \(\{v_{j,i} \mid 2 \leq j \leq |Y|, i \in [\ell_j]\}\).

Due to 3, we have \({\omega}((v_{j,1},y_{j,1})) > {\omega}((v_{j,i},y_{j,i})) + \sum_{h=1}^{i-1}{\omega}((v_{j,h},v_{j,h+1}))\) for each \(j \in [|Y|]\), and each \(i \in [\ell_j]\). Consequently, we may assume that if \(y_{j,i}\) is in a solution for some \(i > 1\), then so is \(y_{j,1}\).

Furthermore, for any solution that contains \(y_{j,i}\) and \(y_{j,1}\) for some \(i>1\), we can assume that the solution contains \(y^*\) as otherwise replacing \(y_{j,i}\) with \(y^*\) gives another solution, because \[\begin{align} && {\omega}((\rho,v_{y^*}))+ {\omega}((v_{y^*},y^*))\\ &\geq& {\omega}((\rho,v_{j,1})) + {\omega}((v_{j,1},y_{j,1}))\\ &>& {\omega}((\rho,v_{j,1})) + \sum_{h=1}^{i-1} {\omega}((v_{j,h},v_{j,h+1})) + {\omega}((v_{j,i},y_{j,i})) \end{align}\] where \(v_{y^*}\) is the parent of \(y^*\). Thus, if a solution \(S\) contains any element of \(Z_X\) we can assume \(S\) also contains \(y^*\).

Now, suppose \(k > |B| + |Y|\). Then, any solution \(S\) contains at least one element of \(A \cup Z_X\). This implies that \(S\) contains at least one taxon of \(A \cup \{y^*\}\) as \(S\) contains \(y^*\) if it contains any taxon in \(Z_X\). If \(a^* > c^*\), then \(S\) contains \(x^*\), as otherwise we could replace a taxon from \((A\setminus \{x^*\}) \cup \{y^*\}\) with \(x^*\). So, in this case, \(S\) contains \(x^*\), and we can save \(x^*\) by Lemma 8. Otherwise, we may assume \(S\) contains \(y^*\), as otherwise we can replace an element from \(A\) with \(y^*\), and we can save \(y^*\) by Lemma 8.

Running Time. We can compute the size of \(B\) and \(Y\) and find \(a^*\) and \(c^*\) in \(\mathcal{O}(n \log\max_{\omega})\) time. Saving \(x^*\) or \(y^*\) takes \(\mathcal{O}(m \log\max_{\omega})\) time. ◻

Reduction Rule 6. Let \(x_1,\dots,x_{|A|}\) be an ordering of the taxa in \(A\) such that \({\omega}((\rho,x_i)) \ge {\omega}((\rho,x_{i+1}))\) for each \(i\in [|A|-1]\). If \(k > |A|\), then remove \(x_{k+1},\dots,x_{|A|}\) and their incident edges from \({\mathcal{N}}\).

Lemma 10. Reduction Rule 6 is correct and can be applied in \(\mathcal{O}(n\log n \cdot \log\max_{{\omega}})\) time.

Proof. Correctness. Clearly, any solution for MapPD on instance \({\mathcal{I}}'\) is also a solution for MapPD on \(\mathcal{I}\). Conversely, let \(S\) be a solution for MapPD on \({\mathcal{I}}\). If \(S \cap \{x_{k+1},\dots,x_{|A|}\} = \emptyset\), then \(S\) is also a solution for MapPD on \({\mathcal{I}}'\). Assume that \(x_i \in S\) for some \(i\in \{k+1, \dots, |A|\}\). As \(|S| \le k\) we conclude that there is a taxon \(x_j\) for \(j\in [k]\) with \(x_j \not\in S\). Because \({\omega}((\rho,x_j)) \ge {\omega}((\rho,x_i))\), we conclude that \((S \cup \{x_j\}) \setminus \{x_i\}\) is also a solution for MapPD on \(\mathcal{I}\). Thus, we may assume that \(S \cap \{x_{k+1},\dots,x_{|A|}\} = \emptyset\).

Running Time. We can sort \(A\) in \(\mathcal{O}(n\log n \cdot \log\max_{{\omega}})\) time. ◻

Reduction Rule 7.

Let \(z_0,\dots,z_{k+1}\in Y\cup Z\) be vertices with \(z_{i}\) being the parent of \(z_{i+1}\) for \(i\in [k]_0\). Remove \(x_k\), the leaf-child of \(z_k\) (and apply 2 afterwards).

Lemma 11. 7 is correct and can be applied exhaustively in \(\mathcal{O}(n + \log\max_{\omega})\) time.

Proof. Correctness. Because we applied [rr:trees,rr:deg-2,rr:a>a+b] exhaustively, each vertex \(z_i\) has exactly one leaf-child \(x_i\) and \({\omega}((z_i,x_i)) > {\omega}((z_{i+1},x_{i+1})) + {\omega}((z_i,z_{i+1}))\). Consequently, we can assume that if \(x_i\) is in a solution then so are \(x_0, \dots, x_{i-1}\). Therefore, \(x_{k}\) cannot be in a solution of size \(k\), and applying 7 is correct.

Running Time. Similar to the proof of 5, we can find an appropriate vertex \(z_k\) in \(\mathcal{O}(n)\) time and edit the network in \(\mathcal{O}(\log\max_{\omega})\) time. ◻

Finally, we have everything to proof this section’s main theorem.

Proof of Theorem 8. For a given instance \({\mathcal{I}}= ({\mathcal{N}}= (V,E), k, D)\) apply all of the reduction rules exhaustively to receive an instance \({\mathcal{I}}' = ({\mathcal{N}}' = (V',' k', D')\) of MapPD in which none of the reduction rules apply. As discussed above, this instance may have vertices with in- and out-degree larger than \(1\), and edges with weight \(0\), neither of which are formally allowed by our definition of MapPD. We now discuss how the instance may be edited to fix these issues.

First, we replace each vertex \(v\) which has an in-degree and an out-degree of larger than 1 with a vertex \(v_{\text{in}}\) receiving all the incoming edges of \(v\) and a vertex \(v_{\text{out}}\) receiving all the outgoing edges, and add an edge \((v_{\text{in}},v_{\text{out}})\) of weight 0. Finally, we multiply each edge weight and \(D'\) by \((|E'|+1)\), and the edges with weight 0 to weight 1. Let \({\mathcal{I}}^* = ({\mathcal{N}}^* = (V^*,E^*), k^*, D^*)\) denote the resulting instance of MapPD.

In what follows we let \(R,Q,P\) and \(A,B,Y,Z\) denote the sets of vertices in \({\mathcal{N}}\) as defined in [def:cor-side,def:top-strings] respectively. We let \(R^*,Q^*,P^*\) and \(A^*,B^*,Y^*,Z^*\) denote the corresponding vertices in \({\mathcal{N}}^*\).

The correctness follows from the correctness of the reticulation rules.

Running time. Observe that [rr:top-strings,rr:A,rr:pathlength] remove one taxon each, while [rr:trees,rr:a>a+b] decrease \(|X\setminus A|\) by \(1\). As none of the reduction rules increase \(|X|\) or \(|X\setminus A|\), these rules are applied at most \(|X| + |X\setminus A| \leq 2 |X|\) times in total. For 2, we note that [rr:trees,rr:a>a+b,rr:top-strings,rr:A,rr:pathlength] each create one additional degree-2 vertex, and 4 does not create any. Thus, every application of 2 is either on at most \(n\) initial degree-2-vertices or occurs after an application of one of [rr:trees,rr:a>a+b,rr:top-strings,rr:A,rr:pathlength], and thus 2 is applied at most \(2 \cdot |X| + n\) times.

Each application of 4 reduces the number of side-paths starting at a non-root vertex of length of at least 2. None of the reduction rules increase this measure, and so the number of application of 4 is bounded by the number of side-paths in the original network, which is \(\mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\) by [obs:core-retic-bound].

Therefore, the total number of applications of all reduction rules is \(\mathcal{O}(|X| + n + {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}) \;\mathcal{O}(n)\). Note that a single application of any reduction rule takes \(\mathcal{O}((m+ n\log n)\cdot \log\max_{\omega})\) time by [lem:trees,lem:deg-2,lem:a>a+b,lem:strings,lem:top-strings,lem:A,lem:pathlength]. An application of 2 may increase \(\max_{\omega}\), but the total weight of the network never increases and therefore the maximum weight of any edge at any stage in the algorithm is at most the total weight of the network, or at most \(m \cdot \max_{\omega}\). Therefore, the maximum running time of any application of a reduction rule is \(\mathcal{O}((m+ n\log n)\cdot (\log m + \log\max_{\omega}))\). We conclude that applying all rules exhaustively takes \(\mathcal{O}((|X| + {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}) \cdot (m+ n\log n)\cdot (\log m + \log\max_{\omega}))\) time, which can be summarized as \(\mathcal{O}(m^2 \log^2 m \cdot \log \max_{\omega})\). The final step of replacing vertices with in-and out-degree greater than \(1\) and adjusting edge-weights can be done in \(\mathcal{O}(m \cdot (\log m + \log \max_{\omega}))\), and so the final running time remains \(\mathcal{O}(m^2 \log^2 m \cdot \log \max_{\omega})\).

Size. Each application of 4 increases the number of reticulation-edges by one. Therefore, note that by \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\) we refer to the parameter in the original network.

Observe that none of the reduction rules (except for 4) change the number of reticulations or core vertices in the network. Reduction Rule 4 may turn some core vertices into reticulations but otherwise does not create new core vertices or reticulations. Therefore, we have \(|R^*| + |Q^*| = |R| + |Q| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\) by Observation [obs:core-retic-bound].

As 4 is exhaustively applied, we have that each side-path in \({\mathcal{N}}^*\) not leaving the root has at most one internal vertex, and this vertex has one leaf child. There are \(\mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\) side-paths in \({\mathcal{N}}^*\) by [obs:core-retic-bound] and the fact that none of the reduction rules increase the number of side-paths not leaving the root. Thus, we have that the total number of vertices reachable from \(R^* \cup (Q^*\setminus \rho)\) is at most \(\mathcal{O}(|R^*| + |Q^*|) + \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}) = \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\). That is, \(|B^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\).

The size of \(Y^*\) is the number of side-paths starting at the root. There are at most \(|Q| + 2\cdot{\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\) such paths in the original instance. Each application of 4 adds one such path. We saw that \(|Q| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\) and 4 can be applied \(\mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\) times. We conclude \(|Y^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\).

After 5 has been applied exhaustively, we may conclude that \(k^* \le |B^*| + |Y^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\). After 6 has been applied exhaustively, there are at most \(k^*\) vertices in \(A^*\) and after 7 has been applied exhaustively, each side-path has length at most \(k^*\) such that \(|Y^*| + |Z^*| \le |Y^*| \cdot (k^* + 1) \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}^2)\). We conclude \(|V^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}^2)\).

We have \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}^*} \le {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}+ |Q^*| + |R^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}})\). Because \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}= |E| - |V|\) in any network, we conclude \(|E^*| = \mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}^*} + |V^*| \in \mathcal{O}({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}^2)\). ◻

From Theorem 8, we have that in polynomial time we can reduce any instance \(\mathcal{I}\) of MapPD to an equivalent instance \({\mathcal{I}}^* = ({\mathcal{N}}^* = (V^*,E^*,{{\omega}^*}), k^*, D^*)\) in which \(|V^*|\), \(|E^*|\), and \(k^*\) are all bounded by a polynomial in \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\). This does not guarantee a polynomial kernel, as the encoding size of \(D^*\) or \(\max_{{\omega}^*}\) could be much larger than \(|V^*|\) or \(|E^*|\). Fortunately, we can apply a result of [41], [42] to bound these values, as follows.

Let \(e_1,\dots,e_{m^*}\) be an order of the edges after applying all reduction rules. We define \(w_i := {\omega}^*( e_i )\) for each \(i\in [m^*]\) and \(W := D^*\). In polynomial time, we can compute positive numbers \(w_1', \dots, w_{m^*}'\), and \(W'\) such that the total encoding length is \(\mathcal{O}( (m^*)^4 ) \in \mathcal{O}( {\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}^8 )\) with \(\sum_{i \in S} w_i \ge W\) if and only if \(\sum_{i \in S} w_i' \ge W'\) for every \(S \subseteq [m^*]\) by [41].

We directly conclude the following.

Theorem 9. MapPD admits a polynomial size kernelization algorithm for the number of reticulation-edges \(\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}\).

6 Discussion↩︎

In this paper, we considered Max-All-Paths-PD, a problem in maximizing phylogenetic diversity in networks, and analyzed it within the framework of parameterized complexity. We showed that MapPD is W[\(2\)]-hard parameterized by \(k\), the size of the solution. We further were able to show an equivalence between MapPD parameterized by \(k\) and Item-Weighted Partial Set Cover parameterized by the size of the solution. Thus, establishing the exact complexity class of Item-Weighted Partial Set Cover, which seems to be of interest, would also establish the exact complexity class of MapPD. On the positive side, we showed that MapPD is FPT when parameterized with the number of reticulations \({\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\) and with respect to the treewidth \({\mathop{\mathrm{{tw}}}_{{\mathcal{N}}}}\) of the network. We further showed that MapPD admits a kernelization algorithm with respect to the number of reticulation-edges \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\).

Because \({\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\) is smaller than \({\mathop{\mathrm{{e-ret}}}_{{\mathcal{N}}}}\), it is natural to ask if the kernelization result can also be shown for \({\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\). We also ask whether MapPD parameterized by \(k\) is W[\(2\)]-complete.

In the bigger picture, we have not addressed the question of finding a suitable measure for phylogentic diversity in networks. The all-paths phylogenetic diversity measure \({PD_{{\mathcal{N}}}}\) considered in this paper is one of four measures considered in [8]. The second measure, which they call Network-PD, requires not only weights on each of the edges in the network, but also an inheritance proportion \(p(e)\) on each edge \(e = (u,v)\) leading into a reticulation. This value denotes the expected number of features that are expected to be passed from \(u\) to \(v\). Network-PD is a generalization of AllPaths-PD, as the measures are equivalent when all inheritance proportions are \(1\). The authors also consider two additional measures, MinWeightTree-PD and MaxWeightTree-PD, in which the respective minimum and maximum displayed tree is considered. Average-Tree PD, which uses inheritance proportions to create a weighted average over all displayed trees, has been studied in [9]. This measure is bounded from below and above by MinWeightTree-PD and MaxWeightTree-PD respectively. See also [45].

Since the first publication of this paper, Network-PD has been examined from a parameterized point of view and it has been proven that the problem of maximizing Network-PD is also FPT when parameterized by \({\mathop{\mathrm{{ret}}}_{{\mathcal{N}}}}\) on binary networks, but is already NP-hard on level-1 networks [17]. We note that, since Network-PD generalizes AllPaths-PD, our hardness results for \(k\) and \({\overline{k}}\) also carry across to Network-PD. The measure Average-Tree-PD is #P-hard, but FPT when parameterized by the network’s level on networks of bounded degree [9]. Recently, it has been shown that optimizing MaxWeightTree-PD and computing values for MinWeightTree-PD are both FPT with respect to node scanwidth [18]. It remains open whether MinWeightTree-PD can also be optimized efficiently.

Besides computational issues, there is also the important question of which definition of phylogenetic diversity provides the most realistic measure of actual biodiversity. Any useful definition must strike a balance of being as biologically realistic as possible while still being computationally feasible to work with.

References↩︎

[1]
M. Jones and J. Schestag, How Can We Maximize Phylogenetic Diversity? Parameterized Approaches for Networks,” in Proceedings of the 18th international symposium on parameterized and exact computation (IPEC 2023), 2023, pp. 30:1–30:12, doi: 10.4230/LIPIcs.IPEC.2023.30.
[2]
D. P. Faith, Conservation evaluation and phylogenetic diversity,” Biological Conservation, vol. 61, no. 1, pp. 1–10, 1992, doi: 10.1016/0006-3207(92)91201-3.
[3]
C.-J. Haake, A. Kashiwada, and F. E. Su, The Shapley value of phylogenetic trees,” Journal of Mathematical Biology, vol. 56, no. 4, pp. 479–497, 2008, doi: 10.1007/s00285-007-0126-2.
[4]
K. Hartmann, The equivalence of two phylogenetic biodiversity measures: the Shapley value and Fair Proportion index,” Journal of Mathematical Biology, vol. 67, pp. 1163–1170, 2013, doi: 10.1007/s00285-012-0585-y.
[5]
D. W. Redding and A. Ø. Mooers, Incorporating Evolutionary Measures into Conservation Prioritization,” Conservation Biology, vol. 20, no. 6, pp. 1670–1678, 2006, doi: 10.1111/j.1523-1739.2006.00555.x.
[6]
S. T. A. C. Isaac Nick J. B. AND Turvey, Mammals on the EDGE: Conservation Priorities Based on Threat and Phylogeny,” PLOS ONE, vol. 2, no. 3, pp. 1–7, 2007, doi: 10.1371/journal.pone.0000296.
[7]
D. H. Huson, R. Rupp, and C. Scornavacca, Phylogenetic Networks: Concepts, Algorithms and Applications. Cambridge University Press, 2010.
[8]
M. Bordewich, C. Semple, and K. Wicke, “On the complexity of optimising variants of phylogenetic diversity on phylogenetic networks,” Theoretical Computer Science, vol. 917, pp. 66–80, 2022, doi: 10.1016/j.tcs.2022.03.012.
[9]
L. van Iersel, M. Jones, J. Schestag, C. Scornavacca, and M. Weller, Average-Tree Phylogenetic Diversity of Networks,” in Proceedings of the 25th international workshop on algorithms in bioinformatics (WABI 2025), 2025, pp. 14:1–14:21, doi: 10.4230/LIPIcs.WABI.2025.15.
[10]
K. Wicke and M. Fischer, “Phylogenetic diversity and biodiversity indices on phylogenetic networks,” Mathematical Biosciences, vol. 298, pp. 80–90, 2018, doi: 10.1016/j.mbs.2018.02.005.
[11]
F. Pardi and N. Goldman, Species Choice for Comparative Genomics: Being Greedy Works,” PLoS Genetics, vol. 1, 2005, doi: 10.1371/journal.pgen.0010071.
[12]
M. Steel, Phylogenetic Diversity and the Greedy Algorithm,” Systematic Biology, vol. 54, no. 4, pp. 527–529, 2005, doi: 10.1080/10635150590947023.
[13]
M. Fuchs and E. Y. Jin, Equality of Shapley value and fair proportion index in phylogenetic trees,” Journal of Mathematical Biology, vol. 71, pp. 1133–1147, 2015, doi: 10.1007/s00285-014-0853-0.
[14]
O. Chernomor, S. Klaere, A. von Haeseler, and B. Q. Minh, Split Diversity: Measuring and Optimizing Biodiversity using Phylogenetic Split Networks,” in Biodiversity conservation and phylogenetic systematics: Preserving our evolutionary heritage in an extinction crisis, Springer International Publishing, 2016, pp. 173–195.
[15]
A. Spillner, B. T. Nguyen, and V. Moulton, Computing Phylogenetic Diversity for Split Systems,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 5, no. 2, pp. 235–244, 2008, doi: 10.1109/tcbb.2007.70260.
[16]
I. A. M. Volkmann Logan AND Martyn, Prioritizing Populations for Conservation Using Phylogenetic Networks,” PLOS ONE, vol. 9, no. 2, pp. 1–10, Feb. 2014, doi: 10.1371/journal.pone.0088945.
[17]
L. van Iersel, M. Jones, J. Schestag, C. Scornavacca, and M. Weller, Phylogenetic Network Diversity Parameterized by Reticulation Number and Beyond,” in Proceedings of the 22nd RECOMB international workshop on comparative genomics (RECOMB-CG 2025), 2025, pp. 107–130, doi: 10.1007/978-3-031-94928-9_7.
[18]
N. Holtgrefe and J. Schestag, Tractable Maximization of Budgeted Phylogenetic Diversity on Networks Utilizing Node Scanwidth,” arXiv preprint, 2026, [Online]. Available: https://arxiv.org/abs/2605.23319.
[19]
N. Holtgrefe, L. van Iersel, R. Meuwese, Y. Murakami, and J. Schestag, PaNDA: Efficient Optimization of Phylogenetic Diversity in Networks,” bioRxiv: 10.1101/2025.11.14.688467, 2025, doi: 10.1101/2025.11.14.688467.
[20]
M. Jones and J. Schestag, Parameterized Algorithms for Diversity of Networks with Ecological Dependencies,” in Proceedings of the 20th international symposium on parameterized and exact computation (IPEC 2025), 2025, pp. 11:1–11:21, doi: 10.4230/LIPIcs.IPEC.2025.11.
[21]
B. Faller, C. Semple, and D. Welsh, Optimizing Phylogenetic Diversity with Ecological Constraints,” Annals of Combinatorics, vol. 15, no. 2, pp. 255–266, 2011, doi: 10.1007/s00026-011-0093-6.
[22]
N. Holtgrefe, J. Schestag, and N. Zeh, Limits of Kernelization and Parametrization for Phylogenetic Diversity with Dependencies,” in Proceedings of the 17th latin american theoretical informatics symposium (LATIN 2026), 2026.
[23]
C. Komusiewicz and J. Schestag, Maximizing Phylogenetic Diversity under Ecological Constraints: A Parameterized Complexity Study,” in Proceedings of the 44th IARCS annual conference on foundations of software technology and theoretical computer science (FSTTCS 2024), 2024, pp. 28:1–28:18, doi: 10.4230/LIPIcs.FSTTCS.2024.28.
[24]
V. Moulton, C. Semple, and M. Steel, Optimizing phylogenetic diversity under constraints,” Journal of Theoretical Biology, vol. 246, no. 1, pp. 186–194, 2007, doi: 10.1016/j.jtbi.2006.12.021.
[25]
J. Schestag, Weighted Food Webs Make Computing Phylogenetic Diversity So Much Harder,” in Proceedings of the 51st international conference on current trends in theory and practice of computer science (SOFSEM 2026), 2026, pp. 187–202, doi: 10.1007/978-3-032-17801-5_14.
[26]
J. Schestag and N. Zeh, The First Known Problem That Is FPT with Respect to Node Scanwidth but Not Treewidth,” arXiv preprint, 2026, [Online]. Available: https://arxiv.org/abs/2602.06903.
[27]
M. Cygan et al., Parameterized Algorithms. Springer, 2015.
[28]
R. G. Downey and M. R. Fellows, Fundamentals of Parameterized Complexity. Springer, 2013.
[29]
R. G. Downey and M. R. Fellows, Fixed-parameter tractability and completeness II: On completeness for W[1],” Theoretical Computer Science, vol. 141, no. 1–2, pp. 109–131, 1995, doi: 10.1016/0304-3975(94)00097-3.
[30]
C. Calabro, R. Impagliazzo, and R. Paturi, The Complexity of Satisfiability of Small Depth Circuits,” in Parameterized and exact computation, 2009, pp. 75–85, doi: 10.1007/978-3-642-11269-0_6.
[31]
R. Impagliazzo and R. Paturi, On the complexity of k-SAT,” Journal of Computer and System Sciences, vol. 62, no. 2, pp. 367–375, 2001, doi: 10.1006/jcss.2000.1727.
[32]
M. Cygan et al., On Problems as Hard as CNF-SAT,” ACM Transactions on Algorithms, vol. 12, no. 3, pp. 1–24, 2016, doi: 10.1145/2925416.
[33]
B. Lin, A Simple Gap-Producing Reduction for the Parameterized Set Cover Problem,” in Proceedings of the 46th international colloquium on automata, languages, and programming (ICALP 2019), 2019, pp. 81–1, doi: 10.4230/LIPIcs.ICALP.2019.81.
[34]
M. Bläser, “Computing small partial coverings,” Information Processing Letters, vol. 85, no. 6, pp. 327–331, 2003, doi: 10.1016/s0020-0190(02)00434-9.
[35]
F. Gurski, C. Rehs, and J. Rethmann, Knapsack problems: A parameterized point of view,” Theoretical Computer Science, vol. 775, pp. 93–108, 2019, doi: 10.1016/j.tcs.2018.12.019.
[36]
H. M. Weingartner, Capital Budgeting of Interrelated Projects: Survey and Synthesis,” Management Science, vol. 12, no. 7, pp. 485–516, 1966, doi: 10.1287/mnsc.12.7.485.
[37]
M. Naor, L. J. Schulman, and A. Srinivasan, “Splitters and near-optimal derandomization,” Proceedings of IEEE 36th Annual Foundations of Computer Science (FOCS 1995), pp. 182–191, 1995, doi: 10.1109/sfcs.1995.492475.
[38]
V. Berry, C. Scornavacca, and M. Weller, “Scanning phylogenetic networks is NP-hard,” in Proceedings of the 46th international conference on current trends in theory and practice of computer science (SOFSEM 2020), 2020, pp. 519–530, doi: 10.1007/978-3-030-38919-2_42.
[39]
N. Holtgrefe, Computing the Scanwidth of Directed Acyclic Graphs,” Master's Thesis, Technische Universiteit Delft, 2023.
[40]
M. Cygan, J. Nederlof, M. Pilipczuk, M. Pilipczuk, J. M. M. Van Rooij, and J. O. Wojtaszczyk, Solving Connectivity Problems Parameterized by Treewidth in Single Exponential Time,” ACM Transactions on Algorithms, vol. 18, no. 2, pp. 1–31, 2022, doi: 10.1109/focs.2011.23.
[41]
M. Etscheid, S. Kratsch, M. Mnich, and H. Röglin, “Polynomial kernels for weighted problems,” Journal of Computer and System Sciences, vol. 84, pp. 1–10, 2017, doi: 10.1016/j.jcss.2016.06.004.
[42]
A. Frank and É. Tardos, “An application of simultaneous diophantine approximation in combinatorial optimization,” Combinatorica, vol. 7, no. 1, pp. 49–65, 1987, doi: 10.1007/bf02579200.
[43]
P. Gambette, V. Berry, and C. Paul, The Structure of Level-k Phylogenetic Networks,” in Proceedings of the 20th annual symposium on combinatorial pattern matching (CPM 2009), 2009, pp. 289–300, doi: 10.1007/978-3-642-02441-2_26.
[44]
L. van Iersel, J. Keijsper, S. Kelk, L. Stougie, F. Hagen, and T. Boekhout, Constructing Level-2 Phylogenetic Networks from Triplets,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 6, no. 4, pp. 667–681, 2009, doi: 10.1109/tcbb.2009.22.
[45]
L. van Iersel, M. Jones, J. Schestag, C. Scornavacca, and M. Weller, Average-Tree Phylogenetic Diversity Parameterized by Scanwidth and Invisibility,” arXiv preprint, 2026, [Online]. Available: https://arxiv.org/abs/2604.27745.

  1. A preliminary version of this paper has been presented at IPEC 2023 [1].↩︎

  2. The \(\log({\overline{k}})\)-factor of the running time comes from adding \(\log({\overline{k}})\)-digit numbers and is not mentioned in the original papers [35], [36].↩︎