Next Article in Journal
Multiple Criteria Decision Making and Prospective Scenarios Model for Selection of Companies to Be Incubated
Previous Article in Journal
Research on Optimization of Multi-Objective Regional Public Transportation Scheduling
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Arc-Completion of 2-Colored Best Match Graphs to Binary-Explainable Best Match Graphs

1
Max Planck Institute for Mathematics in the Sciences, D-04103 Leipzig, Germany
2
Bioinformatics Group, Department of Computer Science, and Interdisciplinary Center for Bioinformatics, Universität Leipzig, D-04107 Leipzig, Germany
3
Software Competence Center Hagenberg GmbH (SCCH), A-4232 Hagenberg, Austria
4
Department of Mathematics, Faculty of Science, Stockholm University, SE-10691 Stockholm, Sweden
5
German Centre for Integrative Biodiversity, Research (iDiv) Halle-Jena-Leipzig, Competence Center for Scalable Data Services and Solutions, Leipzig Research Center for Civilization Diseases, and Leipzig Research Center for Civilization Diseases (LIFE), Leipzig University, D-04103 Leipzig, Germany
6
Institute for Theoretical Chemistry, University of Vienna, A-1090 Wien, Austria
7
Facultad de Ciencias, Universidad National de Colombia, CO-111321 Bogotá, Colombia
8
Santa Fe Institute, Santa Fe, NM 87501, USA
*
Author to whom correspondence should be addressed.
Submission received: 11 March 2021 / Revised: 26 March 2021 / Accepted: 27 March 2021 / Published: 29 March 2021
(This article belongs to the Section Combinatorial Optimization, Graph, and Network Algorithms)

Abstract

:
Best match graphs (BMGs) are vertex-colored digraphs that naturally arise in mathematical phylogenetics to formalize the notion of evolutionary closest genes w.r.t. an a priori unknown phylogenetic tree. BMGs are explained by unique least resolved trees. We prove that the property of a rooted, leaf-colored tree to be least resolved for some BMG is preserved by the contraction of inner edges. For the special case of two-colored BMGs, this leads to a characterization of the least resolved trees (LRTs) of binary-explainable trees and a simple, polynomial-time algorithm for the minimum cardinality completion of the arc set of a BMG to reach a BMG that can be explained by a binary tree.

1. Introduction

Best match graphs (BMGs) are vertex-colored digraphs that appear in mathematical phylogenetics as a representation of a gene’s evolutionary closest relatives in another species [1,2]. That is, given a rooted tree T, a vertex (gene) x in the BMG G ( T , σ ) is colored by the species σ ( x ) in which it resides, and there is an arc ( x , y ) if there is no other gene y in species σ ( y ) = σ ( y ) σ ( x ) with a later last common ancestor than the last common ancestor lca T ( x , y ) of x and y in T. Although rooted trees are crucial for the definition of BMGs, they are, however, unknown in practice, and we are often only left with estimates of their BMGs. In general, there are multiple trees that “explain” the same BMG. There is, however, a unique least resolved tree (LRT) for each BMG, which can be obtained from T by contracting certain edges [1]. The LRTs will play a central role in this contribution. The subgraph of a BMG induced by the vertices of some subset of colors is again a BMG. Every BMG therefore can be viewed as the disjoint union of (the arc sets of) 2-colored BMGs (2-BMGs). These 2-BMGs [1,3,4] are bipartite and form a common subclass of the sink-free digraphs [5,6] and the bi-transitive digraphs [7].
Estimates of graphs from real-life data tend to be affected by noise and thus typically will violate the defining properties of the desired graph class. The solution of a corresponding graph modification problem [8] therefore can by employed as a means of noise reduction, see, e.g., in [9]. The arc modification problems (deletion, completion, and editing) for BMGs are NP-complete, in general [10], and remain hard even for the special case of 2 colors.
Phylogenetic trees are often considered to be binary in theory. Most polytomies are therefore considered a limitation of the available data or method of tree reconstruction [11,12] rather than a biological reality [13,14]. In the setting of BMGs, this distinction is important because not all BMGs can be derived from binary gene trees. Instead, binary-explainable BMGs (beBMGs) form a proper subclass [15] that is distinguished by a single forbidden induced subgraph, the hourglass, from other BMGs [16]. As “true phylogenies” are often assumed to be binary, BMGs that are not binary-explainable will be considered as a poor model. It is of interest, therefore, to consider the problem of modifying a BMG to a beBMG. Conceptually, this is similar to fully resolving phylogenetic trees starting from a tree with multifurcations. The arc modification problems for beBMGs are, as the more general case, NP-complete [10,15]. Thus, heuristic algorithms must be employed in practice [17]. It is useful to know, therefore, whether an approximation of a graph by a BMG that is not binary-explainable may be helpful towards finding a beBMG. That is, whether a solution to the more general problem makes is easier to find a solution of the constrained problem. To this end, we naturally ask whether the problem of modifying a BMG to a beBMG is as difficult as the general case. It is, in fact, not unusual that graph modification problems that are hard in general become easy when the input is confined to a—usually restrictive—class of graphs, see, e.g., in [18,19]. Here, we show that the problem of completing a 2-colored BMG to a beBMG can indeed be solved in polynomial time.
To prove this result, we make use of the fact that every BMG is associated with a unique least resolved tree (LRT). Theorem 1 shows that the property of being the LRT for some BMG is preserved under contraction of inner edges. This observation leads to the explicit construction of a “collapsed tree” from the LRT of the input BMG ( G , σ ) , which not only is the LRT of a 2-colored beBMG, but also minimizes the number of arcs that need to be inserted to obtain a beBMG from ( G , σ ) . The construction does not generalize to more than 2 colors.

2. Notation

We consider simple directed graphs (digraphs) G = ( V , E ) with vertex set V and arc set E V × V \ { ( v , v ) v V } and rooted (undirected) trees T with root ρ . Correspondingly, we write ( x , y ) for directed arcs from x to y, and x y for undirected tree edges. We write G [ W ] for the subgraph of G induced by a set of vertices W V . Given a tree T, we write V ( T ) and E ( T ) for its set of vertices and edges, respectively; L ( T ) for the set of leaves; and V 0 ( T ) = V ( T ) \ L ( T ) for the set of inner vertices.
A vertex coloring of a graph is a map σ : V S , where S is a non-empty set of colors. A vertex coloring of G is proper if σ ( x ) σ ( y ) for all ( x , y ) E ( G ) . We will also consider leaf-colorings σ : L ( T ) S for trees T and denote by ( G , σ ) and ( T , σ ) vertex-colored (di)graphs and leaf-colored trees, respectively.
Given a rooted tree, we write x T y if y is an ancestor of x, i.e., if y lies along the unique path from ρ to x in T. We write x T y if x T y and x y . The relation T is a partial order on T. If x y E ( T ) and x T y , then y is the unique parent of x, denoted by par T ( x ) , and x a child of y. The set of children of a vertex u V ( T ) is denoted by child T ( u ) . A rooted tree T is phylogenetic if every inner vertex x V 0 ( T ) has at least two children. All trees in this contribution are assumed to be phylogenetic. Furthermore, we write T ( u ) for the subtree rooted in u, i.e., V ( T ( u ) ) = { y V ( T ) y T u } . The last common ancestor of a non-empty subset A V ( T ) is the unique T -minimal vertex of T, that is, an ancestor of every u A . For convenience, we write lca T ( x , y , ) instead of lca T ( { x , y , } ) .
A triple x y | z is a rooted tree with the three leaves x, y, and z such that lca T ( x , y ) lca T ( x , y , z ) . If e E ( T ) , we denote by T e the tree obtained by contracting the edge e. We will only be interested in contractions of inner edges, i.e., those that preserve the leaf set. We say that Tdisplays a tree T , in symbols T T , if T can be obtained from T as the minimal subtree of T that connects all elements in L ( T ) with root lca T ( L ( T ) ) and by suppressing all inner vertices that only have one child left, which can, e.g., be achieved by a stepwise contraction of one of their two incident edges until no such vertices remain.

3. Best Match Graphs, Least Resolved Trees, and Binary-Explainable BMGs

In this section, we first summarize some properties of best match graphs and their least resolved trees. We then show that the contraction of inner edges in least resolved trees always leads to least resolved trees. Furthermore, we recall some properties of binary-explainable best match graphs that will be needed later.
Definition 1.
Let ( T , σ ) be a leaf-colored tree. A leaf y L ( T ) is a best match of the leaf x L ( T ) if σ ( x ) σ ( y ) and lca T ( x , y ) T lca T ( x , y ) holds for all leaves y of color σ ( y ) = σ ( y ) .
Given ( T , σ ) , the digraph ( T , σ ) = ( V , E ) with vertex set V = L ( T ) , vertex-coloring σ , and with arcs ( x , y ) E if and only if y is a best match of x w.r.t. ( T , σ ) is called the best match graph (BMG) of ( T , σ ) [1]:
Definition 2.
An arbitrary vertex-colored digraph ( G , σ ) is a best match graph (BMG) if there exists a leaf-colored tree ( T , σ ) such that ( G , σ ) = G ( T , σ ) . In this case, we say that ( T , σ ) explains ( G , σ ) .
Proposition 1
([16], Lemma 8). If T A is obtained from a tree T by contracting all edges in a subset A of inner edges in T, then G ( T , σ ) G ( T A , σ ) .
An edge e of a leaf-colored tree is redundant (w.r.t. ( G , σ ) ) if it can be contracted without affecting the BMG, i.e., if G ( T , σ ) G = ( T e , σ ) .
Definition 3.
A leaf-colored tree ( T , σ ) is least resolved if there is no non-empty subset A E ( T ) such that G ( T , σ ) = G ( T A , σ ) .
We define the notion of being least resolved here as a property of the tree ( T , σ ) alone. Of course, every least resolved tree is also least resolved w.r.t. some BMG, namely, the (uniquely defined) digraph G ( T , σ ) .
It is shown in [1] that ( T , σ ) is least resolved if and only if it does not contain a redundant edge.
Proposition 2
([1], Thm. 8). Every BMG ( G , σ ) is explained by a unique least resolved tree (LRT), which is obtained from an arbitrary tree ( T , σ ) that explains ( G , σ ) by contraction of all redundant edges of ( T , σ ) .
In particular, therefore, there is a bijection between BMGs and LRTs. Surprisingly, the property of being least resolved for some BMG is preserved under contraction of inner edges of T.
Theorem 1.
Suppose ( T , σ ) is least resolved and let A be a set of inner edges of T, and denote by T A the tree obtained from a tree T by contracting all edges in A. Then, ( T A , σ ) is again least resolved.
Proof. 
Assume that ( T , σ ) is least resolved, i.e., it does not contain any redundant edges, and set ( G , σ ) : = G ( T , σ ) . Lemma 7 in [16] states that an inner edge e = u v with v T u in ( T , σ ) is non-redundant if and only if there is an arc ( a , b ) E ( G ) such that lca T ( a , b ) = v and σ ( b ) σ ( L ( T ( u ) ) \ L ( T ( v ) ) ) . The statement trivially holds if ( T , σ ) has at most one inner edge. Therefore, we assume that ( T , σ ) has at least two distinct inner edges e = u v and e . We show that every non-redundant edge e in T remains non-redundant in T e . Thus, let e be a non-redundant edge in T. Therefore, there is an arc ( a , b ) E ( G ) such that lca T ( a , b ) = v and σ ( b ) σ ( L ( T ( u ) ) \ L ( T ( v ) ) ) . Now consider the tree T e obtained from T by contraction of the inner edge e e . Clearly, we also have lca T e ( a , b ) = v and σ ( b ) σ ( L ( T e ( u ) ) \ L ( T e ( v ) ) ) . Proposition 1 implies G ( T , σ ) G ( T e , σ ) , and thus ( a , b ) E ( G ( T e , σ ) ) . Making use of the characterization of redundant edges in ([16], Lemma 7) again, we conclude that e is non-redundant in ( T e , σ ) .
As both e and e were chosen arbitrarily, we observe that the contraction of a single inner edge does not produce new redundant edges. We can therefore apply this argument for each step in the consecutive contraction of all edges in A (in an arbitrary order) to conclude that ( T A , σ ) does not contain redundant edges. Therefore, Proposition 2 implies that ( T A , σ ) is least resolved. □
Corollary 1.
If ( T , σ ) is least resolved and A is a non-empty set of inner edges of T, then G ( T , σ ) G ( T A , σ ) .
Proof. 
By Proposition 1, we have G ( T , σ ) G ( T A , σ ) . By Theorem 1, ( T A , σ ) is least resolved. As the LRT of a BMG is unique (cf. Proposition 2), we have G ( T , σ ) G ( T A , σ ) . □
As another immediate consequence of Theorem 1 and uniqueness of the LRT of a BMG (Proposition 2), we obtain the following.
Corollary 2.
If e and e are two distinct inner edges of a least resolved tree ( T , σ ) , then G ( T e , σ ) G ( T e , σ ) .
Let us now turn to the subclass of BMGs that can be explained by a binary tree.
Definition 4.
A binary-explainable BMG (beBMG) is a BMG ( G , σ ) such that there is a binary leaf-colored tree ( T , σ ) that explains ( G , σ ) .
As shown in [16], beBMGs can be characterized among BMGs by means of a simple forbidden colored induced subgraph:
Definition 5.
An hourglass in a properly vertex-colored digraph ( G , σ ) , denoted by [ x y x y ] , is a subgraph ( G [ Q ] , σ | Q ) induced by a set of four pairwise distinct vertices Q = { x , x , y , y } V ( G ) such that (i) σ ( x ) = σ ( x ) σ ( y ) = σ ( y ) , (ii) ( x , y ) , ( y , x ) and ( x y ) , ( y , x ) are bidirectional arcs in G, (iii) ( x , y ) , ( y , x ) E ( G ) , and (iv) ( y , x ) , ( x , y ) E ( G ) .
An hourglass together with a (non-binary) tree explaining it is illustrated in Figure 1A. A properly vertex-colored digraph that does not contain an hourglass as an induced subgraph is called hourglass-free.
Proposition 3
([16], Lemma 31 and Prop. 8). For every BMG ( G , σ ) explained by a tree ( T , σ ) , the following three statements are equivalent:
1. 
( G , σ ) is binary-explainable.
2. 
( G , σ ) is hourglass-free.
3. 
There is no vertex u V 0 ( T ) with three distinct children— v 1 , v 2 , and v 3 —and two distinct colors—r and s—satisfying
(a) 
r σ ( L ( T ( v 1 ) ) ) , r , s σ ( L ( T ( v 2 ) ) ) , and s σ ( L ( T ( v 3 ) ) ) , and
(b) 
s σ ( L ( T ( v 1 ) ) ) , and r σ ( L ( T ( v 3 ) ) ) .
Note that the LRTs of beBMGs are usually not binary. In fact, it is shown in [15] that, for a beBMG ( G , σ ) , there exists a unique binary refinable tree (BTR) B ( G , σ ) with the property that every binary tree ( T , σ ) that displays B ( G , σ ) explains ( G , σ ) . The BRT is in general much better resolved than the LRT of ( G , σ ) .

4. Two-Colored BMGs

Let us now briefly focus on 2-colored BMGs (2-BMGs). As arcs in BMG can only connect vertices with different colors, every 2-BMG is bipartite. Furthermore, every leaf x in a tree with two leaf colors has at least one best match y. Every 2-BMG is therefore sink-free, i.e., every vertex has at least one out-neighbor. Furthermore, Schaller et al. [10] showed that the following graphs (see also Figure 1B) are forbidden induced subgraphs for 2-BMGs.
Definition 6
(F1-, F2-, and F3-graphs).
(F1)
A properly 2-colored digraph on four distinct vertices V = { x 1 , x 2 , y 1 , y 2 } with coloring σ ( x 1 ) = σ ( x 2 ) σ ( y 1 ) = σ ( y 2 ) is an F1-graph if ( x 1 , y 1 ) , ( y 2 , x 2 ) , ( y 1 , x 2 ) E and ( x 1 , y 2 ) , ( y 2 , x 1 ) E .
(F2)
A properly 2-colored digraph on four distinct vertices V = { x 1 , x 2 , y 1 , y 2 } with coloring σ ( x 1 ) = σ ( x 2 ) σ ( y 1 ) = σ ( y 2 ) is an F2-graph if ( x 1 , y 1 ) , ( y 1 , x 2 ) , ( x 2 , y 2 ) E and ( x 1 , y 2 ) E .
(F3)
A properly 2-colored digraph on five distinct vertices V = { x 1 , x 2 , y 1 , y 2 , y 3 } with coloring σ ( x 1 ) = σ ( x 2 ) σ ( y 1 ) = σ ( y 2 ) = σ ( y 3 ) is an F3-graph if
( x 1 , y 1 ) , ( x 2 , y 2 ) , ( x 1 , y 3 ) , ( x 2 , y 3 ) E and ( x 1 , y 2 ) , ( x 2 , y 1 ) E .
Proposition 4
([10], Thm. 4.4). A properly 2-colored digraph is a BMG if and only if it is sink-free and does not contain an induced F1-, F2-, or F3-graph.
A peculiar property of 2-BMGs is that their LRTs can be constructed efficiently by recursively decomposing an input 2-BMG into non-trivial induced subgraphs and individual vertices [15]. Although we will not need this construction here, one of its corner stones plays an important role:
Definition 7
(Support Leaves). For a given tree T, the set S u : = child T ( u ) L ( T ) is the set of all support leaves of vertex u V ( T ) .
We note in passing that every inner vertex u of the LRT of a 2-BMG ( G , σ ) , with the possible exception of the root ρ , has a non-empty set of support leaves S u , and S ρ if and only if ( G , σ ) is connected [20]. In the following, we will make use of a connection between a 2-BMG and its LRT.
Lemma 1.
Let ( G , σ ) be a 2-BMG, ( T , σ ) its LRT, and x , y L ( T ) = V ( G ) . Then, ( x , y ) E ( G ) if and only if σ ( x ) σ ( y ) and y L ( T ( par T ( x ) ) ) .
Proof. 
First note that as ( G , σ ) is 2-colored, ( T , σ ) has at least two leaves and u : = par T ( x ) is always defined. First, assume σ ( x ) σ ( y ) , and thus x y , and let y L ( T ( u ) ) . As x is a child of u, we have lca T ( x , y ) = u . Moreover, as u is the parent of x, there is no vertex y of color σ ( y ) such that lca T ( x , y ) T lca T ( x , y ) = u . Therefore, y is a best match of x, i.e., ( x , y ) E ( G ) .
Now suppose, for contraposition, that σ ( x ) = σ ( y ) or y L ( T ( u ) ) . If σ ( x ) = σ ( y ) , then, by definition, ( x , y ) E ( G ) . If y L ( T ( u ) ) , then u T ρ T . Therefore, we can apply Corollary 1 in [20] to the inner vertex u to conclude that | σ ( L ( T ( u ) ) ) | > 1 , i.e., the subtree L ( T ( u ) ) contains both colors. Thus, we can find a vertex y of color σ ( y ) such that lca T ( x , y ) T u T lca T ( x , y ) which implies that ( x , y ) E ( G ) . □
As an immediate consequence, we find the following.
Corollary 3.
Let ( G , σ ) be a 2-BMG, ( T , σ ) its LRT and x , y V ( G ) = L ( T ) . Then, ( x , y ) , ( y , x ) E ( G ) if and only if σ ( x ) σ ( y ) and par T ( x ) = par T ( y ) .

5. Completion of a 2-BMG to a 2-beBMG

Writing G + F : = ( G , E F ) for a digraph = ( V , E ) and arc set F V × V \ { ( v , v ) v V } , consider the following graph completion problem:
Problem 1 (2-BMG Completion restricted to Binary-Explainable Graphs (2-BMG CBEG) )
Input:A properly 2-colored digraph ( = ( V , E ) , σ ) and an integer k.
Question:Is there a subset F V × V \ ( { ( v , v ) v V } E ) such that
| F | k and ( + F , σ ) is a binary-explainable 2-BMG?
In the general case, 2-BMG CBEG is NP-complete ([10], Cor. 5.11). Here, we are interested in the restriction of the 2-BMG CBEG problem with BMGs as input.
The following result holds for BMGs and their completions to beBMGs with an arbitrary number of colors.
Lemma 2.
Let ( G , σ ) be a completion of a BMG ( G , σ ) to a beBMG, and let [ x y x y ] be an induced hourglass in ( G , σ ) . Then, ( G , σ ) contains both arcs ( x , y ) and ( y , x ) .
Proof. 
It is shown in ([1], Obs. 1) that the subgraphs of a BMG induced by all vertices with any two given colors is a 2-BMG. As ( G , σ ) is a (binary-explainable) BMG, all of its 2-colored induced subgraphs are therefore 2-BMGs. By assumption, ( G , σ ) is not binary-explainable as it contains the hourglass [ x y x y ] as an induced subgraph (cf. Proposition 3). The hourglass contains all possible arcs between vertices of different colors except ( x , y ) and ( y , x ) . As ( G , σ ) contains no hourglass and is a completion of G, i.e., E ( G ) E ( G ) , we conclude that ( G , σ ) contains at least one of the arcs ( x , y ) and ( y , x ) .
Assume for contradiction that, w.l.o.g., ( G , σ ) only contains ( x , y ) . We have ( y , x ) , ( y , x ) E ( G ) and σ ( y ) = σ ( y ) σ ( x ) = σ ( x ) by the definition of hourglasses, and by assumption ( x , y ) E ( G ) and ( y , x ) E ( G ) . Therefore, the four vertices x , x , y , y induce an F2-graph in ( G , σ ) . By Proposition 4, the 2-colored subgraph of ( G , σ ) induced by the two colors σ ( x ) and σ ( y ) is not a BMG. Consequently, ( G , σ ) is not a BMG either, it is a contradiction. Therefore, ( G , σ ) contains both arcs ( x , y ) and ( y , x ) . □
Definition 8.
Let ( T , σ ) be a tree with a 2-colored leaf set, i.e., | σ ( L ( T ) ) | = 2 . Denote by ( T * , σ ) the collapsed tree obtained from ( T , σ ) by contraction of all inner edges in T ( u ) for all u V 0 ( T ) that have support leaves of both colors.
In other words, ( T * , σ ) is obtained from ( T , σ ) by collapsing every subtree T ( u ) to a star if u has support leaves of both colors.
Lemma 3.
The collapsed tree ( T * , σ ) of ( T , σ ) is uniquely defined and can be computed from ( T , σ ) in O ( | V ( T ) | ) -time.
Proof. 
The collapsed tree ( T * , σ ) is well defined because whenever v T u , collapsing the subtree T ( v ) to a star does not change the set of support leaves S u . Similarly, collapsing T ( v ) if v is not T -comparable with u does not change S u . Thus, ( T * , σ ) is uniquely defined. To see that ( T * , σ ) can be computed in O ( | V ( T ) | ) operations, we observe that it suffices to collapse all subtrees T ( u ) such that u V 0 ( T ) has support leaves of both colors and there is no u T u with this property, i.e., u is T -maximal in that sense. These vertices u for which T ( u ) is replaced by a star are found by a top-down traversal of T and evaluating | σ ( S u ) | , all of which can be computed in linear total time. □
As an immediate consequence of the uniqueness of T * and the construction in the second part of the proof of Lemma 3, we obtain the following.
Corollary 4.
The collapsed tree ( T * * , σ ) of a collapsed tree ( T * , σ ) satisfies T * * = T * .
Lemma 4.
If ( T * , σ ) is the collapsed tree of an LRT ( T , σ ) with 2-colored leaf set, then G ( T * , σ ) is binary-explainable.
Proof. 
As the collapsed tree ( T * , σ ) is obtained from the LRT ( T , σ ) by contraction of edges, Theorem 1 implies that ( T * , σ ) is also least resolved. Now suppose, for contradiction, that G ( T * , σ ) is not binary-explainable. By, Proposition 3(3), ( T * , σ ) has a vertex u V 0 ( T * ) with three distinct children— v 1 , v 2 , and v 3 —and two distinct colors—r and s—satisfying (i) r σ ( L ( T * ( v 1 ) ) ) , r , s σ ( L ( T * ( v 2 ) ) ) , and s σ ( L ( T * ( v 3 ) ) ) , and (ii) s σ ( L ( T * ( v 1 ) ) ) and r σ ( L ( T * ( v 3 ) ) ) . As ( G , σ ) is only 2-colored, the latter arguments imply that | σ ( L ( T * ( v 1 ) ) ) | = | σ ( L ( T * ( v 3 ) ) ) | = 1 and | σ ( L ( T * ( v 2 ) ) | = 2 . As moreover ( T * , σ ) is least resolved and none of the vertices v 1 , v 2 , and v 3 is the root of T * , we can apply Corollary 1 in [20] to conclude that v 1 and v 2 are leaves, and that v 3 is an inner vertex, respectively. In particular, σ ( v 1 ) = r s = σ ( v 3 ) . Therefore, T * ( u ) is not a star tree and u has support leaves of both colors in T * ; a contradiction to its construction. Therefore, we conclude that G ( T * , σ ) is binary-explainable. □
Theorem 2.
The optimization version of2-BMG CBEGwith a 2-BMG ( G , σ ) as input has the unique solution F : = E ( G ( T * , σ ) ) \ E ( G ) , where ( T * , σ ) is the collapsed tree of the LRT ( T , σ ) of ( G , σ ) .
Proof. 
First note that the optimization version of 2-BMG CBEG always has a solution. To see this, consider the complete bipartite and properly 2-colored digraph ( G , σ ) with vertex set V ( G ) . This digraph is explained by the star tree with leaf set V ( G ) . Moreover, ( G , σ ) is clearly hourglass-free as hourglasses require non-arcs (between vertices of distinct colors). By Proposition 3, the BMG ( G , σ ) is binary-explainable.
Now, consider the collapsed tree ( T * , σ ) of ( T , σ ) . As T * is obtained from T by contraction of inner edges, Proposition 1 implies ( G , σ ) = ( T , σ ) ( T * , σ ) ( G * , σ ) . Furthermore, ( G * , σ ) is binary-explainable by Lemma 4. Therefore, ( G * , σ ) is a valid completion of ( G , σ ) to a beBMG.
We continue by showing the existence of certain arcs in every (not necessarily optimal) completion ( G , σ ) of ( G , σ ) to a beBMG. To this end, consider a T -maximal vertex u such that the subtree T ( u ) is not a star tree and u has support leaves S u of both colors in T. We will make frequent use of the fact that E ( G ) E ( G ) . We consider the following cases in order to show that all arcs between vertices x , y L ( T ( u ) ) with σ ( x ) σ ( y ) exist in ( G , σ ) :
(i)
x , y S u ,
(ii)
x L ( T ( u ) ) \ S u and y S u , and
(iii)
x , y L ( T ( u ) ) \ S u .
In Case (i), the leaves x and y are both children of u. Together with Corollary 3, this implies ( x , y ) , ( y , x ) E ( G ) E ( G ) .
In Case (ii), we can find a vertex x S u of color σ ( x ) as S u contains vertices of both colors. As in Case (i), we have ( x , y ) , ( y , x ) E ( G ) E ( G ) . As x L ( T ( u ) ) \ S u , we can conclude that v : = par T ( x ) T u by the definition of support leaves. Therefore, the inner vertex v is not the root of T and we can apply Cor. 1 in [20] to conclude that the subtree T ( v ) of the inner vertex v contains both colors. The latter together with Lemma 10 in [21] implies that there are arcs ( x , y ) , ( y , x ) E ( G ) E ( G ) with x , y L ( T ( v ) ) and σ ( x ) = σ ( x ) σ ( y ) = σ ( y ) . Note that x = x is possible. As x , x , y in L ( T ( v ) ) L ( T ( u ) ) , x , y L ( T ( u ) ) \ L ( T ( v ) ) and v T u , we can apply Lemma 1 to conclude that ( x , y ) , ( y , x ) , ( y , x ) E ( G ) E ( G ) and ( y , x ) , ( x , y ) , ( x , y ) E ( G ) E ( G ) . Together with ( x , y ) , ( y , x ) , ( x , y ) , ( y , x ) E ( G ) and the coloring, this implies that x , y , x , y induce an hourglass [ x y x y ] in ( G , σ ) . By Lemma 2, we have arcs ( x , y ) , ( y , x ) E ( G ) . If x = x , we immediately obtain ( x , y ) , ( y , x ) E ( G ) . Now, suppose x x , i.e., it remains to show that ( x , y ) E ( G ) . Thus assume, for contradiction, that ( x , y ) E ( G ) . Lemma 1 together with σ ( x ) σ ( y ) and y L ( T ( par T ( x ) = v ) ) implies that ( x , y ) E ( G ) E ( G ) . Therefore, we have the arcs ( x , y ) , ( y , x ) , ( x , y ) E ( G ) but ( x , y ) E ( G ) , i.e., x , x , y , y induce a forbidden F2-graph. Together with Proposition 4, this is a contradiction to ( G , σ ) being a 2-BMG. Therefore, we conclude that ( x , y ) E ( G ) .
In Case (iii), we have x , y L ( T ( u ) ) \ S u . We can find two vertices x , y S u , which are distinct from x and y, and satisfy σ ( x ) = σ ( x ) σ ( y ) = σ ( y ) . From Cases (i) and (ii), we obtain ( x , y ) , ( y , x ) E ( G ) and ( x , y ) , ( y , x ) , ( x , y ) , ( y , x ) E ( G ) , respectively. Now assume for contradiction that ( x , y ) E ( G ) . Thus, we have ( x , y ) , ( y , x ) , ( x , y ) E ( G ) and ( x , y ) E ( G ) , i.e., x , x , y , y induce a forbidden F2-graph in ( G , σ ) ; a contradiction to ( G , σ ) being a 2-BMG. Therefore, we conclude that ( x , y ) E ( G ) . The existence of the arc ( y , x ) E ( G ) can be shown by analogous arguments.
We will now show that E ( G * ) E ( G ) for every (not necessarily optimal) completion ( G , σ ) of the 2-BMG ( G , σ ) to a beBMG. To this end, consider an arbitrary arc ( x , y ) E ( G * ) . If ( x , y ) E ( G ) , then ( x , y ) E ( G ) follows immediately. Now, assume that ( x , y ) F = E ( G * ) \ E ( G ) . As ( G , σ ) is a 2-BMG and thus properly-colored and sink-free (cf. Proposition 4), there must be a vertex y of color σ ( y ) such that ( x , y ) E ( G ) . As ( x , y ) E ( G ) , we have lca T ( x , y ) T lca T ( x , y ) and thus the LRT ( T , σ ) displays the triple x y | y . However, ( x , y ) , ( x , y ) E ( G * ) implies that ( T * , σ ) does not display the triple x y | y , i.e., all edges on the path from lca T ( x , y ) to lca T ( x , y ) have been contracted. Therefore, there is a T -maximal inner vertex u V 0 ( T ) such that x , y L ( T ( u ) ) , T ( u ) is not a star tree and u has support leaves of both colors in T. By the arguments above, we can conclude that ( x , y ) E ( G ) .
In summary, F is a solution for 2-BMG CBEG with the 2-BMG ( G , σ ) (and some integer k | F | ) as input, and F F for every other solution F = E ( G ) \ E ( G ) . Therefore, we conclude that F is the unique optimal solution. □
As a direct consequence of Theorem 2, the fact that LRTs can be constructed in O ( | V | + | E | log 2 | V | ) (cf. [20]) and Lemma 3, we have
Corollary 5.
2-BMG CBEGwith a 2-BMG as input can be solved in O ( | V | + | E | log 2 | V | ) time.
We also immediately obtain a characterization of the LRTs of 2-beBMGs.
Corollary 6.
A 2-colored least resolved tree ( T , σ ) is the LRT of 2-beBMG if and only if it is a collapsed tree.

6. Concluding Remarks

Starting from the observation that the property of being least resolved is preserved under contraction of inner edges, we have obtained a characterization of the LRTs that explains 2-colored beBMGs. The construction of these “collapsed trees” corresponds to the completion of BMGs to beBMGs, resulting in a simple, polynomial-time algorithm for this problem. This result is primarily of theoretical interest.
In contrast to the 2-colored case, -BMG CBEG with a BMG as input and 3 in general does not have a unique optimal solution. In the example in Figure 2, the missing arcs ( a 2 , b 1 ) and ( b 2 , a 1 ) in the induced hourglass [ a 1 b 1 a 2 b 2 ] must be inserted. The resulting digraph is not a BMG. To obtain a beBMG, it suffices to insert in addition either the arc ( c , a 1 ) or the arc ( c , b 1 ) (cf. Proposition 3). We suspect, therefore, that -BMG CBEG does not admit an efficient solution in general. The solutions of 2-BMG CBEG problems for all 2-colored induced subgraphs that are not binary-explainable are nevertheless an appealing starting point for constructing heuristics for -BMG CBEG. We refer to the work in [17] for a detailed analysis of a class of approximation algorithms for BMG and beBMG modification.
The simple solution of 2-BMG CBEG begs the question whether other arc modification problems for beBMGs, in particular the corresponding deletion and editing problems, have a similar structure. This does not seem to be case however. Neither 2-BMG EBEG nor 2-BMG DBEG with a 2-BMG as input has a unique optimal solution. To see this, consider the 2-BMG consisting of the hourglass [ x y x y ] which is explained by the unique non-binary tree ( x , y , ( x , y ) ) (in Newick format, see also Figure 1A). Deletion of the arcs ( x , y ) or ( y , x ) results in a digraph that is explained by the binary trees ( y , ( x , ( x , y ) ) ) or ( x , ( y , ( x , y ) ) ) , respectively. We suspect that a BMG as input does not make these problems easier than the general case—the complexity of which remains an open question however.

Author Contributions

Conceptualization, D.S., M.G., M.H. and P.F.S.; formal analysis, D.S., M.G., M.H. and P.F.S.; methodology, D.S., M.G., M.H. and P.F.S.; writing—original draft, D.S., M.G., M.H. and P.F.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded in part by the German Research Foundation (DFG), the Austrian Federal Ministries BMK and BMDW and the Province of Upper Austria in the frame of the COMET Programme managed by FFG. We acknowledge support from Leipzig University for Open Access Publishing.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
BMGBest Match Graph
beBMGBinary-explainable Best Match Graph
LRTLeast resolved tree

References

  1. Geiß, M.; Chávez, E.; González Laffitte, M.; López Sánchez, A.; Stadler, B.M.R.; Valdivia, D.I.; Hellmuth, M.; Hernández Rosales, M.; Stadler, P.F. Best Match Graphs. J. Math. Biol. 2019, 78, 2015–2057. [Google Scholar] [CrossRef] [Green Version]
  2. Schaller, D.; Geiß, M.; Chávez, E.; González Laffitte, M.; López Sánchez, A.; Stadler, B.M.R.; Valdivia, D.I.; Hellmuth, M.; Hernández Rosales, M.; Stadler, P.F. Corrigendum to “Best Match Graphs”. J. Math. Biol. 2021, in press. [Google Scholar]
  3. Korchmaros, A. The Structure of 2-Colored Best Match Graphs. arXiv 2020, arXiv:2009.00447v3. [Google Scholar]
  4. Korchmaros, A. Circles and Paths in 2-Colored Best Match Graphs. arXiv 2020, arXiv:2006.04100v1. [Google Scholar]
  5. Cohn, H.; Pemantle, R.; Propp, J.G. Generating a random sink-free orientation in quadratic time. Electr. J. Comb. 2002, 9, R10. [Google Scholar] [CrossRef]
  6. Abrams, G.; Sklar, J.K. The Graph Menagerie: Abstract Algebra and the Mad Veterinarian. Math. Mag. 2010, 83, 168–179. [Google Scholar] [CrossRef]
  7. Das, S.; Ghosh, P.; Ghosh, S.; Sen, S. Oriented Bipartite Graphs and the Goldbach Graph. arXiv 2020, arXiv:1611.10259v6. [Google Scholar]
  8. Natanzon, A.; Shamir, R.; Sharan, R. Complexity Classification of Some Edge Modification Problems. Discr. Appl. Math. 2001, 113, 109–128. [Google Scholar] [CrossRef] [Green Version]
  9. Hellmuth, M.; Wieseke, N.; Lechner, M.; Lenhof, H.P.; Middendorf, M.; Stadler, P.F. Phylogenetics from Paralogs. Proc. Natl. Acad. Sci. USA 2015, 112, 2058–2063. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  10. Schaller, D.; Stadler, P.F.; Hellmuth, M. Complexity of Modification Problems for Best Match Graphs. Theor. Comp. Sci. 2021, 865, 63–84. [Google Scholar] [CrossRef]
  11. Maddison, W. Reconstructing character evolution on polytomous cladograms. Cladistics 1989, 5, 365–377. [Google Scholar] [CrossRef]
  12. DeSalle, R.; Absher, R.; Amato, G. Speciation and phylogenetic resolution. Trends Ecol. Evol. 1994, 9, 297–298. [Google Scholar] [CrossRef]
  13. Hoelzer, G.A.; Meinick, D.J. Patterns of speciation and limits to phylogenetic resolution. Trends Ecol. Evol. 1994, 9, 104–107. [Google Scholar] [CrossRef]
  14. Slowinski, J.B. Molecular Polytomies. Mol. Phylog. Evol. 2001, 19, 114–120. [Google Scholar] [CrossRef] [PubMed]
  15. Schaller, D.; Geiß, M.; Hellmuth, M.; Stadler, P.F. Best Match Graphs with Binary Trees. In Proceedings of the 8th International Conference on Algorithms for Computational Biology, Missoula, MO, USA, 8–11 November 2021; Lecture Notes in Computer Science; Springer Nature: Cham, Switzerland, 2021; Volume 12715, in press. [Google Scholar]
  16. Schaller, D.; Geiß, M.; Stadler, P.F.; Hellmuth, M. Complete Characterization of Incorrect Orthology Assignments in Best Match Graphs. J. Math. Biol. 2021, 82, 20. [Google Scholar] [CrossRef] [PubMed]
  17. Schaller, D.; Geiß, M.; Hellmuth, M.; Stadler, P.F. Heuristic Algorithms for Best Match Graph Editing. arXiv 2021, arXiv:2103.07280. [Google Scholar]
  18. Liu, Y.; Wang, J.; Guo, J.; Chen, J. Cograph Editing: Complexity and Parametrized Algorithms. In COCOON 2011; Fu, B., Du, D.Z., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6842, pp. 110–121. [Google Scholar] [CrossRef]
  19. Gao, Y.; Hare, D.R.; Nastos, J. The cluster deletion problem for cographs. Discret. Math. 2013, 313, 2763–2771. [Google Scholar] [CrossRef]
  20. Schaller, D.; Geiß, M.; Hellmuth, M.; Stadler, P.F. Least resolved trees for two-colored best match graphs. arXiv 2021, arXiv:2101.07000. [Google Scholar]
  21. Geiß, M.; Stadler, P.F.; Hellmuth, M. Reciprocal Best Match Graphs. J. Math. Biol. 2020, 80, 865–953. [Google Scholar] [CrossRef] [PubMed] [Green Version]
Figure 1. (A) An hourglass as the characteristic forbidden induced subgraph of beBMGs and its non-binary explaining tree. (B) The three classes of forbidden induced subgraphs of 2-colored BMGs (see Definition 6 below). The gray-dashed arcs may or may not exist.
Figure 1. (A) An hourglass as the characteristic forbidden induced subgraph of beBMGs and its non-binary explaining tree. (B) The three classes of forbidden induced subgraphs of 2-colored BMGs (see Definition 6 below). The gray-dashed arcs may or may not exist.
Algorithms 14 00110 g001
Figure 2. Example for 3-BMG CBEG with the 3-BMG ( G , σ ) (explained by the LRT ( T , σ ) ) as input that has no unique optimal solution. Insertion of the missing arcs ( a 2 , b 1 ) and ( b 2 , a 1 ) produces a digraph that is not a BMG. At least one of the arcs ( c , a 1 ) or ( c , b 1 ) has to be inserted additionally to obtain the beBMGs ( G 1 , σ ) and ( G 2 , σ ) (shown with their LRTs ( T 1 , σ ) and ( T 2 , σ ) ), respectively.
Figure 2. Example for 3-BMG CBEG with the 3-BMG ( G , σ ) (explained by the LRT ( T , σ ) ) as input that has no unique optimal solution. Insertion of the missing arcs ( a 2 , b 1 ) and ( b 2 , a 1 ) produces a digraph that is not a BMG. At least one of the arcs ( c , a 1 ) or ( c , b 1 ) has to be inserted additionally to obtain the beBMGs ( G 1 , σ ) and ( G 2 , σ ) (shown with their LRTs ( T 1 , σ ) and ( T 2 , σ ) ), respectively.
Algorithms 14 00110 g002
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Schaller, D.; Geiß, M.; Hellmuth, M.; Stadler, P.F. Arc-Completion of 2-Colored Best Match Graphs to Binary-Explainable Best Match Graphs. Algorithms 2021, 14, 110. https://0-doi-org.brum.beds.ac.uk/10.3390/a14040110

AMA Style

Schaller D, Geiß M, Hellmuth M, Stadler PF. Arc-Completion of 2-Colored Best Match Graphs to Binary-Explainable Best Match Graphs. Algorithms. 2021; 14(4):110. https://0-doi-org.brum.beds.ac.uk/10.3390/a14040110

Chicago/Turabian Style

Schaller, David, Manuela Geiß, Marc Hellmuth, and Peter F. Stadler. 2021. "Arc-Completion of 2-Colored Best Match Graphs to Binary-Explainable Best Match Graphs" Algorithms 14, no. 4: 110. https://0-doi-org.brum.beds.ac.uk/10.3390/a14040110

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop