Complexity and algorithms for copy-number evolution problems

Background Cancer is an evolutionary process characterized by the accumulation of somatic mutations in a population of cells that form a tumor. One frequent type of mutations is copy number aberrations, which alter the number of copies of genomic regions. The number of copies of each position along a chromosome constitutes the chromosome’s copy-number profile. Understanding how such profiles evolve in cancer can assist in both diagnosis and prognosis. Results We model the evolution of a tumor by segmental deletions and amplifications, and gauge distance from profile \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {a}$$\end{document}a to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {b}$$\end{document}b by the minimum number of events needed to transform \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {a}$$\end{document}a into \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {b}$$\end{document}b. Given two profiles, our first problem aims to find a parental profile that minimizes the sum of distances to its children. Given k profiles, the second, more general problem, seeks a phylogenetic tree, whose k leaves are labeled by the k given profiles and whose internal vertices are labeled by ancestral profiles such that the sum of edge distances is minimum. Conclusions For the former problem we give a pseudo-polynomial dynamic programming algorithm that is linear in the profile length, and an integer linear program formulation. For the latter problem we show it is NP-hard and give an integer linear program formulation that scales to practical problem instance sizes. We assess the efficiency and quality of our algorithms on simulated instances. Availability https://github.com/raphael-group/CNT-ILP Electronic supplementary material The online version of this article (doi:10.1186/s13015-017-0103-2) contains supplementary material, which is available to authorized users.


Background
The clonal theory of cancer posits that cancer results from an evolutionary process where somatic mutations that arise during the lifetime of an individual accumulate in a population of cells that form a tumor [1]. Consequently, a tumor consists of clones, which are subpopulations of cells sharing a unique combination of somatic mutations. The evolutionary history of the clones can be described by a phylogenetic tree whose leaves correspond to extant clones and whose edges are labeled by mutations. Computational inference of phylogenetic trees is a fundamental problem in species evolution [2], and has recently been studied extensively for tumor evolution in the case where mutations are single-nucleotide variants [3][4][5][6][7]. Here, we study the problem of constructing a phylogenetic tree of a tumor in the case where mutations are copy number aberrations.
Copy number aberrations include segmental deletions and amplifications that affect large genomic regions, and are common in many cancer types [8]. As a result of these events, the number of copies of genomic regions (positions) along a chromosome can deviate from the diploid, two-copy state of each position in a normal chromosome. Understanding these events and the underlying evolutionary tree that relates them is important in predicting disease progression and the outcome of medical interventions [9].
Several methods have been introduced to infer trees from copy number aberrations in cancer. In [10,11] the authors use fluorescent in situ hybridisation data to analyze gain and loss of whole chromosomes and single genes. However, due to technical limitations, this technology does not scale to a large number of positions. In addition, common deletions and amplifications that affect only a subset of the positions of a chromosome are not supported by the model. In another work, Schwartz et al. [12] introduced MEDICC, an algorithm that analyzes amplifications and deletions of contiguous segments. The input to MEDICC is a set of copy-number profiles, vectors of integers defining the copy-number state of each position. These profiles are measured for multiple samples from a tumor using DNA microarrays or DNA sequencing. The edit distance from profile a to b was defined as the minimum number of amplifications and deletions of segments required to transform a into b. Note that this distance is not symmetric. Using this distance measure, the authors applied heuristics to reconstruct phylogenetic trees. However, the complexity of their methods was not analyzed. Recently, Shamir et al. [13] analyzed some combinatorial aspects of this amplification/deletion distance model and proved that the distance from one profile to another can be computed in linear time.
In this work, we consider two problems in the evolutionary analysis of copy-number profiles: the copynumber triplet (CN3) and copy-number tree (CNT) problems. Given two profiles, the CN3 problem aims to find a parental profile that minimizes the sum of distances to its children. The CNT problem asks to construct a phylogenetic tree whose k leaves are labeled by the k given profiles, and to assign profiles to the internal vertices so that the sum of distances over all edges is minimum; such a tree describes the evolutionary history under a maximum parsimony assumption (Fig. 1).
For the CN3 problem we give a pseudo-polynomial time algorithm that is linear in n, the number of positions in the profiles, along with an integer linear program (ILP) formulation whose number of variables and constraints is linear in n. We show that the CNT problem is NP-hard and present an ILP formulation that scales to practical problem instance sizes. Finally, we use simulations to test our algorithms.
A preliminary version of this study was published as an extended abstract in WABI [14].

Profiles and events
We represent a reference chromosome as a sequence of intervals that we call positions, numbered from 1 to n in left to right order. We consider mutations that amplify or delete contiguous positions. The copy-number profile, or profile for short, of a clone specifies the number of copies of each of the n positions. Formally, a profile y i = [y i,s ] is a vector of length n. An entry y i,s ∈ N indicates the number of copies of position s in clone i. For simplicity, we consider a single chromosome only. The results can be easily extended to the case of multiple chromosomes.
An operation, or event, acting on profile y i increases or decreases copy-numbers in a contiguous segment of y i . Formally, an event is a triple (s, t, b) where s ≤ t and b ∈ Z . If b is positive then profile-valued positions s, . . . , t are incremented by b, whereas for negative b the positions s, . . . , t are decremented by at most |b|. That is, applying event (s, t, b) to y i results in a new profile y ′ i such that y ′ i,l = max{y i,l + b, 0}, if s ≤ l ≤ t and y i,l � = 0, y i,l , otherwise.

Fig. 1
Copy-number tree problem. As input we are given the copy-number profiles of four leaves, each profile is an integer vector that is inferred from data; e.g. the coverage of mapped reads (blue segments). The tree topology and profiles at internal vertices are found to minimize the total number of amplifications (green bars) and deletions (red bars). The displayed scenario has 14 total events.
Note that the cost is not symmetric. The cost �(T ) of the tree T is the sum of the costs of all edges. Our observations correspond to the profiles c 1 , . . . , c k of k extant clones. Under the assumption of parsimony, the goal is to find a copy-number tree T * of minimum cost whose leaves correspond to the extant clones. Furthermore, we assume that the maximum copy-number in the phylogeny is bounded by e ∈ N. We thus have the following problem.
Note that by definition the profile of the root vertex r(T) of any copy-number tree T is the vector whose entries are all 2's. As such, this must hold as well for the minimum-cost tree T * , which always exists. Additionally, |b|.
the requirement of T being a binary tree is without loss of generality as high-degree vertices can be split. Furthermore, the assumption that T is a full binary tree (i.e. each vertex has out-degree either 0 or 2) is also without loss of generality as degree-2 internal non-root vertices can be merged. To account for the case where r(T) has outdegree 1, given an instance (c 1 , . . . , c k , e) we solve a second instance (c 1 , . . . , c k , c k+1 , e) with an additional profile c k+1 consisting of 2's. The result is the minimum-cost tree among the two instances.

The copy-number triplet problem
The special case where k = 2 is the copy-number triplet (CN3) problem. When we consider only two input profiles, it is not necessary to explicitly refer to trees. Thus, we formulate CN3 as follows: Instances to both CNT and CN3 always have a solution as the diploid profile is an ancestor to any other profile. Next, we present definitions that will allow us to describe results specific to CN3 in a compact manner. We denote the minimum value δ σ (m, u) + δ σ (m, v) associated with a solution (m, σ (m, u), σ (m, v)) by �(u, v). We say that a triple (m, σ (m, u), σ (m, v)) is optimal if it realizes �(u, v). Note that �(u, v) is symmetric and finite. Moreover, if δ σ (u, v) (resp. δ σ (v, u)) is finite then m = u (resp. m = v) gives a trivial solution to CN3. Let B = max{max n i=1 {u i }, max n i=1 {v i }} denote the maximum copy-number in the input. Finally, given α ∈ {σ (m, u), σ (m, v)} and w ∈ {−, +}, we denote the cost of deletions/amplifications affecting position i by

Previous results
We now present three results incorporated in the design of our dynamic programming and ILP algorithms for CN3 and CNT. The first one relies on the observation that if it is safe to fix m i = 0. Therefore, we have the following straightforward yet useful result.

Lemma 1
Without loss of generality, it can be assumed that for all 1 ≤ i ≤ n, at least one value among u i and v i is positive.  12:13 This lemma also implies that we can assume that the profile m of any optimal triple (m, σ (m, u), σ (m, v)) consists only of positive values (since for a position i such that m i = 0, it holds that v i = u i = 0).
We say that a sequence of events where all of the deletions precede all of the amplifications is sorted. Formally, let σ (p, q) be a sequence of events that yields q from p . Then, if there exist a sequence α − of deletion events and a sequence α + of amplification events such that σ (p, q) = α − α + , we say that σ (p, q) is sorted. The following lemma states that we can focus on sorted sequences of events: Lemma 2 [13] Given a sequence of events σ (p, q) that yields q from p, there exists a sorted sequence of cost at most δ σ (p, q) that yields q from p.
Shamir et al. [13] also showed that the minimum cost of a sequence yielding q from p is computable by the recursive formula given below. Here, we let G[i, d, a] be the minimum cost of a sequence of events σ that from the prefix p i = (p 1 , . . . , p i ) of p yields the prefix q i = (q 1 , . . . , q i ) of q and that satisfies co(σ , −, i) = d and co(σ , +, i) = a. In case such a sequence does not exist, Lemma 3 [13] Let p and q be two profiles, and let 0 ≤ d, a ≤ B. Then,

Complexity
In this section we show that CNT is NP-hard by reduction from the maximum parsimony phylogeny (MPP) problem [15]. In MPP, we seek to find a binary phylogeny T, which is a full binary tree whose vertices are labeled by binary vectors of size n. The cost of a binary phylogeny T is defined as the sum of the Hamming distances between the two binary vectors associated with each edge. The input for MPP are leaves of an unknown binary phylogeny in the form of k binary vectors b 1 , . . . , b k of size n, and the task is to find a minimum-cost binary phylogeny T with k leaves such that each leaf v i ∈ L(T ) is labeled by b i and the root is labeled by a vector of all 0's. We consider the decision version where we are asked whether there exists a binary phylogeny T with cost at most h. This problem is NP-complete [15].
We start by defining the transformation (Fig. 2). Let b 1 , . . . , b k be an instance of MPP. The corresponding CNT-instance has parameter e = 2 and profiles (1) otherwise.  ( 1 Ω 2 Ω 2 Ω 1 ) ( 2 Ω 1 Ω 1 Ω 2 ) ( 1 Ω 2 Ω 2 Ω 1 ) ( 2 Ω 2 Ω 2 Ω 1 ) Informally, c i is defined as a vector consisting of true positions (which correspond to the original values) that are separated by walls (which are vectors of alternating 2, 1 values of length nk). The purpose of wall positions is to prevent an event from spanning more than one true position. Profile c k+1 plays a role in initializing the wall elements immediately from the all 2's root. This transformation can be computed in polynomial time, and it is used in the following proof of hardness.

Theorem 4 The CNT problem is NP-hard.
Proof We claim that MPP instance, composed of b 1 , . . . , b k such that |b i | = n, admits a binary phylogeny T with cost at most h if and only if the corresponding CNT instance, composed of c 1 , . . . , c k+1 and e = 2 such that |c i | = n, admits a copy-number tree T ′ with cost at most h + W where W = (n − 1)nk/2. Note that (n − 1)nk is even, and thus W ∈ N. Intuitively, W represents the cost of 'initializing' the wall elements .
For each true position s ∈ [n], the corresponding position in the transformation is denoted by α(s). We show that given T we can construct a copy-number tree T ′ such that �(T ′ ) = �(T ) + W . Tree T ′ is composed of a root vertex r(T ′ ) whose two children correspond to tree T (rooted at r(T)) and an additional leaf w labeled by c k+1 . The remaining vertices (1)]. The edge (r(T ′ ), w) of T ′ connects two vertices with the same profile and thus has cost 0. The other edge (r(T ′ ), r(T )) has cost W, which corresponds to the number of wall positions that need to be initialized to 1 (these are common to all leaves c 1 , . . . , c k ). Consider an edge (v i , v j ) of T with Hamming distance ζ. First, observe that the Hamming distance equals the number of flips required to transform b i into b j . We describe how to obtain a sequence of events σ (i, j) on the corresponding edge . A flip from 0 to 1 at position s corresponds to a deletion event (α(s), α(s), −1). Conversely, a flip from 1 to 0 in position s corresponds to an amplification event (α(s), α(s), +1) .
(⇐) Let T ′ be a copy-number tree with cost �(T ′ ) ≤ h + W . We denote by c i the profile of vertex v i ∈ V (T ′ ). We show that T ′ can be transformed into a binary phylogeny T such that �(T ) ≤ h. We distinguish two cases h ≥ nk + 1 and h ≤ nk.
1. If h ≥ nk + 1, we can construct a naive binary phylogeny T whose internal vertices are labeled with the same binary vector as the root (all 0's). The cost of T is at most kn since the total number of flips is at most kn, and thus �(T ) ≤ nk + 1 ≤ h. 2. Consider the case where h ≤ nk. We assume without loss of generality that n ≥ 4. Now, h < W since nk < W for n ≥ 4. Hence, �(T ′ ) < 2W . Recall that the root vertex r(T ′ ) has 2's at every position including the walls. We claim that r(T ′ ) has two children, one of which is a leaf labeled by c k+1 . Assume for a contradiction that this is not the case and that the two children split L(T ′ ) into two sets L 1 and L 2 such that |L 1 | > 1 and |L 2 | > 1. Thus, there exist two distinct leaves v 1 ∈ L 1 and v 2 ∈ L 2 such that for the respective profiles it holds that y 1 � = c k+1 and y 2 � = c k+1 . Now the cost of initializing the wall elements of y 1 and y 2 is at least 2W, which yields a contradiction. It thus follows that the tree T ′ must be composed of a root vertex r(T ′ ) whose first child corresponds to a tree T ′′ (rooted at r(T ′′ )) and whose second child is a leaf w labeled by c k+1 . We focus our attention on T ′′ . We claim that there is no event in T ′′ that covers more than one true position. Assume for a contradiction that such an event (s, t, b) exists. By construction, positions s and t span at least one wall . W.l.o.g. assume that both s and t are true positions. In our restricted setting where e = 2 and where the leaves of T ′′ do not contain 0's, the event (s, t, b) can only be applied if all positions from s to t have the same value. As such, this event must be preceded by at least nk / 2 other events to make those positions with the same value and must be followed by at least nk / 2 other events to restore the wall . Thus, there must be at least nk other events (which is the length of a wall ). These events may be on the same edge or any ancestral edge. Therefore, �(T ′′ ) ≥ nk + 1, which is a contradiction. Hence, events in T ′′ where �(T ′′ ) ≤ nk span at most one true position. Finally, we show how to construct a binary phylogeny Consider an edge (v i , v j ) of T ′′ labeled by events σ (i, j) and with cost δ(i, j) = ζ. Each event (s, t, b) ∈ σ (i, j) spans at most one true position (but may contain parts of a wall ). Let X ⊆ [n] be the set of true positions spanned by events in σ (i, j). Observe that |X| ≤ ζ since either b = 1 or b = −1. Therefore, the Hamming distance between b i and b j is at most |X|. Hence, �(T ) ≤ �(T ′′ ) ≤ h

Copy-number triplet problem: DP
In this section we develop a DP algorithm, called DP-Alg1, that solves the CN3 problem in time O(nB 10 ) and space O(nB 5 ). We will assume w.l.o.g. that sequences of events consist only of events of the form (s, t, b) where b ∈ {−1, 1}. Events with |b| > 1 can be replaced by |b| events of that form, having the same total cost. Next, we show that DP-Alg1 can be improved to obtain a DP algorithm, called DP-Alg2, that solves the CN3 problem in time O(nB 7 ) and space O(nB 4 ). We also present in Additional file 1: Appendix B an ILP formulation for CN3 consisting of O(n) variables.
DP-Alg1 is based on Lemma 3 and the following Lemma 5, proved in Additional file 1: Appendix A.
Lemma 5 Let u and v be two profiles. Then, there exists an optimal triple (m, σ (m, u), σ (m, v)) such that the following conditions hold.
• Both σ (m, u) and σ (m, v) are sorted sequences of events. Let u i = (u 1 , . . . , u i ) and v i = (v 1 , . . . , v i ) be the prefixes consisting of the first i positions of u and v, respectively. We will store costs corresponding to partial solutions in a table L (see Fig. 3). This table has an entry At such an entry, we will store the the minimum total cost, δ σ (m, , which is defined as follows. This set contains all triples (m, σ (m, u i ), σ (m, v i )) such the numbers of deletions/ amplifications affecting i are given by d u , a u , d v , a v , where the notation d/a and v/u indicate whether we consider amplifications or deletions as well as σ (m, u i ) or σ (m, v i ), m i = m and for all j ∈ {1, . . . , n}, m j ≤ B.
By Lemma 5, �(u, v) is the minimum cost stored in an entry where i = n. Thus, it remains to show how to correctly compute the entries of L efficiently. We use the following base cases, whose correctness follows from Lemma 3: The correctness of this formula follows from Lemma 3 and since in light of Lemma 5, it exhaustively searches for the best choice for the previous value of m. DP-Alg1 computes entries of L iteratively and returns By computing the entries of L in an ascending order according to their first argument i, we have that the computation of each entry relies only on entries that are computed before it. The table L consists of O(nB 5 ) entries, and each of them can be computed in time O(nB 5 ). Thus, we obtain the following lemma.
Next, we show that DP-Alg1 can be modified to obtain a DP algorithm, called DP-Alg2, for which we prove the following result. Recall that Lemma 1 states that we can assume that for all 1 ≤ i ≤ n, either u i > 0 or v i > 0 (or both). Now, by the formulas given in the previous subsection, for all 1 ≤ i ≤ n, if u i > 0 then we only need to explicitly store the entries L[i, m, d u , a u , d v , a v ] where a u = u i − m + d u ; if one accesses an entry L[i, m, d u , a u , d v , a v ] where a u � = u i − m + d u , we simply return ∞. The symmetric argument holds for all 1 ≤ i ≤ n such that v i > 0. Now, for all 1 ≤ i ≤ n, the number of entries is bounded by O(B 4 ) rather than O(B 5 ), and therefore the space complexity is bounded by O(nB 4 ).
Consider an entry L[i, m, d u , a u , d v , a v ] computed by the recursive formula of the previous subsection. In case u i−1 > 0, we need only consider the value First, note that since u i−1 = 0, by Lemma 1 we have that v i−1 > 0, and therefore we can fix We now claim that we can also fix d u′ = max{d u , m ′ } and a u′ = a u , which will imply that the lemma is correct. To show this, we need to show that there is a triple (m, σ (m, u i ), σ (m, v i )) ∈ S(i, m, d u , a u , d v , a v ) that minimizes δ σ (m, u i ) + δ σ (m, v i ) and satisfies max{d u , m ′ } = co(σ (m, u i ), −, i − 1) and a u = co(σ (m, u i ), +, i − 1). Since u i−1 = 0, it is clear that m ′ ≤ co(σ (m, u i ), −, i − 1).
Moreover, since u i−1 = 0 , each event in σ (m, u) whose segment includes i can be elongated to include i − 1 as well while maintaining optimality (as we do not introduce new events) and that σ (m, u i ) yields u i from m. Therefore, we can assume that d u ≤ co(σ (m, u i ), −, i − 1) and a u ≤ co(σ (m, u i ), +, i − 1). Furthermore, since u i−1 = 0, each event in σ (m, u i ) whose segment includes i − 1 but not i can be modified to exclude i − 1 as well, as long as it still holds that m ′ ≤ co(σ (m, u i ), −, i − 1), while maintaining optimality and that σ (m, u i ) yields u i from m . Therefore, max{d u , m ′ } = co(σ (m, u i ), −, i − 1) and a u = co(σ (m, u i ), +, i − 1).

Lemma 9 Each entry of the form L
Proof The proof is symmetric to the one of Lemma 8.
Thus, we obtain the desired algorithm DP-Alg2 that computes the entries of L iteratively using the latter observations to store only the required entries and efficiently compute them.

Copy-number tree problem: ILP
In this section we describe an ILP for CNT consisting of O(k 2 n + kn log e) variables and O(k 2 n + kn log e) constraints. Let (c 1 , . . . , c k , e) be an instance of CNT. Recall that we seek to find a full binary tree with k leaves. We define a directed graph G that contains any full binary tree with k leaves as a spanning tree. As such, |V (G)| = 2k − 1. The vertex set V(G) consists of a subset L(G) of leaves such that |L(G)| = k. We denote by r(T ) ∈ V (G) \ L(G) the vertex that corresponds to the root vertex. Throughout the following, we consider an order v 1 , . . . , v k , . . . , v 2k−1 of the vertices in V(G) such that v 1 = r(T ) and {v k , . . . , v 2k−1 } = L(G). The edge set We denote by N − (j) the set of vertices incident to an outgoing edge to j. Conversely, N + (i) denotes the set of vertices incident to an incoming edge from i. We make the following two observations.

Observation 1 G is a directed acyclic graph.
Observation 2 Any copy-number tree T is a spanning tree of G.
We now proceed to define the set of feasible solutions (X, Y) to a CNT instance (c 1 , . . . , c k , e) by introducing constraints and variables modeling the tree topology, and vertex labeling and edge costs. More specifically, variables X = [x i,j ] encode a spanning tree T of G and variables Y = [y i,s ] encode the profiles of each vertex such that X and Y combined induce edge costs. In the following we provide more details.

Tree topology
The goal is to enforce that we select a spanning tree T of G that is a full binary tree. To do so, we introduce a binary variable Note that by construction i < j. We require that each vertex v ∈ V (G) \ {v 1 } has exactly one incoming edge in T.
We require that each vertex v ∈ V (G) \ L(G) has two outgoing edges in T.

Vertex labeling and edge costs
We introduce variables y i,s ∈ {0, . . . , e} that encode the copy-number state of position s of vertex v i . Since the profiles of each leaf as well as the root vertex are given, we have the following constraints.
Next, we encode a set σ (v i , v j ) of events that transform the profile y i of v i into profile y j of v j . Recall that an event is a triple (s, t, b) and corresponds to an amplification if b > 0 and a deletion otherwise. We model the cost of the amplifications and the cost of the deletions covering any position s with two separate variables. Variables a i,j,s ∈ {0, . . . , e} correspond to the cost of the amplifications in σ (v i , v j ) covering position s. Variables d i,j,s ∈ {0, . . . , e} correspond to the cost of the deletions in σ (v i , v j ) covering position s. Now, we consider the effect of amplifications and deletions on a position s. By Lemma 2, we have that there exists an optimal solution such that for each edge (v i , v j ) there are two sets of events σ − (v i , v j ) and σ + (v i , v j ) that yield y j,s from y i,s by first applying σ − (v i , v j ) followed by σ + (v i , v j ). If a subset of the events in σ − (v i , v j ) results in position s reaching value 0, the remaining amplifications and deletions will not change the value of that position. We distinguish the following four different cases (Table 1).
a. y i,s = 0 and y j,s = 0: since both positions have value 0, the number of amplifications a i,j,s and deletions d i,j,s are between 0 and e. b. y i,s � = 0 and y j,s � = 0: since y j,s > 0, the number of deletions d i,j,s must be strictly smaller than y i,s . Moreover, it must hold that y j,s + d i,j,s = y i,s + a i,j,s .
c. y i,s � = 0 and y j,s = 0: recall that by Lemma 2 deletions precede amplifications. As such, the number of deletions d i,j,s must be at least y i,s . d. y i,s = 0 and y j,s � = 0: once a position s has been lost it cannot be regained. As such, this case is infeasible.
To capture the conditions of the four cases, we introduce binary variables ȳ i,s ∈ {0, 1} and constraints such that ȳ i,s = 1 iff y i,s � = 0.
for each position s ∈ {1, . . . , n} and each edge (v i , v j ) ∈ E(G). In the case of ȳ i,s = 1 and ȳ j,s = 1 , constraints (12) and (13) model the equation y j,s + d i,j,s = y i,s + a i,j,s , whereas constraints (14) ensure that d i,j,s < y i,s . Next, we model case (c) using the following constraints.
y i,s ≤ d i,j,s + e(1 −ȳ i,s +ȳ j,s ) for each position s ∈ [1, n] and each edge (v i , v j ) ∈ E(G) . Finally, the following constraints, which encode that if x i,j = 1 then ȳ i,s = 0 implies ȳ j,s = 0, prevent case (d) from happening.
for each position s ∈ {1, . . . , n} and each edge The cost of a tree T is the sum of the costs of the events associated to each edge (v i , v j ) ∈ E(T ). We model the cost of an edge (v i , v j ) as the sum of the number of amplifications and deletions that start at each position s. Variables ā i,j,s ∈ {0, . . . , e} and d i,j,s ∈ {0, . . . , e} represent the number of new amplifications and deletions, respectively, that start at position s. We model this using the following constraints.
for each position s ∈ {1, . . . , n} and each edge The objective is to minimize the cost of the events of the selected tree T, which corresponds to We model the product using the following constraint.
In Additional file 1: Appendix C, we report the complete ILP formulation.

Copy-number triplet (CN3) problem
We compared the running times of our DP and ILP algorithms for the CN3 problem as a function of n and B. Our results on simulations show that while the running time of the DP algorithm highly depends on the copynumber range B, the ILP time is almost independent of B. With the exception of the case of B = 2, the ILP is faster (Additional file 1: Figure S1). Additional file 1: Figure S1 presents the average running times of the DP and ILP algorithms on simulated instances.

Copy-number tree (CNT) problem
To assess the performance of the ILP for CNT, we simulated instances by randomly generating a full binary tree T with k leaves. We randomly labeled edges by events according to a specified maximum number m of events per edge with amplifications/deletions ratio ρ. Specifically, we label an edge by d events where d is drawn uniformly from the set {1, . . . , m}. For each event (s, t, b) we uniformly at random draw an interval s ≤ t and decide with probability ρ whether b = 1 (amplification) or b = −1 (deletion). The resulting instance of CNT is composed of the profiles c 1 , . . . , c k of the k leaves of T and e is set to the maximum value of the input profiles.
We implemented the ILP in C++ using CPLEX v12.6 (http://www.cplex.com). The implementation is available at https://github.com/raphael-group/CNT-ILP. We ran the simulated instances on a compute cluster with 2.6 GHz processors (16 cores) and 32 GB of RAM each. We solved 302 instances (93.2%) to optimality within the specified time limit of 5 h. Computations exceeding this limit were aborted and the best identified solution was considered. The instances that were not solved to optimality are a subset of the larger instances with k = 8 and n ∈ {20, 30, 40}. For these cases, we show in Additional file 1: Figure S2 the gap between the best identified solutions and their computed upper bounds.
For 323 out of 324 instances (99.7%) the tree inferred by the ILP has a cost that was at most the simulated tree cost. The only exception is an instance with k = 8 leaves and n = 40 positions that was not solved to optimality, and where the inferred cost was 15 vs. a simulated cost of 14. These results empirically validate the correctness of our ILP implementation.
We observe that the running time increases with the number of leaves and to a lesser extent with the number of positions (Fig. 4a). In addition, we assessed the distance between topologies of the inferred and simulated trees using the Robinson-Foulds (RF) metric [16]. To allow for a comparison across varying number of leaves, we normalized by the total number of splits to the range [0,1] such that a value of 0 corresponds to the same topology of both trees. For 264 instances (81.4%) the normalized RF was at most 0.35. For k = 4 leaves the median RF value was 0, which indicates that for at least 50% of these instances the simulated tree topology was recovered. Figure 4b shows the distribution of normalized RF values with varying numbers of leaves and positions. Given a fixed number of leaves, the normalized RF value decreases with increasing number of positions. This indicates that the maximum parsimony assumption becomes more appropriate with larger number of positions, which is not surprising since amplifications and deletions are less likely to overlap. In addition, we observed that running time and RF values are not affected by varying values of m and ρ (Additional file 1: Figures S3, S4). In summary, we have shown that our ILP scales to practical problem instance sizes with k = 6 and up to n = 40 positions, which is a reasonable size for applications to real data [12,17].

Conclusions
In this paper we studied two problems in the evolution of copy-number profiles. For the CN3 problem, we gave a pseudo-polynomial DP algorithm and an ILP formulation, and compared their efficiency on simulated data. Determining the computational complexity of CN3 remains an open problem. We showed that the general CNT problem is NP-hard and gave an ILP solution. Finally, we assessed the performance of our tree reconstruction on simulated data. While all formulations describe copy-number profiles on a single chromosome, our results readily generalize to multiple chromosomes. In addition, while our formulations presently lack the phasing step performed in [12], both the DP algorithm and the ILP formulations can be extended to support phasing.
We note that experiments on real cancer sample data are required to establish the relevance of our formulations. To this end, several extensions to our models might be required. These include handling fractional copynumber values that are a result of most experiments and handling missing data for some positions. Moreover, since tumor samples are often impure, each sample may actually represent a mixture of several clones. In such situations, different objectives might try to decompose the clone mixture in order to reconstruct the evolutionary tree as has been investigated for single-nucleotide variants [3][4][5][6][7].