Complete Characterization of Incorrect Orthology Assignments in Best Match Graphs

Genome-scale orthology assignments are usually based on reciprocal best matches. In the absence of horizontal gene transfer (HGT), every pair of orthologs forms a reciprocal best match. Incorrect orthology assignments therefore are always false positives in the reciprocal best match graph. We consider duplication/loss scenarios and characterize unambiguous false-positive (u-fp) orthology assignments, that is, edges in the best match graphs (BMGs) that cannot correspond to orthologs for any gene tree that explains the BMG. Moreover, we provide a polynomial-time algorithm to identify all u-fp orthology assignments in a BMG. Simulations show that at least \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$75\%$$\end{document}75% of all incorrect orthology assignments can be detected in this manner. All results rely only on the structure of the BMGs and not on any a priori knowledge about underlying gene or species trees.


Introduction
Orthology is one of the key concepts in evolutionary biology: Two genes are orthologs if their last common ancestor was a speciation event Fitch (1970). Distinguishing orthologs from paralogs (originating from gene duplications) or xenologs (i.e., genes that have undergone horizontal gene transfer) is of considerable practical importance for functional genome annotation and thus for a wide array of methods in bioinformatics and computational biology that rely on gene annotation data. In particular, B Marc Hellmuth mhellmuth@mailbox.org Extended author information available on the last page of the article according to the "ortholog conjecture", orthologous genes in different species are expected to have essentially the same biological and molecular functions, whereas paralogs and xenologs tend to have similar, but distinct functions. Albeit controversial Nehrt et al. (2011), Stamboulian et al. (2020), this assumption is widely made in the computational prediction of gene functions Nehrt et al. (2011), Gabaldón and Koonin (2013), Soria et al. (2014), Zallot et al. (2016). Moreover, the distinction of orthologs and paralogs is crucial in phylogenomics Delsuc et al. (2005). Most of the commonly used tools for large-scale orthology identification compute reciprocal best hits as a first step followed by some filtering and refinement steps to improve the results Tatusov et al. (2000), Roth et al. (2008), Lechner et al. (2011), Linard et al. (2011), Sonnhammer and Östlund (2015), Train et al. (2017), Huerta-Cepas et al. (2018), see also Nichio et al. (2017), Setubal and Stadler (2018), Galperin et al. (2019) for reviews and Altenhoff et al. (2016) for benchmarking results.
Orthology identification has also received increasing attention from a mathematical perspective starting from the concept of an evolutionary scenario comprising a gene tree T and a species tree S together with a reconciliation map μ from T to S. The map μ identifies the locations in the species tree at which evolutionary events, represented by the vertices of the gene tree, took place. In this contribution, we consider exclusively duplication/loss scenarios, i.e., we explicitly exclude horizontal gene transfer. Characterizations of reconciliation maps are given e.g. in Górecki and Tiuryn (2006), Vernot et al. (2008), Doyon et al. (2011), Rusin et al. (2014). While every gene tree can be reconciled with any species tree Guigó et al. (1996), Page and Charleston (1997), this is no longer true if event-labels are prescribed in the gene tree T Hernandez- Rosales et al. (2012), , Hellmuth (2017).
The orthology relation itself has been characterized as a cograph (i.e., graphs that do not contain induced paths P 4 on four vertices) by Hellmuth et al. (2013) based on earlier work by Böcker and Dress (1998). This line of research has led to the idea of editing reciprocal best hit data to conform to the required cograph structure Hellmuth et al. (2015). There are, however, two distinct sources of errors in an orthology assignment pipeline based on best matches: (i) inaccuracies in the assignment of best matches from sequence similarity data Stadler et al. (2020), and (ii) limits in the reconstruction of the "true" orthology relation from best match graphs Geiß et al. (2020b).
We consider best matches as an evolutionary concept: A gene y in species s is a best match of a gene x from species r = s if s contains no gene y that is more closely related to x. That is, best matches capture the idea of phylogenetically most closely related genes. Maybe surprisingly, the combinatorial structure of best matches has become a focus only very recently Geiß et al. (2019). Best match graphs (BMGs) have several appealing properties: They have several alternative characterizations providing polynomial-time recognition algorithms Geiß et al. (2020a), Schaller et al. (2020) and they are "explained" by a unique least resolved tree Geiß et al. (2019). These properties will be introduced formally in the next section and play an important role in our discussion. The reciprocal best match graphs (RBMGs) are the symmetric parts of BMGs and conceptually correspond to the reciprocal best hits used in orthology Fig. 1 An evolutionary scenario (left) consists of a gene tree (T , σ ) (whose observable part is shown in the second panel) together with an embedding into a species tree S. The coloring σ of the leaves of T represents the species in which the genes reside. Speciation vertices ( ) of the gene tree coincide with the vertices of the species tree, whereas gene duplications ( ) are mapped to the edges of S. The reciprocal best match graph (RBMG) (G, σ ) on the right corresponds to the undirected graph underlying the symmetric part of the best match graph (BMG) ( G, σ ) (third panel)

Fig. 2
Two scenarios (1st and 2nd panel to the left) for the evolution of a gene family embedded into a species tree (shown in gray), where represents speciation and duplication events. The second scenario is the simplest example for a complementary gene loss that is not witnessed by any other species. In particular, the two different true histories result in the same topology T of the true (loss-free) gene tree, and thus explain the same BMG ( G, σ ). However, only for the leftmost scenario the edge xy in ( G, σ ) describes correct orthologs detection. In contrast to BMGs, RBMGs are much more difficult to handle and are not associated with unique trees Geiß et al. (2020c). An example for an evolutionary scenario with corresponding BMG and RBMG is given Fig. 1.
In this contribution, we are only concerned with the second source of errors, i.e., with the limits in the reconstruction of the true orthology relation from best matches. We therefore assume throughout that a "correct" BMG (cf. Def. 2) is given. We do not assume, however, that we have any a priori knowledge about the underlying gene or species tree. The problem we aim to solve is to determine the orthology relation that is best supported by the given BMG.
Of course, the true orthology relation is not known. Nevertheless, we start our mathematical analysis with the following definition: A pair of genes x and y that are not true orthologs but reciprocal best matches are false-positive orthologs. If they are orthologs but not reciprocal best matches, they are false-negative orthologs. Geiß et al. (2020b) showed that, for evolutionary scenarios that involve only speciations, gene duplications, and gene losses, there are no false-negative orthology assignments (see also Thm. 2 below). Our task therefore reduces to understanding the false-positive orthology assignments. Being a false positive is a property of the edge x y in an RBMG, and equivalently of the symmetric pair (x, y) and (y, x) in the BMG. Here, we aim to identify false-positive edges from the structure of the BMG itself.
We first note that false positives cannot be avoided altogether, i.e., not all false positives can be identified from a BMG alone. The simplest example, Fig. 2 (second scenario), comprises a gene duplication and a subsequent speciation and complementary gene losses in the descendant lineages such that each paralog survives only in one of them. In this situation, x y is a reciprocal best match. If there are no other descendants that harbor genes witnessing the duplication event, then the framework of best matches provides no information to recognize x y as a false-positive assignment.
On the other hand, RBMGs and thus BMGs contain at least some information on false positives. Since the orthology relation forms a cograph but RBMGs are not cographs in general Geiß et al. (2020c), incorrect orthology assignments are associated with induced P 4 s, the forbidden subgraphs that characterize cographs. P 4 s arise for instance as a consequence of the complete loss of different paralogous groups in disjoint lineages. Dessimoz et al. (2006) noted that such false-positive orthology assignments can be identified under certain circumstances, in particular, if there is some species in which both paralogs have survived. The corresponding motif in BMGs, the "good quartets", was investigated in some detail by Geiß et al. (2020c). The removal of such false-positive orthologs already leads to a substantial improvement of the orthology assignments in simulated data Geiß et al. (2020b). Here, we extend the results of Geiß et al. (2020b) to a complete characterization of false-positive orthology assignments for a given BMG.
Good quartets cannot be defined on RBMGs because information on non-reciprocal best matches is also needed explicitly. This suggests to consider BMGs rather than RBMGs as the first step in graph-based orthology detection methods. In practice, best matches are approximated by sequence similarity and thus are subject to noise and biases Stadler et al. (2020). The empirically determined best match relation thus will usually need to be corrected to conform to the formal definition (cf. Def. 2 below) of BMGs. This naturally leads to a graph editing problem that was recently shown to be NP-complete Schaller et al. (2020), Hellmuth et al. (2020b).
Sec. 2 establishes the notation and summarizes properties of BMGs that are needed throughout this contribution. Sec. 3 formalizes the notion of unambiguous falsepositive (u-fp) edges, i.e., reciprocal best matches that cannot be orthologs w.r.t. to any gene tree explaining the BMG. Sec. 4 contains the main mathematical contributions of this work: 1. We provide a full characterization of unambiguous false-positive orthology assignments in BMGs. 2. We provide a polynomial-time algorithm to determine all unambiguous falsepositive orthology assignments in BMGs.
In Sec. 5, we complement the mathematical results with a computational analysis of simulated scenarios and observe that at least three quarters of all false positives fall into this class. The remaining cases are not recognizable from best matches alone and correspond to complementary losses without surviving witnesses, i.e., cases that cannot be corrected without additional knowledge on the gene tree and/or the species tree.
Since the material is extensive and very technical, we subdivide our presentation into a main narrative part (Secs. 1-6) and a technical part (Secs. A-D) that contains all proofs and additional material in full detail. Together with the definitions and preliminaries in Sec. 2, the technical part is self-contained. Definitions and results appearing in the narrative part are therefore restated. The order of the material in the two parts is slightly different.

Graphs and trees
We consider finite, directed graphs G = (V , E), for brevity just called graphs throughout, with arc set E ⊆ V × V \{ (v, v) | v ∈ V }. We say that x y is an edge in G if and only if both (x, y) ∈ E( G) and (y, x) ∈ E( G). If all arcs of G in a graph form edges, we call G undirected. , if for all u, v ∈ W it holds that (u, v) ∈ E implies (u, v) ∈ F. In addition, we consider vertexcolored graphs ( G, σ ) with vertex-coloring σ : V → M into some set M of colors. A vertex-coloring is called proper if σ (x) = σ (y) for every arc (x, y) in G. We write σ (W ) = {σ (w) | w ∈ W } for subsets W ⊆ V and σ |W to denote the restriction of the map σ to W ⊆ V . In particular, ( G[W ], σ |W ) is an induced vertex-colored subgraph of ( G, σ ).
A path (of length ) in a directed graph G or an undirected graph G is a subgraph induced by a nonempty sequence of pairwise distinct vertices P(x 0 , x ) := (x 0 , x 1 , . . . , x ) such that (x i , x i+1 ) ∈ E( G) or x i x i+1 ∈ E(G), resp., for 0 ≤ i ≤ −1. We use the notation P(x 0 , x ) both for the sequence of vertices and the subgraph they induce.
All trees T = (V , E) considered here are undirected, planted and phylogenetic, that is, they satisfy (i) the root 0 T has degree 1 and (ii) all inner vertices have degree deg T (u) ≥ 3. We write L(T ) for the leaves (not including 0 T ) and V 0 = V (T )\(L(T ) ∪ {0 T }) for the inner vertices (also not including 0 T ). To avoid trivial cases, we will always assume |L(T )| ≥ 2. An edge uv in T is an inner edge if u, v ∈ V 0 (T ) are inner vertices. The conventional root ρ T of T is the unique neighbor of 0 T . The main reason for using planted phylogenetic trees instead of modeling phylogenetic trees simply as rooted trees, which is the much more common practice in the field, is that we will often need to refer to the time before the first branching event, i.e., the edge 0 T ρ T .
We define the ancestor order on a given tree T as follows: if y is a vertex of the unique path connecting x with the root 0 T , we write x T y, in which case y is called an ancestor of x and x is called a descendant of y. We use x ≺ T y for x T y and x = y. If x T y or y T x the vertices x and y are comparable and, otherwise, incomparable. If x y is an edge in T , such that y ≺ T x, then x is the parent of y and y the child of x. We denote by child T (x) the set of all children of x. It will be convenient for the discussion below to extend the ancestor relation T to the union of the edge and vertex sets of T . More precisely, for a vertex x ∈ V (T ) and an edge e = uv ∈ E(T ) with v ≺ T u we write x ≺ T e if and only if x T v and e ≺ T x if and only if u T x. For edges e = uv with v ≺ T u and f = ab with b ≺ T a in T we put e T

f if and only if v T b.
For a non-empty subset A ⊆ V ∪ E, we define lca T (A), the last common ancestor of A, to be the unique T -minimal vertex of T that is an ancestor of every vertex or edge in A. For simplicity we drop the brackets and write lca T (x 1 , . . . , x k ) := lca T ({x 1 , . . . , x k }) whenever we specify a set of vertices or edges explicitly.
It is well-known that C(T ) uniquely determines T Semple and Steel (2003). We say that a tree T is a refinement of some tree T if C(T ) ⊆ C(T ). A tree T is displayed by a tree T , in symbols T ≤ T , if T can be obtained from a subtree of T by contraction of edges Semple (2003), where the contraction of an edge e = uv in a tree T = (V , E) refers to the removal of e and identification of u and v. It is easy to verify that every refinement T of T also displays T . However, the converse is not always true since L(T ) L(T ) and thus, C(T ) C(T ) may be possible.

(Reciprocal) best matches
We consider a pair T = (V , E) and S = (W , F) of planted phylogenetic trees together with a map σ : L(T ) → L(S). We interpret T as a gene tree and S as a species tree; the map σ describes, for each gene x ∈ L(T ), in the genome of which species σ (x) ∈ L(S) it resides. W.l.o.g. we assume that the "gene-species-association" σ is a surjective map to avoid trivial cases. Since σ can be viewed as a coloring of the leaves of T , we call (T , σ ) a leaf-colored tree. For s ∈ L(S) we write L[s] := {x ∈ L(T )|σ (x) = s}.
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(x, y) T lca(x, y ) holds for all leaves y from species σ (y ) = σ (y). The leaves x, y ∈ L(T ) are reciprocal best matches if y is a best match for x and x is a best match for y.
Neither best matches nor reciprocal best matches are unique. That is, a gene x may have two or more (reciprocal) best matches of the same color r = σ (x). Some orthology detection tools, such as ProteinOrtho Lechner et al. (2011), explicitly attempt to extract all reciprocal best matches from the sequence data. Moreover, neither of the two relations is transitive. These two properties are at odds e.g. with the clusters of orthologous groups (COGs) concept (cf. Tatusov et al. 1997Tatusov et al. , 2000Roth et al. 2008), which at least conceptually presupposes unique reciprocal best matches.
The graph G(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 known as the (colored) best match graph of (T , σ ) Geiß et al. (2019). The symmetric part G(T , σ ) of G(T , σ ) obtained by retaining the edges of G(T , σ ) is the (colored) reciprocal best match graph Geiß et al. (2020c).
Definition 2 An arbitrary vertex-colored graph ( 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, σ ). An arbitrary undirected vertex-colored graph (G, σ ) is a reciprocal best match graph (RBMG) if it is the symmetric part of a BMG ( G, σ ).
For the symmetric part of the BMG ( G, σ ), i.e., the RBMG (G, σ ), we have x y ∈ E(G) if and only if x and y are reciprocal best matches in (T , σ ). In this sense, (T , σ ) also explains (G, σ ). We note, furthermore, that RBMGs are not associated with a unique least resolved tree Geiß et al. (2020c).

Reconciliation maps, event-labeling, and orthology relations
An evolutionary scenario extends the map σ : L(T ) → L(S) to an embedding of the gene tree into the species tree. It (implicitly) describes different types of evolutionary events: speciations, gene duplications, and gene losses. In this contribution we do not consider other types of events such as horizontal gene transfer. Gene losses do not appear explicitly since L(T ) only contains extant genes. Inner vertices in the gene tree T that designate speciations have their correspondence in inner vertices of the species tree. In contrast, gene duplications occur independently of speciations and thus belong to edges of the species tree. The embedding of T into S is formalized by Definition 3 (Reconciliation Map) Let S = (W , F) and T = (V , E) be two planted phylogenetic trees and let σ : Several alternative definitions of reconciliation maps for duplication/loss scenarios have been proposed in the literature, many of which have been shown to be equivalent. This type of reconciliation map has been established in Geiß et al. (2020b). Moreover, it has been shown in Geiß et al. (2020b) that the axiom set used here is equivalent to axioms that are commonly used in the literature, see e.g. Górecki and Tiuryn (2006), Vernot et al. (2008), Doyon et al. (2011), Rusin et al. (2014), Hellmuth (2017, Nøjgaard et al. (2018), and the references therein. Without any further constraints, Def. 3 gives rise to a well-known result: Lemma 1 (Geiß et al. 2020b, Lemma 3) For every tree (T , σ ) there is a reconciliation map μ to any species tree S with leaf set L(S) = σ (L(T )).
The reconciliation map μ from (T , σ ) to S determines the types of evolutionary events in T . This can be formalized by associating an event labeling with the vertices of T . We use the notation introduced in Geiß et al. (2020b): Definition 4 Given a reconciliation map μ from (T , σ ) to S, the event labeling on T (determined by μ) is the map t μ : V (T ) → { , , , } given by: The following result is a simple but useful consequence of combining the axioms of the reconciliation map with the event labeling of Def. 4.
Lemma 2 suggests to define event-labeled trees as trees (T , t) endowed with a map t : V (T ) → { , , , } such that t(0 T ) = and t(u) = for all u ∈ L(T ). In Geiß et al. (2020b), Lemma 2 also served as a motivation for An example of an extremal event labeling is shown in Fig. 9 (rightmost tree). The extremal event labeling is closely related to the concept of apparent duplication (AD) vertices often found in the literature (e.g. Swenson et al. 2012;. For a (binary) gene tree T and a reconciliation of T with a species tree S, a duplication vertex of T is an AD vertex if its two subtrees have at least one color in common. In contrast, it is a non-apparent duplication (NAD) vertex if the color sets of its subtrees are disjoint. This notion is useful for a variety of parsimony problems that usually aim to avoid or minimize the number of NAD vertices Swenson et al. (2012), . However, the extremal event labeling t T is completely defined by (T , σ ). That is, in contrast to both the event labeling in Def. 4 and the concept of AD and NAD vertices, t T does not depend on a specific reconciliation map. On the other hand, there is no guarantee that there always exists a reconciliation map μ from (T , σ ) to some species tree S such that t μ = t T , cf. (Geiß et al. 2020b, Fig. 2) and Fig. 9 in Sec. 4.2 for counterexamples. Nevertheless, we shall see below that the extremal labeling is a key step towards identifying false-positive orthology assignments. The event labeling on T defines the orthology graph.

Definition 6
The orthology graph (T , t) of an event-labeled tree (T , t) has vertex set L(T ) and edges uv ∈ E( ) if and only if t(lca(u, v)) = .
The orthology graph is often referred to as the orthology relation. Orthology graphs coincide with a well-known graph class: Theorem 1 (Hellmuth et al. 2013, Cor. 4

) A graph G is an orthology graph for some event-labeled tree (T , t), i.e. G = (T , t), if and only if G is a cograph.
One of many equivalent characterizations of cographs identifies them with the graphs that do not contain an induced path P 4 on four vertices Corneil et al. (1981). The orthology graph is a subgraph of the RBMG (and thus also of the BMG) for any given reconciliation map connecting a gene with a species tree.
Theorem 2 (Geiß et al. 2020b, Lemma 4 & 5) Let (T , σ ) be a leaf-colored tree and μ a reconciliation map from (T , σ ) to some species tree S. Then (T , t μ In particular, t μ (v) = implies t T (v) = for any reconciliation map. By contraposition, therefore, if t T (v) = then t μ (v) = for all possible reconciliation maps μ from (T , σ ) to any species tree S. A crucial implication of Thm. 2 is that edges in a BMG G(T , σ ) always correspond to either correct orthologous pairs of genes or false-positive orthology assignments. Hence, G(T , σ ) never contains false-negative orthology assignments.

False-positive orthology assignments
As discussed in the introduction, we are not concerned here with the errors that arise in the reconstruction of best matches from sequence similarity data. We therefore assume that we are given a BMG ( G, σ ) as specified in Def. 2. More precisely, we assume that ( G, σ ) derives from a duplication/loss scenario that is unknown to us. Denote by ( T , t, σ ) the corresponding true leaf-colored and event-labeled gene tree. An edge x y of ( G, σ ), or equivalently of the corresponding RBMG (G, σ ), is a false-positive orthology assignment if x y ∈ E(G) but x y / ∈ E( ( T , t)). By Thm. 2, (G, σ ) cannot contain false-negative orthology assignments, i.e., there is no x y ∈ E( ( T , t)) with x y / ∈ E(G). We assume no additional information about the gene tree or the species tree, i.e., the only data about the evolutionary scenario that is available to us is the BMG ( G, σ ).
In order to study false-positive orthology assignments, we first consider a tree (T , σ ) that explains the BMG ( G, σ ). We neither make the assumption that (T , σ ) is least resolved nor that (T , σ ) reflects the true history, i.e., that (T , σ ) is related to the true gene tree ( T , σ ).
An edge x y in G is called (T , σ )-false-positive, or (T , σ )-fp for short, if for every reconciliation map μ from (T , σ ) to any species tree S we have t μ (lca T (x, y)) = , i.e., μ(lca T (x, y)) ∈ E(S), In other words, x y is called (T , σ )-fp whenever x and y cannot be orthologous w.r.t. any possible reconciliation μ from (T , σ ) to any species tree. Interestingly, (T , σ )-fps can be identified without considering reconciliation maps explicitly. Fig. 3 The BMG ( G, σ ) shown on the right is explained by both (T 1 , σ ), which is the unique least resolved tree for ( G, σ ), and (T 2 , σ ). The vertices labeled must be duplications due to Lemma 2, whereas the vertices labeled "?" could be both duplications or speciations. The edges xz, x z and yz are (T 1 , σ )-fp but not (T 2 , σ )-fp (cf. Lemma 10). Thus, neither of the edges xz, x z and yz is u-fp Lemma 10 Let ( G, σ ) be a BMG, x y be an edge in G and (T , σ ) be a tree that explains ( G, σ ). Then, the following statements are equivalent: For the extremal labeling t T of (T , σ ) it holds that t T (lca T (x, y)) = .
Lemma 10 implies that (T , σ )-fp can be verified in polynomial time for any given gene tree (T , σ ). By contraposition of Lemma 2, inner vertices with two distinct children v 1 and v 2 satisfying σ (L(T (v 1 )))∩σ (L(T (v 2 ))) = ∅ are duplication vertices for every possible reconciliation map to every possible species tree. Therefore, the property of being an AD vertex only depends on (T , σ ). In particular, (T , σ )-fp edges coincide with the edges x y in ( G, σ ) for which lca T (x, y) is an AD vertex.
As shown in Fig. 3, there are trees (T 1 , σ ) and (T 2 , σ ) that explain the same BMG for which, however, the edges xz, x z, and yz are (T 1 , σ )-fp but not (T 2 , σ )-fp. Since we assume that no information on (T , σ ) is available a priori, it is natural to consider the set of edges that are false positives for all trees explaining a given BMG.
Hence, if an edge x y in G is u-fp, then it is in particular (T , σ )-fp in the true history that explains ( G, σ ). Thus, u-fp edges are always correctly identified as false positives. Not all "correct" false-positive edges are u-fp, however. It is possible that, for an edge x y in G, we have t μ (lca T (x, y)) = for the true gene tree and the true species tree, but x y is not (T , σ )-fp for some gene tree (T , σ ) possibly different from (T , σ ). One of the simplest examples is shown in Fig. 2, assuming that ( G, σ ) is the "true" BMG. Since t μ (lca T (x, y)) = may be possible (Fig. 2, leftmost scenario, the edge x y is not ( T , σ )-fp and therefore not u-fp.

Characterization of u-fp edges
In order to adapt the concept of AD vertices for our purposes, we introduce the color-intersection S ∩ associated with a gene tree (T , σ ). For a pair of distinct leaves x, y ∈ L(T ) we denote by v x , v y ∈ child T (lca T (x, y)) the unique children of the last common ancestor of x and y for which x T v x and y T v y . That is, T (v x ) and T (v y ) are the subtrees of T rooted in the children of lca T (x, y) with x ∈ L(T (v x )) and y ∈ L(T (v y )). The set contains the colors, i.e. species, that are common to both subtrees. The existence of common colors, S ∩ T (x, y) = ∅, determines whether or not the inner vertex lca T (x, y) is AD. Lemma 11 (Sec. B.2) shows that the color-intersection S ∩ T (x, y) of an edge in a BMG ( G, σ ) is independent of the corresponding tree. Hence, it suffices to consider the color-intersection for the unique least resolved tree (T * , σ ) explaining ( G, σ ). From here on, we drop the explicit reference to the tree and simply write S ∩ (x, y); see also Remark 1 in Sec. B.2. The color-intersection provides a sufficient condition for u-fp edges in a BMG.

Prop. 1 and Cor. 3 Every edge x y in a BMG
for every tree (T , σ ) that explains ( G, σ ), and thus u-fp.
As we shall see below, the converse of Prop. 1 and Cor. 3 is not true in general. It does hold for the special case of binary trees, however: Theorem 4 Let ( G, σ ) be a BMG that is explained by a binary tree (T , σ ). Then, for every edge x y in ( G, σ ), the following three statements are equivalent: Prop. 8 in Sec. 4.3 provides a characterization of BMGs that can be explained by binary trees; a property that can be tested in polynomial time (cf. Cor. 6). However, not every BMG can be explained by a binary tree as shown by the simple example in Fig. 6(A). This BMG can only be explained by the unique non-binary tree as shown in Fig. 6(B).
Since every orthology graph is a cograph (Thm. 1) and thus free of induced P 4 s, every induced P 4 in the RBMG necessarily contains a false-positive orthology assignments. The subgraphs of the BMG spanned by a P 4 in its symmetric part (i.e., the RBMG) are known as quartets. The quartets on three colors of a BMG ( G, σ ) fall into three distinct classes depending on the coloring and the additional, non-symmetric edges (cf. , Lemma 32)). We write abcd or, equivalently, dcba for an induced P 4 with edges ab, bc, and cd. Fig. 4 The three types of quartets in BMGs. Ugly quartets may or may not contain either of the two (dashed) arcs between x and y, and y and z, respectively. Bold edges highlight the middle and first edges of the respective quartets as specified in Def. 12 Definition 12 (Good, bad, and ugly quartets) Let ( G, σ ) be a BMG with symmetric part (G, σ ) and vertex set L, and let Q : The edge x y in a good quartet zx yz is its middle edge. The edge zx of an ugly quartet zxz y or a bad quartet zx yz is called its first edge. First edges in ugly quartets are uniquely determined due to the colors. In bad quartets, this is not the case and therefore, the edge yz in zx yz is a first edge as well.
The three different types of quartets are shown in Fig. 4. RBMGs never contain induced P 4 s on two colors (Geiß et al. 2020c, Obs. 5). This, in particular, implies that for the induced P 4 s in Def. 12 the colors r , s, and t must be pairwise distinct. Note that (R)BMGs may also contain induced P 4 s on four colors. These are investigated in some more detail in Secs. 4.3 and D.3. Good quartets are characteristic of a complementary gene loss (as shown in Fig. 2) that is "witnessed" by a third species in which both child branches of the problematic duplication event survive. That is, good quartets appear if there is a pair of genes z and z with σ (z) = σ (z ) and lca(z, z ) = lca(x, y) in the true gene tree. We remark that previous work also noted that complementary gene loss can be resolved successfully under certain circumstances Dessimoz et al. (2006) such as this one. An in-depth analysis of quartets shows that they can be used to identify many of the u-fp edges. We collect here the main results of Sec. B.3:

Prop. 2, 3 and 4 Let Q = x yzw be a quartet in a BMG ( G, σ ).
(i) If Q is good, then its middle edge yz is u-fp.
(ii) If Q is ugly, then its first edge x y and its middle edge yz are u-fp. (iii) If Q is bad, then its first edges x y and zw are u-fp.
Not surprisingly, quartets are intimately linked to color-intersections: Example for a (T , σ )-fp edge xy in ( G, σ ) which is not the middle edge of a good quartet, but the first edge in an ugly quartet (right). Note, ( G, σ ) does not contain bad quartets Corollary 4 Let ( G, σ ) be a BMG that contains the edge x y. Then, S ∩ (x, y) = ∅ implies that x y is either the middle edge of some good quartet or the first edge of some ugly quartet, which in turn implies that x y is u-fp.
All u-fp edges x y with S ∩ (x, y) = ∅ in ( G, σ ) are therefore completely determined by the middle edges of good quartets and the first edges of ugly quartets. In particular, not all such edges are the middle edge of a good quartet as the example in Fig. 5 shows. Therein, the edge x y must be u-fp since S ∩ (x, y) = {σ (z)} = ∅ (cf. Prop. 1). The only good quartet is zx yz identifying x y as u-fp. Moreover, ( G, σ ) does not contain any bad quartet. The edge x y, on the other hand, is the first edge of the ugly quartet x yx z .
Furthermore, if an edge x y is the middle edge of a good quartet, then S ∩ (x, y) = ∅. Therefore, only ugly quartets may provide additional information about u-fp edges that are not identified with the help of the color-intersection S ∩ (see Fig. 14 in Sec. B.3 for an example). Ugly quartets, however, do not convey all the missing information on u-fp edges. The edge x y in the BMG shown in Fig. 6(A) is u-fp, but it is not contained in a good, bad, or ugly quartet.
In order to characterize the u-fp edges that are not identified by quartets, we first introduce an additional motif that may occur in vertex-colored graphs.
Definition 13 (Hourglass) An hourglass in a proper vertex-colored graph ( G, σ ), denoted by [x y x y ], is a subgraph ( G[Q], σ |Q ) induced by a set of four pair- Note that Condition (i) rules out arcs between x, x and y, y , respectively, i.e., the only arcs in an hourglass are the ones specified by Conditions (ii) and (iii). An example is shown in Fig. 6(A). Fig. 6(B).

Observation 5 Every hourglass is a BMG since it can be explained by a tree as shown in
Hourglasses are not necessarily part of an induced P 4 . In particular, an hourglass does not contain an induced P 4 (see Fig. 6(A)).
Hourglasses [x y x y ] can be used to identify false-positive edges x y with S ∩ (x, y) = ∅. More precisely, we have Edges of the form x i y j ∈ E(G) are only shown for x 1 , the others are omitted. An hourglass chain H is a subgraph but not necessarily induced and thus additional arcs may exist. In particular, the elements e ∈ {x 1 y k , zy k , x 1 z , zz } are not necessarily edges in an hourglass chain. However, whenever they exist, they are u-fp (cf. Lemma 17). Moreover, each single hourglass in H is an induced subgraph of the BMG; by definition, therefore, there are no arcs (z, x 1 ) or (z , y k ). Note, σ (z) = σ (z ) is possible. D: Visualization of Lemmas 15 and 16 Proposition 6 If a BMG ( G, σ ) contains an hourglass [x y x y ], then the edge x y is u-fp.
Prop. 6 implies that there are u-fp edges that are not contained in a quartet, see Fig. 6(A). In this example, we have S ∩ (x, y) = ∅ and no induced P 4 . However, as shown in Fig. 6(B), the subtree T (v 2 ) contains both colors σ (x) and σ (y) and thus, "bridges" the color sets of the subtrees T (v 1 ) and T (v 3 ). Similarly, in the tree (T , σ ) in Fig. 6(D), each subtree T (v i ), 1 ≤ i ≤ k "bridges" the color sets of the subtrees T (v i−1 ) and T (v i+1 ). This observation suggests the concept of hourglass chains, a generalization of hourglasses.

Definition 14 (Hourglass chain) An hourglass chain H in a graph
such that the following two conditions are satisfied for all i ∈ {1, . . . , k − 1}: (H1) y i = x i+1 and y i = x i+1 , and (H2) x i y j is an edge in G for all j ∈ {i + 1, . . . , k} A vertex z is called a left (resp., right) tail of the hourglass chain H if it holds that (z, x 1 ) ∈ E( G) and (z, x 1 ) / ∈ E( G) (resp., (z, y k ) ∈ E( G) and (z, y k ) / ∈ E( G)). We call H tailed if it has a left or right tail.
In contrast to the quartets and the hourglass, an hourglass chain in ( G, σ ) is not necessarily an induced subgraph. Hourglass chains are "overlapping" hourglasses.
The additional condition that x i y j ∈ E(G) for all 1 ≤ i < j ≤ k ensures that the two pairs x k , y k and x l , y l with k = l cannot lie in the same subtree below the last common ancestor u which is common to all hourglasses in the chain (cf. Lemma 15 and 16 in Sec. B.4).

Definition 16
An edge x y in a vertex-colored graph ( G, σ ) is a hug-edge if it satisfies at least one of the following conditions: (C1) x y is the middle edge of a good quartet in ( G, σ ); (C2) x y is the first edge of an ugly quartet in ( G, σ ); or (C3) there is an hourglass chain H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] in ( G, σ ), and one of the following cases holds: 1. x 1 = x and y k = y; 2. y k = y and z := x is a left tail of H; 3. x 1 = x and z := y is a right tail of H; or 4. z := x is a left tail and z := y is a right tail of H.
The term hug-edge refers to the fact that x y is a particular edge of an hourglass-chain, an ugly quartet, or a good quartet. In Sec. C.4, we show that hug-edges coincide with the u-fp edges.

Theorem 11 An edge x y in a BMG ( G, σ ) is u-fp if and only if x y is a hug-edge of ( G, σ ).
Interestingly, bad quartets turn out to be redundant for the identification of u-fp edges in the sense that every u-fp edge in a bad quartet appears as a u-fp edge in a good quartet, an ugly quartet, or an hourglass chain. At present, we do not know whether hourglass chains in a colored graph ( G, σ ) can be found efficiently. We shall see in the following section, however, that the identification of u-fp edges does not require the explicit enumeration of hourglass chains.
The fact that all hug-edges are u-fp by Thm. 11 suggests to consider the subgraph of a BMG that is left after removing all these unambiguously recognizable false-positive orthology assignments.
Definition 17 Let ( G, σ ) be a BMG with symmetric part G and let F be the set of its hug-edges. The no-hug 1 graph NH( G, σ ) is the subgraph of G with vertex set V ( G), coloring σ and edge set E(G)\F.
By Thm. 11, NH( G, σ ) is therefore the subgraph of the underlying RBMG of ( G, σ ) that does not contain any u-fp edge. Importantly, it contains the orthology graph for every reconciliation map μ as well as the orthology graph induced by the extremal event labeling as subgraphs: Corollary 5 Let (T , σ ) be a leaf-colored tree and μ a reconciliation map from (T , σ ) to some species tree S. Then, The no-hug graph still may contain false-positive orthology assignments, i.e., NH( G(T , σ )) = (T , t T ) does not hold in general. As an example, consider the BMG G(T 1 , σ ) in Fig. 3. Here, none of the edges xz, x z and yz are u-fp and thus, by Thm. 11 also not hug-edges. Hence, they still remain in NH( G(T 1 , σ )). However, these edges are not contained in (T 1 , t T ), since t T (lca T 1 (x, x , y, z)) = and thus, (T 1 , t T ) NH( G (T 1 , σ )).

Algorithms
In this section, we provide a polynomial-time algorithm to identify all u-fp edges in a given BMG. To this end, we take a closer look at hourglass chains and the trees that explain them. In Fig. 6 ) are non-empty. This suggests to consider the children of a vertex u as the vertices of a "color-set intersection graph" with edges connecting children with non-empty color-set intersection:

Definition 7
The color-set intersection graph C T (u) of an inner vertex u of a leafcolored gene tree (T , σ ) is the undirected graph with vertex set V := child T (u) and edge set This construction is similar to the definition of intersection graphs e.g. used in McKee and McMorris (1999). C T (u) can be viewed as a natural generalization of S ∩ (x, y) in the following sense: Every BMG ( G, σ ) contains all information necessary to determine the trees (T , σ ) by which it is explained. Since u-fp edges are defined in terms of the explaining trees, every BMG ( G, σ ) also contains -at least implicitly -all information needed to identify its u-fp edges. Since ( G, σ ) is determined by its unique least resolved tree (T * , σ ), the u-fp edges must also be determined by (T * , σ ). It is not sufficient for this purpose, however, to find an event labeling t of the vertices of T * .
To see this, consider for example the "true" history ( T , t, σ ) of the BMG G( T , σ ) as shown in Fig. 7. The unique least resolved tree (T * , σ ) for G( T , σ ) is obtained by merging the two vertices v 1 and v 2 of T resulting in the vertex v of T * . We have t(v 1 ) = = = t(v 2 ). For vertex v and every reconciliation map μ from (T * , σ ) to any species tree S, it must hold that μ(v) ∈ E(S) and thus t * μ (v) = , since v has two children with overlapping color sets and by Lemma 2. Thus, the edges cx with x ∈ {a 1 , a 2 , b 1 , b 2 } are (T * , σ )-fp although they are not false positives at all. Since speciation and duplication vertices may be merged into the same vertex v of T * , the least resolved tree T * in general cannot simply inherit the event labeling from the true gene history, and thus there may not be a "correct" labeling t * of T * that provides evidence for all u-fp edges. The example in Fig. 7 shows that the least resolved tree T * simply may not be "resolved enough". In the following, we therefore describe how the unique least resolved tree can be resolved further to provide more evidence about u-fp edges. Eventually, this will lead us to a characterization of the u-fp edges. To this end, we need to gain more insights into the structure of redundant edges, i.e., those edges e in T for which (T e , σ ) still explains G(T , σ ).
Since the color sets of distinct subtrees below a speciation vertex cannot overlap by Lemma 2, Cor. 1 (Sec. A) implies that all edges below a speciation vertex are redundant and thus can be contracted. More precisely, we have Observation 8 Let μ be a reconciliation map from (T , σ ) to S and assume that there is a vertex u ∈ V 0 (T ) such that μ(u) ∈ V 0 (S) and thus, t μ (u) = . Then every inner edge uv of T with v ∈ child T (u) is redundant w.r.t. G(T , σ ). Moreover, if an inner edge uv with v ∈ child T (u) is non-redundant, then u must have two children with overlapping color sets, and hence, t μ (u) = .
Our goal is to identify those vertices in (T * , σ ) that can be expanded to yield a tree that still explains G(T * , σ ). To this end, we need to introduce a particular way of "augmenting" a leaf-colored tree.
Definition 18 Let (T , σ ) be a leaf-colored tree, u be an inner vertex of T , C T (u) the corresponding color-set intersection graph, and C the set of connected components of C T (u). Then the tree T u augmented at vertex u is obtained by applying the following editing steps to T : -introduce a vertex w and attach it as a child of u, i.e., add the edge uw, -for every element v i ∈ C, substitute the edge uv i by the edge wv i .
The augmentation step is trivial if T u = T , in which case we say that no edit step was performed.
An example of an augmentation is shown in Fig. 8. The tree T u obtained by an augmentation of a phylogenetic tree T is again a phylogenetic tree. The tree (T u , σ ) on the right is obtained from (T , σ ) by augmenting T at vertex u. The color-set intersection graph C T (u) (shown in the middle) has more than one connected component and there are connected components consisting of more than two vertices v i ∈ child T (u). According to Lemma 21,σ (L(T u , the edges uw 1 and uw 2 are redundant w.r.t. G(T u , σ ) and thus, both trees explain the same BMG A key property of the procedure in Def. 18 is that repeated augmentation of the same inner vertex leads to at most one expansion and that the order of augmenting multiple vertices does not matter. More precisely, Lemma 23 in Sec. C.3 ensures the existence of a unique augmented tree: Definition 19 (Augmented tree) Let (T , σ ) be a leaf-colored tree. The augmented tree of (T , σ ), denoted by (A(T ), σ ), is obtained by augmenting all inner vertices of (T , σ ) (in an arbitrary order).
In particular, the augmented tree preserves the best match relation:

Proposition 7 For every leaf-colored tree (T , σ ), it holds G(T , σ ) = G(A(T ), σ ).
We now have everything in place to present the main results of this section.
Theorem 10 Let ( G, σ ) be a BMG, (T * , σ ) its unique least resolved tree, and t := t A(T * ) the extremal event labeling of the augmented tree (A(T * ), σ ). Then is the subgraph of the underlying RBMG of ( G, σ ) that does not contain any u-fp edges (cf. Def. 17 and Thm. 11), the set of all u-fp edges can readily be obtained by comparing the edges of ( G, σ ) with the edges in the orthology graph obtained from (A(T * ), t). Since only u-fp edges have been removed to obtain ( (A(T * ), t), σ ) and since (A(T * ), σ ) still explains ( G, σ ), the graph ( (A(T * ), t), σ ) is, in the sense of an unambiguous editing, the best estimate of the orthology relation that we can make by solely utilizing the structural information of a given BMG ( G, σ ). Note, Thm. 1 implies that NH( G, σ ) must, in particular, be a cograph.
Since ( (A(T * ), t), σ ) = NH( G, σ ), the computation of NH( G, σ ) can be achieved in polynomial time and avoids the need to find the hourglass chains of ( G, σ ). In fact, the effort is dominated by computing the least resolved tree (T * , σ ) for a given BMG.
, σ ) and thus, an orthology graph. However, none of its cotrees can be reconciled with any species tree since each of them contains the contradictory species triples σ (a 1 )σ (b 1 )|σ (c 1 ) and σ (a 1 )σ (c 1 )|σ (b 1 ) (see e.g. Hernandez-Rosales et al. (2012), Hellmuth (2017)). Note, the trees ( T , t) and (A(T * ), t) differ in the event label marked by the arrows, resulting in the three additional fp edges As argued in (Geiß et al. 2019, Sec. 5), the number of genes between different species will be comparable in practical applications, i.e., O( In this case, the running time to compute (T * , σ ) reduces to O(|L| 3 /|S|) and we obtain an overall running time to compute the set of all u-fp edges of O(|L| 3 /|S| + |L| 2 |S|). Thms. 10 and 12 imply that we do not need to find induced quartets and hourglasses explicitly, nor do we need to identify the hourglass chains. Instead, it is more efficient to compute the least resolved tree (T * , σ ), its augmented tree (A(T * ), σ ), and the corresponding extremal event labeling t.
Deletion of all u-fp edges is necessary to obtain an orthology relation without false positives. It is not sufficient, however, since NH( G, σ ) may contain additional falsepositive orthology assignments. In order to construct an example, we consider for a BMG ( G, σ ) the set T of all trees (T , t, σ ) for which NH( G, σ ) = ( (T , t), σ ). The example in Fig. 9 shows that it may be the case that none of the trees (T , t, σ ) ∈ T admits a reconciliation map μ to any species tree such that t μ = t. Lemma 29 in Sec. C.5 shows that the augmented tree (A(T * ), t, σ ) is sufficient to test in polynomial time whether or not T contains a reconcilable tree. In the negative case, we have clear evidence that NH( G, σ ) still contains a false-positive edge and thus must be edited further. This type of false-positive orthology assignments is the topic of ongoing work.
In contrast to the LRT of a BMG, its augmented tree is not necessarily displayed by the true gene tree of the underlying evolutionary scenario. Hence, we advocate the augmented tree endowed with the corresponding extremal event labeling (A(T * ), t, σ ) primarily as convenient tool to identify false-positive orthology assignments. Whether or not (A(T * ), t, σ ) is a plausible representation of the gene phylogeny depends on whether it admits a reconciliation of the (phylogenetically correct) species tree. As discussed above, this is not always the case. The following result, however, shows that (A(T * ), t, σ ) is informative in an important special case.

Lemma 30 Let (T , t, σ ) be an event-labeled tree explaining the BMG ( G, σ ), and let
Lemma 30 guarantees that A(T * ) is displayed by the true gene tree T whenever NH( G, σ ) equals the true orthology relation. In a practical workflow, it can be checked efficiently whether there is evidence for additional false-positive edges because T contains no reconcilable tree. If this is not the case, then it is likely that NH( G, σ ) equals the true orthology relation. In this case, T also displays the unique discriminating cotree of NH( G, σ ).
One has to keep in mind, however, that it is not possible to find a mathematical guarantee for NH( G, σ ) to be the true orthology relation, because it cannot be ruled out that the true scenario contains unwitnessed duplications that are compensated by additional gene losses. In the extreme case, it is logically possible for every BMG that, in the true scenario, all inner vertices of the gene tree predate the root of the species tree, resulting in a true orthology graph without any edges Guigó et al. (1996), Page and Charleston (1997), Geiß et al. (2020b). Of course, this is extremely unlikely for real data.

Quartets, hourglasses, and the structure of reciprocal best match graphs
The characterization of u-fp edges is in a way surprising when compared to previous results on the structure of RBMGs Geiß et al. (2020b, c), which were focused on P 4 s and quartets. The expected connection between good and ugly quartets and u-fp edges is captured by Cor. 4. However, Prop. 6 implies that there are also u-fp edges entirely unrelated to quartets and thus induced P 4 s. In this section, we aim to close this gap in our understanding. Hourglass-free BMGs. We start with an important special case for which quartets are sufficient.
Definition 20 A BMG ( G, σ ) is hourglass-free if it does not contain an hourglass as an induced subgraph.
In particular, an hourglass-free BMG does not contain an hourglass chain. It turns out that hourglasses are the forbidden induced subgraph characterizing BMGs that can be explained by binary trees.

Prop. 8 and Cor. 6. A BMG ( G, σ ) can be explained by a binary tree if and only if it is hourglass-free. In particular, it can be decided in polynomial time whether ( G, σ )
can be explained by a binary tree.
The RBMGs that are already cographs are called co-RBMGs. As shown in Sec. D.1, we obtain Corollary 7 Let ( G, σ ) be an hourglass-free BMG. Then its symmetric part (G, σ ) is either a co-RBMG or it contains an induced P 4 on three colors whose endpoints have the same color, but no induced cycle C n on n ≥ 5 vertices.
As outlined in Sec. D.1, all u-fp edges in an hourglass-free BMG are identified by the good and ugly quartets, which are 3-colored by construction. In hourglass-free BMGs, it is indeed sufficient to consider only the 3-colored P 4 s to identify all u-fp edges and thus, to obtain an orthology graph, even though the BMG may also contain 4-colored P 4 s. Since hourglasses can only appear in BMGs that require multifurcations for their explanation (cf. Lemma 14), the case of hourglass-free BMGs is the most relevant for practical applications.
Since all u-fp edges in an hourglass-free BMG are contained in quartets, it is also easy to identify the hourglass-free BMGs that are already orthology graphs.

Corollary 8 Let ( G, σ ) be an hourglass-free BMG. Then, its symmetric part (G, σ ) is a co-RBMG if and only if there are no u-fp edges in ( G, σ ).
u-fpEdges in Hourglass Chains. The situation is much more complicated in the presence of hourglasses. We start by providing sufficient conditions for u-fp edges that are identified by hourglass chains.

possibly with a left tail z or a right tail z . Then, an edge in G is
As outlined in Sec. D.2, hourglass chains identify false-positive edges that are not associated with quartets in the BMG and, in particular, false-positive edges that are not even part of an induced P 4 . This observation limits the use of cograph editing in the context of orthology detection, at least in the case of gene trees with polytomies: On one hand, an RBMG can be a cograph and still contain u-fp edges and, on the other hand, there are examples where deletion of the u-fp edge identified by quartets (and thus, by induced P 4 s) is not sufficient to arrive at a cograph (cf. Sec. D.2). Four-colored P 4 s Geiß et al (2020c, Thm. 8) established that the RBMG (G, σ ) is a co-RBMG, i.e., a cograph, if and only if every subgraph induced on three colors is a cograph. Therefore, if (G, σ ) contains an induced 4-colored P 4 , it also contains an induced 3-colored P 4 . For hourglass-free BMGs ( G, σ ) it is clear that a 4-colored P 4 always overlaps with a 3-colored P 4 : In this case NH( G, σ ) is obtained by deleting middle edges of good quartets and first edges of ugly quartets. Since NH( G, σ ) is a cograph, there is no P 4 left, and thus at least one edge of any 4-colored P 4 was among the deleted edges. It is natural to ask whether this is true for BMGs in general. However, as shown in Sec. D.3, good and ugly quartets are not sufficient on their own and there are examples with 4-colored P 4 s that do not overlap with the middle edge of a good quartet or the first edge of an ugly quartet.
Still, in the context of cograph-editing approaches it is of interest whether the 3colored P 4 s are sufficient. In the following we provide an affirmative answer.
Lemma 34 Let ( G, σ ) be a BMG and P a 4-colored induced P 4 in the symmetric part of ( G, σ ). Then at least one of the edges of P is either the middle edge of some good quartet or the first edge of a bad or ugly quartet in ( G, σ ).
It is important to recall in this context, however, that the deletion of all u-fp-edges identified by quartets does not necessarily lead to a cograph (see Fig. 17(C) in Sec. D.3 for an example). Hence, the quartets alone therefore cannot provide a complete algorithm for correcting an RBMG to an orthology graph.

Simulation results
We illustrate the potential impact of our mathematical results discussed in the previous sections with the help of simulated data. To this end, we focus on the accuracy of the inferred orthology graph assuming that the best matches are accurate. Of course, this is only one of several components in complete orthology detection pipeline, which would also need to consider the genome annotation, pairwise alignments of genes or predicted protein sequences, and the conversion of sequence similarities into best match data. The latter step has been investigated in considerable detail by Stadler et al. (2020). Here, we start from simulated evolutionary scenarios and extract the BMG directly from the ground truth using the simulation library AsymmeTree Stadler et al. (2020).
In brief, AsymmeTree generates realistic evolutionary scenarios in four steps.
(1) A planted species tree S is generated using the Innovation Model Keller-Schmidt and Klemm (2012), which models observed phylogenies well. (2) A dating map τ assigns time points to all vertices of S and thus branch lengths to the edges of S.
(3) On S, we use a variant of the well-known constant-rate birth-death process with a given age (see e.g. Kendall 1948;Hagen and Stadler 2018) to simulate an event-labeled gene tree (T , t, σ ) containing duplication and loss events. Speciations are included as additional branching events that generate copies of all genes present at a speciation vertex in all descendant lineages. The simulated gene trees are constrained to have at least one surviving gene in each species to avoid trivial cases. (4) The observable part of the gene tree is extracted by recursively removing leaves that correspond to loss events and suppressing inner vertices with a single child. AsymmeTree can also assign rates to edges of (T , t, σ ) to convert evolutionary time differences into general additive distances; however, this is not relevant here since the rates do not affect evolutionary relatedness and thus the BMG.
Extending the simulations used in Geiß et al. (2020b), Stadler et al. (2020), we also consider non-binary gene trees. This is important here since, by Lemma 14, hourglasses cannot appear in BMGs that are explained by a binary tree. There is an ongoing discussion to what extent polytomies in phylogenetic trees are biological reality as opposed to an artifact of insufficient resolution. At the level of species trees, the assumption that cladogenesis occurs by a series of bifurcations (e.g. Maddison We distinguish hug-edges in good and ugly quartets as well as hug-edges appearing only in hourglass chains (orange). In the simulations, the fraction of u-fp edges that are first edges of bad quartets is too small too be visible and therefore not shown here. The undetectable false positives correspond to complementary gene losses without surviving witnesses of the duplication event. Species trees are binary, while gene trees contain multifurcations. The number of offsprings is modeled as 2 + k, where k is drawn from a Poisson distribution with parameter λ. For λ = 0, the gene trees are binary.
In the experiments, we observed that on average 62.4% of the 25000 simulated BMGs do not contain any false-positive edge (cf. Fig. 11). Those instances are included in the computation of the fraction |F|/|E(G)| (percentage above the bars). However, for the computation of all other values only scenarios that contain false-positives are considered 1989; DeSalle et al. 1994) seems to be prevailing, several authors have argued quite convincingly that there is evidence for a least some bona fide multifurcations of species Kliman et al. (2000), Takahashi et al. (2001), Sayyari and Mirarab (2018). In the simulation, polytomies in species trees are introduced after the first step by edge contraction with a user-defined probability p.
The reality of polytomies is less clear for gene trees. One reason is the abundance of tandem duplications. Although the majority of tandem arrays comprises only a pair of genes, larger clusters are not at all rare Pan and Zhang (2008). Although one may argue that mechanistically they likely arise by stepwise duplications, such arrangements are often subject to gene conversion and non-homologous recombination that keeps the sequences nearly identical for some time before they eventually escape from concerted evolution and diverge functionally Liao (1999), Hanada et al. (2018). As a consequence, duplications in tandem arrays may not be resolvable unless witnesses of different stages of an ongoing duplication process have survived. To model polytomies in the gene tree, we modify step (3) of the simulation procedure by replacing a simple duplication by the generation of 2 + k offspring genes. The number k of additional copies is drawn from a Poisson distribution with parameter λ > 0.
The simulated data set of evolutionary scenarios comprises species trees with 10 to 30 species (drawn uniformly). The time difference between the planted root and the leaves of S is set to unity. The duplication and loss rates in the gene trees are drawn i.i.d. from the uniform distribution on the interval [0.5, 1.5). Multifurcating gene trees were produced for λ = {0.0, 0.5, 1.0, 1.5, 2.0}. In total, we generated 5000 scenarios for each choice of p and λ. Since the true scenarios, and thus the true gene tree T , the true BMG G, and the corresponding RBMG G are known, we can also determine the set (1) of false-positive edges. From the BMG, we compute the set U of u-fp edges as well as the subsets U M and U U of u-fp edges that are middle edges of a good or first edges of an ugly quartet, respectively. Note that in general we have U M ∩ U U = ∅. We only discuss the results for binary species trees in some detail, since species trees with polytomies yield qualitatively similar results. We observe that the relative abundance of u-fp edges in good and ugly quartets increases moderately for larger p. First, we note that, consistent with Geiß et al. (2020b), Stadler et al. (2020), the fraction |F|/|E(G)| of false positive orthology assignments is small in our data set, on the order of 3%. This indicates that, in real-life data, the main source of errors is likely the accurate determination of best matches from sequence data rather than false-positive edges contained in the BMG. Considering the fraction |U|/|F| of u-fp edges in Fig. 10, we find that even in the most adverse case of all gene trees being binary, the BMG identifies more than three quarters of F. It may be surprising at first glance that the problem becomes easier with increasing λ and barely 6% of the false positives escape discovery. A likely explanation is that multifurcations increase the likelihood that an inner vertex has two surviving lineages that serve as witnesses of the event; in addition, multifurcations increase the vertex degree in the BMG, so that in principle more information is available to resolve the tree structure. It is also interesting to note that U U \U M is small, i.e., there are few cases of first edges in an ugly quartet that are not also middle edges in a good quartet. The fraction of u-fp edges that appear only as first edges of bad quartets is even smaller; only 2-3% of the u-fp edges associated with hourglass chains, i.e., less than 0.15% of all u-fp edges are of this type. The overwhelming majority of u-fp edges associated with quartets thus appear (also) as middle edges of good quartets. This observation provides an explanation for the excellent performance of removing the U M -edges proposed in Geiß et al. (2020b). In particular in the case of binary trees, which was considered by Geiß et al. (2020b), there is only a small number of other u-fp edges, which are completely covered by U U . Fig. 11 visualizes the appearance of false-positive edges depending on the number of duplication and loss events. Not surprisingly, F is enriched in scenarios with a large number of losses compared to the duplications, and depleted when losses are rare. In fact, in the absence of losses, the RBMG equals the orthology graph, i.e., F = ∅ (Geiß et al. 2020b, Thm. 4). Removal of U M , already reduced the false positives considerably.

Summary and outlook
We have shown here how all unambiguously false-positive orthology assignments can be identified in polynomial time provided that all best matches are known. In particular, we have provided several characterizations for u-fp edges in terms of underlying subgraphs and refinements of trees. Since the best match graph contains only false positives, we have obtained a characterization of all unambiguously incorrect orthology assignments. Simulations showed that the majority of false positives comprises middle edges of good quartets, while u-fp edges that appear only as first edges of an ugly quartet are rare. Not surprisingly, the hourglass-related u-fp edges become important in gene trees with many multifurcations. They do not appear in scenarios derived from binary gene trees. For the theory developed here, it makes no difference whether polytomies in the gene tree appear as genuine features, or whether limited accuracy of the approximation from underlying sequence data produced the equivalent of a soft polytomy in the BMG.
The augmented tree (A(T * ), σ ) is the least resolved tree that admits an event labeling such that all inner vertices with child trees that have overlapping colors are designated as duplications while all inner vertices with color-disjoint child trees are designated as speciations. The tree (A(T * ), σ ) therefore does not contain "nonapparent duplications" in the sense of , i.e., duplication vertices with species-disjoint subtrees. This is an interesting connection linking the literature concerned with polytomy refinement in given gene trees Chang and Eulenstein (2006),  with best match graphs.
The extremal event labeling t of (A(T * ), σ ) is the one that minimizes the necessary number of duplications on (A(T * ), σ ). In a conceptual sense, therefore, (A(T * ), t) is a "most parsimonious" solution, matching the idea of most parsimonious reconciliations Guigó et al. (1996), Page and Charleston (1997). From a technical point of view, however, the problem we solve here is very different. Instead of considering a given pair of gene tree T and species tree S, we ask here about the information con-tained in the BMG ( G, σ ), i.e., we only consider the information on the species tree that is already implicitly contained in ( G, σ ). The construction of the event-labeled gene tree (A(T * ), t) in fact implies a set S of informative triples, namely those σ (x)σ (y)|σ (z) with σ (x), σ (y), σ (z) pairwise distinct and t(lca A(T * ) (x, y, z)) = , that are displayed by the species tree S Hernandez-Rosales et al. (2012), Hellmuth (2017). Nothing in our theory, however, ensures that S is a consistent set of triples, much less that S is consistent with a given species tree S. A lack of consistency, however, implies that the no-hug graph NH( G, σ ) cannot be the correct orthology relation, and thus, necessarily contains additional false-positive edges. Consistency, on the other hand, cannot provide a mathematical proof for biological correctness. It makes NH( G, σ ) a very likely candidate for the true orthology relation, however, because alternative scenarios require additional gene duplications and multiple, strategically placed gene losses to compensate for them.
Since constraints on reconciliation maps deriving from the species phylogeny are fully expressed by informative triples, no such constraint exists in particular for any vertex u of A(T * ) that has only leaves as children. That is, false-positive orthology assignments among the children of u cannot be identified from the BMG alone because there are no further descendants to witness u as duplication event. Additional evidence, such as the assumption of a molecular clock or synteny must be used to resolve situations such as the complementary loss shown in Fig. 2.
Every gene tree T can be reconciled with every species tree S Guigó et al. (1996), Page and Charleston (1997), Geiß et al. (2020b) at the expense of reassigning events as duplications. If A(T * ) is already binary, consistency will require the relabeling of some speciation nodes as duplications. Can one characterize and efficiently compute the minimal relabelings? In the general case, a further refinement of A(T * ) may be sufficient. Is a refinement of speciation nodes sufficient, or are there in general speciation nodes in (A(T * ), t) that need to be refined into separate speciation and duplication events?
Since orthology graphs are cographs contained in the RBMG (G, σ ), it is of interest to compare the deletion of all u-fp edges in (G, σ ) with finding a (minimal) edgedeletion set to obtain a cograph. These two problems are clearly distinct: The simplest example is the BMG ( G, σ ) in Fig. 6(A): its symmetric part G is already a cograph but ( G, σ ) contains the hug-edge x y, which must be deleted. Despite its practical use Hellmuth et al. (2015), Lafond et al. (2016), this observation relegates cograph editing Liu et al. (2012), Hellmuth et al. (2020a), Tsur (2020) to the status of a heuristic approximation for the purpose of orthology detection.
For practical applications, one has to keep in mind that best matches are inferred from sequence similarity data. Despite efforts to convert best (blast) hits into evolutionary best matches in a systematic manner Stadler et al. (2020), estimated BMGs will contain errors, which in most cases will violate the definition of best match graphs. This begs the question how an empirical estimate of a BMG can be corrected to a closest "correct" BMG that (approximately) fits the data. Not surprisingly, BMG editing Schaller et al. (2020) and the analogous RBMG editing problem Hellmuth et al. (2020b) are NP-hard. Efficient, accurate heuristics are a topic of ongoing research.
Orthology prediction tools intended for large data sets often do not attempt to infer the orthology graph, but instead are content with summarizing the information as clusters of orthologous groups (COGs) in an empirically estimated RBMG Tatusov et al. (1997), Roth et al. (2008). Formally, this amounts to editing the BMG to a set of disjoint cliques. The example in Fig. 7 shows that this approach can destroy correct orthology information: the BMG ( G, σ ) does not contain u-fp edges and thus, it is the closest orthology graph. However, ( G, σ ) is not the disjoint union of cliques.
The following definition of informative triples is equivalent to the version given by Geiß et al. (2019).
Definition 9 Let ( G, σ ) be a colored digraph. We say that a triple ab|b is informative for ( G, σ ) if a, b and (a, b ) / ∈ E( G). ( G, σ ). Then, every tree T that explains

Lemma 5 Let ( G, σ ) be a BMG and ab|b an informative triple for
Proof The definition of informative triples implies that (a, b) ∈ E( G) and (a, b ) / ∈ E( G). Using σ (b) = σ (b ) and the definition of best matches we immediately conclude lca T (a, b) ≺ T lca T (a, b ).

Lemma 6 Let ab|b and cb |b be informative triples for a BMG ( G, σ ). Then every tree
Proof Let (T , σ ) be an arbitrary tree that explains ( G, σ ). By Lemma 5, T displays the informative triples ab|b and cb |b.
Given a tree T and an edge e, denote by T e the tree obtained from T by contracting the edge e. An edge e = 0 T ρ T in (T , σ ) is redundant (w.r.t. ( G, σ )) if (T , σ ) explains ( G, σ ) and G(T e , σ ) = G(T , σ ). Redundant edges have already been characterized in (Geiß et al. 2019, Lemma 15, Thm. 8) in terms of equivalence classes using a more complicated notation. Here we give a simpler characterization:

and only if (i) e is an inner edge of T and (ii) there is no arc
Proof Let w e be the vertex in T e resulting from the contraction e = uv with v ≺ T u in T . By assumption we have ( G, σ ) = G (T , σ ).
First, assume that e is redundant and thus, G(T e , σ ) = G(T , σ ). Then e must be an inner edge, since otherwise L(T ) = L(T e ) and, therefore, (T e , σ ) does not explain ( G, σ ). Now assume, for contradiction, that there is an arc (a, b) ∈ E( G) such that lca T (a, b) = v and σ (b) ∈ σ (L(T (u))\L(T (v))). Then there is a leaf T (a, b ). Thus, (a, b ) / ∈ E( G). After contraction of e, we have lca T (a, b) = lca T (a, b ) = w e . Hence, by definition of best matches, (a, b) is an arc in G(T e , σ ) if and only if (a, b ) is an arc in G(T e , σ ); a contradiction to the assumption that (T e , σ ) explains ( G, σ ).
Conversely, assume that e = uv with v ≺ T u is an inner edge in T and that there is no arc (a, b) ∈ E( G) such that lca T (a, b) = v and σ (b) ∈ σ (L(T (u))\L(T (v))). In order to show that an edge e is redundant, we need to verify that G(T , σ ) = G(T e , σ ). To this end, consider an arbitrary leaf c ∈ L(T ). Then we have either Case (1) c ∈ L(T )\L(T (v)), or Case (2) c ∈ L(T (v)).
In Case (1) it is easy to verify that lca T (c, d) = lca T e (c, d) for every d ∈ L(T ). In particular, therefore, (c, d) ∈ E ( G(T , σ )) if and only if (c, d) ∈ E( G(T e , σ )).
In Case (2), i.e. c ∈ L(T (v)), consider another, arbitrary, leaf d ∈ L(T ). Note, if σ (c) = σ (d), then c and d never form a best match. Thus, we assume σ (c) = σ (d). Now, we consider three mutually exclusive Subcases (a) lca T (c, d) T  Case (c). Since lca T (c, d) T u, it is again easy to see that, for every d with σ )) for all c, d ∈ L(T ). Thus, e is redundant.
As a consequence of Lemma 7, we obtain Corollary 1 Let (T , σ ) be a leaf-colored tree explaining (G, σ ) and uv an inner edge inner of T with v ≺ T u. If σ (L(T (v))) ∩ σ (L(T (v ))) = ∅ for every v ∈ child T (u)\{v}, then uv is redundant in T (w.r.t. (G, σ )). Finally, we show that redundant edges can be contracted in arbitrary order, similar to (Geiß et al. 2019, Lemma 6 & Cor. 2). To this end, we first prove a more general statement.

Lemma 8 If T A is obtained from T by contracting all edges in a subset A of inner edges in T , then G(T , σ ) ⊆ G(T A , σ ).
Proof First note that L(T A ) = L(T ) since A only contains inner edges. Let (x, y) be an arc in G(T , σ ). This implies that there is no y with σ (y ) = σ (y) such that lca T (x, y ) ≺ T lca T (x, y). It is easy to verify that the latter is still true after contraction of an arbitrary edge e, i.e. there is no y with σ (y ) = σ (y) such that lca T e (x, y ) ≺ T e lca T e (x, y). Hence, (x, y) is an arc in G(T e , σ ). Now consider the subsets , σ ), which completes the proof.

Lemma 9 Let A and B be disjoint sets of redundant edges in (T , σ ) w.r.t. ( G, σ ) and denote by T A the tree obtained by contraction of all edges in A in arbitrary order. Then B is a set of redundant edges in T A w.r.t. G(T A , σ ) = G(T , σ ).
Proof By Lemma 8, contraction of any inner edge e = uv ∈ E(T ) never leads to a loss of arcs in the BMG ( G, σ ) = G (T , σ ). Furthermore, the redundant edges in T w.r.t. (G, σ ) are completely characterized by Lemma 7. Thm. 8 in Geiß et al. (2019) states that by contraction of all redundant edges (in an arbitrary order), one obtains the unique least resolved tree (T * , σ ) of ( G, σ ).

B.1 (T, )-fp and u-fp edges
The aim of this contribution is to characterize all those false-positive edges in a given BMG ( G, σ ) that can be identified from the structure of the BMG alone, i.e., without any a priori knowledge about the gene tree, the species tree, or the reconciliation map. In this section, we start by considering false-positive edges identifiable with respect to a given (T , σ ) that explains ( G, σ ) and then proceed by considering those edges that are identified by all trees explaining ( G, σ ).
In other words, x y is called (T , σ )-fp whenever x and y cannot be orthologous w.r.t. every possible reconciliation μ from (T , σ ) to any species tree. Interestingly, (T , σ )fps can be identified without considering reconciliation maps explicitly. ( G, σ ). Then, the following statements are equivalent:
(1) implies (2). By contraposition, let v = lca T (x, y) and suppose that for all distinct children In the following, we show that there is a species tree S and a reconciliation map μ from (T , σ ) to S such that t μ (lca(x, y)) = , which implies that x y is not (T , σ )-fp.
We construct the species tree S as follows: S has root edge 0 S ρ S . Now add k children u 1 , . . . , u k to ρ S . For each of these children u i with |σ (L(T (v i )))| > 1, we add a leaf t for every color t ∈ σ (L(T (v i ))) and the edge u i t. Any other u i is considered to be a leaf in S, and we identify u i with the single element in σ (L(T (v i ))). Furthermore, add for all t ∈ σ (L(T ))\σ (L(T (v))) a leaf t that is adjacent to ρ S . Since the color sets σ (L(T ))\σ (L(T (v))), σ (L(T (v 1 ))), . . . , σ (L(T (v k )) are pairwise distinct, S is welldefined, and, by construction, a planted phylogenetic tree. To construct a reconciliation Fig. 13 Visualization of the construction of a species tree S and reconciliation map μ as described in the proof of Lemma 10. Note that, in the example, v k is already a leaf in the gene tree T . Hence, the corresponding u k is also a leaf since |σ (L(T (v k )))| = 1. Moreover, note that for By Condition (i) and (ii), the Axioms (R0) and (R1) are satisfied, respectively. By

by (ii) and by construction.
It is easy to verify that μ satisfies (R2). A sketch of construction of the species tree S and the reconciliation map μ is provided in Fig. 13.
The only vertex of T that is mapped to a vertex in S is v. Hence, it remains to show that μ(v) = ρ S ∈ V 0 (S) satisfies (R3). Note that for every two distinct children In summary, μ is a reconciliation map from (T , σ ) to S. Since μ(v) = ρ S ∈ V 0 (S), we have t μ (v) = .
Statements (2) and (3) are equivalent by definition of the extremal event labeling.
Lemma 10 implies that (T , σ )-fp can be verified in polynomial time for any given gene tree (T , σ ).

Definition 11 (Unambiguous false-positive) Let ( G, σ ) be a BMG. An edge x y in G is called unambiguous false-positive (u-fp ) if for all trees (T , σ ) that explain ( G, σ ) the edge x y is (T , σ )-fp.
Hence, if an edge x y in G is u-fp, then it is in particular (T , σ )-fp in the true history that explains ( G, σ ). Thus, u-fp edges are always "correct" false-positives.

B.2 The color-intersection S ∩
Given a gene tree (T , σ ) and a pair of distinct leaves x, y ∈ L(T ), we denote by v x , v y ∈ child T (lca T (x, y)) the unique children of the last common ancestor of x and y for which x T v x and y T v y . That is, T (v x ) and T (v y ) are the subtrees of T rooted in the children of lca T (x, y) with x ∈ L(T (v x )) and y ∈ L(T (v y )). The set contains the colors, i.e. species, that are common to both subtrees. Lemma 4 immediately implies Corollary 2 Let x y be an edge in a BMG ( G, σ ). Then σ ({x, y}) ∩ S ∩ T (x, y) = ∅ for all trees (T , σ ) that explain ( G, σ ).
The following result shows that the color-intersection of a given edge in a BMG ( G, σ ) in fact does not depend on the tree representation of ( G, σ ).

Lemma 11 Let ( G, σ ) be a BMG and (T * , σ ) the corresponding unique least resolved tree explaining ( G, σ ). Then, for each tree (T , σ ) that explains ( G, σ ), every edge x y in
Proof Let (T , σ ) be an arbitrary tree that explains ( G, σ ). Moreover, let x y be an edge in G and denote by v x and v y be the unique children y). Since (T , σ ) explains ( G, σ ), we apply Thm. 3 to conclude that T is a refinement of T * and thus, C(T * ) ⊆ C(T ). Therefore, L(T * (lca T * (x, y)), L(T * (v * x )) and L(T * (v * y )) are contained in C(T ). This implies that there must be vertices u, w x , and w y in T with L(T (u)) = L(T * (lca T * (x, y)), L(T (w x )) = L(T * (v * x )) and L(T (w y )) = L(T * (v * y )). Note that L(T * (v * x )) ∩ L(T * (v * y )) = ∅, and thus L(T (w x )) ∩ L(T (w y )) = ∅. In particular, w x and w y are incomparable in T . Moreover, u = lca T (x, y) = lca T (w x , w y ), thus we have w x T v x and w y T v y . Therefore, In this case, t ∈ σ (L(T (v x ))) and we can choose a vertex z 1 ∈ L(T (v x )) such that σ (z 1 ) = t and lca T (x, z 1 ) is as far away as possible from v x compared to all lca An analogous argument ensures that there is a vertex z 2 ∈ L(T (v y )) such that σ (z 2 ) = t and (y, z 2 ) ∈ E( G). Clearly, lca T (x, z 2 ) = lca T (x, y) = lca T (y, z 1 ) and thus lca T (x, z 1 ) T v x ≺ T lca T (x, z 2 ), which in turn implies that (x, z 2 ) / ∈ E( G). Since (x, z 1 ) ∈ E( G) and (x, z 2 ) / ∈ E( G), we obtain the informative triple xz 1 |z 2 for ( G, σ ). Analogously, yz 2 |z 1 is an informative triple for ( G, σ ). Lemma 6 and the fact that T * explains ( G, σ ) implies that there are distinct vertices v 1 , v 2 ∈ child T * (lca T * (x, y)) such that x, z 1 T * v 1 and y, z 2 T * v 2 . Since t = σ (z 1 ) = σ (z 2 ), we have t ∈ S ∩ T * (x, y).
Remark 1 By Lemma 11, we have S ∩ T (x, y) = S ∩ T * (x, y) for every tree (T , σ ) explaining a BMG ( G, σ ) with corresponding least resolved tree (T * , σ ). Therefore, it is sufficient to consider S ∩ T * (x, y). We will therefore drop the explicit reference to the tree and simply write S ∩ (x, y). We can verify in polynomial time whether or not S ∩ (x, y) = ∅ because the least resolved tree (T * , σ ) explaining ( G, σ ) can be computed in polynomial time.
As we shall see later, the converse of Prop. 1 is not always satisfied (cf. also Fig. 14). An immediate consequence of Prop. 1 is:

Corollary 3 An edge x y in a BMG G(T , σ ) with S ∩ (x, y) = ∅ is (T , σ )-fp.
Although not necessarily true in general, we show next that the converse of Prop. 1 and Cor. 3 does hold for the special case of binary trees.

Lemma 12 Let x y be an edge in G(T , σ ) and suppose lca T (x, y) is a binary vertex.
Then, the following three statements are equivalent: The edge x y is u-fp.

Proof (1) implies (2). Suppose x y is (T , σ )-fp.
Since v is binary, it has precisely two children v 1 and v 2 . In particular, v = lca T (x, y) implies that that x T v i and x T v j for i, j ∈ {1, 2} being distinct. By Lemma 10, the two children v 1 and v 2 of v satisfy σ (L(T (v 1 ))) ∩ σ (L(T (v 2 ))) = ∅. By Lemma 11 and Remark 11, we have S ∩ (x, y) = ∅.

The edge x y is u-fp.
Proof For every edge x y in G the last common ancestor lca T (x, y) is binary. Now apply Lemma 12.
Thm. 4 implies that all u-fp edges can be detected in a BMG that is explained by a known binary gene tree. However, not all BMGs ( G, σ ) can be explained by a binary tree, as e.g. the BMG in Fig. 6(A). Thm. 4 does not generalize to the non-binary case, and S ∩ (x, y) is not sufficient to identify all u-fp edges. Furthermore, it is not difficult to find non-binary trees in which (T , σ )-fp and u-fp edges are not the same: As show in Fig. 3, the edge xz in is (T 1 , σ )-fp but not (T 2 , σ )-fp according to Lemma 10. Since both trees explain the same BMG, the edge x y is not u-fp.

B.3 S ∩ (x, y) = ∅: quartets
Since every orthology graph is a cograph (cf. Thm. 1), we know that every induced P 4 in the RBMG is associated with false-positive edges. The induced subgraphs of the BMG spanned by a P 4 in its symmetric part (i.e., the RBMG) are called quartets. We write abcd or, equivalently, dcba for an induced P 4 with edges ab, bc, and cd. The quartets on three colors fall into three classes: Definition 12 (Good, bad, and ugly quartets) Let ( G, σ ) be a BMG with symmetric part (G, σ ) and vertex set L, and let Q := {x, y, z, z } ⊆ L with x ∈ L[r ], y ∈ L[s], and z, z ∈ L[t]. The set Q, resp., the induced subgraph ( , an ugly quartet if zxz y is an induced P 4 in (G, σ ).
The edge x y in a good quartet zx yz is its middle edge. The edge zx of an ugly quartet zxz y or a bad quartet zx yz is called its first edge. First edges in ugly quartets are uniquely determined due to the colors. In bad quartets, this is not the case and therefore, the edge yz in zx yz is a first edge as well.
An RBMG never contains induced P 4 s on two colors (Geiß et al. 2020c, Obs. 5). This, in particular, implies that for the induced P 4 s in Def. 12 the colors r , s, and t must be pairwise distinct. Induced P 4 s on four colors are investigated in some more detail in Sec. D.3 below.
The key property of good quartets is a consequence of (Geiß et al. 2020b, Cor. 5): Proposition 2 If zx yz is a good quartet in the BMG ( G, σ ), then S ∩ (x, y) = ∅ and thus, x y is u-fp.
Prop. 2 provides a convenient way to identify unambiguous false-positive edges in a BMG.

Lemma 13 If x y is an edge in a BMG G(T , σ ) and t ∈ S ∩ (x, y), then there is a good quartet z
) and y * , z 2 ∈ L(T (v y )) with v x and v y being the unique children in child T (lca T (x, y)) such that with x T v x and y T v y .
Proof Consider an edge x y of G(T , σ ) and a color t ∈ S ∩ (x, y). By Cor. 2, t = σ (x), σ (y). Lemma 3 ensures the existence of an edge x * z 1 in G for some leaves . By the same arguments as in the proof of Cor. 2, we can conclude that z 1 y is not an edge in G for all y ∈ L(T (v y )) ∩ L[σ (y)]. However, (z 1 , y ) ∈ E( G) since the color of y is not present in T (v x ). Likewise, there are leaves y * ∈ L(T (v y )) ∩ L[σ (y)] and z 2 ∈ L(T (v y )) ∩ L [t] such that y * z 2 forms an edge in G. Reusing the arguments from L(T (v x )), we find that x z 2 is not an edge in G and (z 2 , Finally, σ (x) / ∈ σ (L(T (v y ))) and σ (y) / ∈ σ (L(T (v x ))) implies that x * y * forms an edge in G. Hence, z 1 x * y * z 2 is a good quartet.
The edge x * y * in Lemma 13 is the middle edge of a good quartet. For completeness, we also provide a result for the identification of u-fp edges using bad quartets: ( G, σ ). Then, the edges x z and yz are u-fp and every tree that explains ( G, σ ) is non-binary.

Proposition 3 Let zx yz be a bad quartet in a BMG
Proof Let (T , σ ) be an arbitrary tree that explains ( G, σ ), set u := lca T (x, z) and let v x , v z ∈ child T (u) be the two distinct children of u such that x T v x and z T v z . By symmetry, it suffices to show that xz is u-fp. Since zx yz is a bad quartet, we have , which together with σ (x) = σ (x ) contradicts the fact that xz is an edge in G. Hence, v z = v z . Therefore, σ (z) = σ (z ) ∈ σ (L(T (v z ))) ∩ σ (L(T (v z ))) = ∅ for distinct children v z , v z ∈ child T (u). By Lemma 10, the edge xz is (T , σ )-fp and since (T , σ ) was chosen arbitrarily, the edge xz is u-fp. Moreover, we have shown that v x , v z and v z must be pairwise distinct and thus, (T , σ ) is non-binary. Fig. 5 shows that u-fp edges x y with S ∩ (x, y) = ∅ exist that are neither middle edges of good quartets or first edges of bad quartets. Thus we next consider ugly quartets. ( G, σ ), then the edges x y and yx are u-fp.

Proposition 4 If x yx z is an ugly quartet in a BMG
Proof Consider an ugly quartet x yx z . Let (T , σ ) be an arbitrary tree explaining ( G, σ ), put u := lca T (x, y) and let v x , v y ∈ child T (u) be the two distinct children of u such that x T v x and y T v y .
Now consider an arbitrary reconciliation map μ from (T , σ ) to some species tree S. The existence of μ is guaranteed by T (v 3 ))) = ∅, which by Lemma 2 implies t μ (u) = .
Now suppose x ∈ L(T (v x )) and recall that x z is an edge in G by assumption. Since lca T (x , z) and lca T (x, x ) are both ancestors of x they are comparable. If lca T (x , z) T lca T (x, x ), then lca T (x, z) = lca T (x , z). Together with the fact that x z is an edge in G but not xz, this implies that there is a z ∈ L[σ (z)] such that lca T (x, z ) ≺ T lca T (x, z). This in turn implies lca T (x , z ) ≺ T lca T (x , z), which contradicts that x z is an edge in G. Therefore, Since yz is not an edge in G by assumption and Cor. 2 implies σ (y) / ∈ σ (L (T (v x )), there is a leaf z with color σ (z ) = σ (z) such that lca T (y, z ) ≺ T lca T (y, z). This is only possible if z ∈ L(T (v y )) ∩ L[σ (z)]. Therefore, σ (z) ∈ σ (L(T (v x )))∩σ (L(T (v y ))) and Lemma 2 implies that t μ (u) = .
In summary, lca T (x , y) = lca T (x, y) = u and t μ (u) = for every tree explaining ( G, σ ) and every possible reconciliation map μ from (T , σ ) to any species tree. Thus both x y and x y are u-fp.

Proposition 5 Let ( G, σ ) be a BMG and x y an edge in G with S ∩ (x, y) = ∅. Then x y is either the middle edge of some good quartet zx yz or the first edge in some ugly quartet x yx z or yx y z .
Proof Let (T , σ ) be a leaf-colored tree explaining the BMG ( G, σ ) with symmetric part (G, σ ).
If xz 1 / ∈ E(G), then x yx * z 1 forms an ugly quartet. Now suppose that xz 1 ∈ E(G). Assume that there is an edge T (v y ))) we have, by similar arguments as above, that (z , x) ∈ E( G). Thus, z yxz 1 forms a good quartet. Finally, if there is no such edge yz ∈ E(G) then, in particular, yz 2 / ∈ E(G) and y = y * . In this case, yx y * z 2 forms an ugly quartet.
The example Fig. 14 shows that the converse of Prop. 5 is not true in general. We summarize the results of Props. 1, 2, 4 and 5 in the following Corollary 4 Let ( G, σ ) be a BMG that contains the edge x y. Then, S ∩ (x, y) = ∅ implies that x y is either the middle edge of some good quartet or the first edge of some ugly quartet, which in turn implies that x y is u-fp.

B.4 S ∩ (x, y) = ∅: hourglasses
The case S ∩ (x, y) = ∅ is sufficient to detect the edge x y as u-fp. In this section we turn to the case S ∩ (x, y) = ∅ and show how to identify further u-fp edges.

Definition 13 (Hourglass) An hourglass in a proper vertex-colored graph
Note that Condition (i) rules out arcs between x, x and y, y , respectively, i.e., the only arcs in an hourglass are the ones specified by Conditions (ii) and (iii). An example is shown in Fig. 6(A). Fig. 6(B).

Observation 5 Every hourglass is a BMG since it can be explained by a tree as shown in
We first show that hourglasses cannot appear in a BMG that can be explained by a binary tree.

Lemma 14 If ( G, σ ) is a BMG containing the hourglass [x y
x y ], then every tree Proof By assumption, x y and x y are edges in G, (x, y ), (y, x ) ∈ E( G), and (y , x), (x , y) / ∈ E( G). By Lemma 5, the informative triples x y |x and x y |y thus must be displayed by every tree (T , σ ) that explains ( G, σ ). Thus u x y := lca T (x , y ) ≺ T u x := lca T (x, u x y ) and u x y ≺ T u y := lca T (y, u x y ). Furthermore, u x and u y are both ancestors of u x y and thus comparable w.r.t. T . If u x ≺ T u y , then lca T (x, y ) ≺ T lca T (x, y) which implies that x y cannot form an edge in G; a contradiction. By similar arguments, u y ≺ T u x is not possible and therefore, u x = u y =: u.
Since u x y ≺ T u, there are two distinct children v 1 , v 2 ∈ child T (u) of u such that x T v 1 and u x y T v 2 . Clearly, y / ∈ L(T (v 2 )) since lca T (y, u x y ) = u T v 2 . We also have y / ∈ L(T (v 1 )) since y ∈ L(T (v 1 )) would imply lca T (x, y) T v 1 ≺ T u = lca T (x, u x y ) = lca T (x, y ), contradicting (x, y ) ∈ E( G). Together with y ∈ L(T (u)), this implies the existence of a vertex v 3 ∈ child(u) such that v 3 / ∈ {v 1 , v 2 } and y T v 3 .

The result shows that hourglasses [x y
x y ] can be used to identify false-positive edges x y with S ∩ (x, y) = ∅. ( G, σ ) contains an hourglass [x y

Proposition 6 If a BMG
x y ], then the edge x y is u-fp.
Proof According to Lemma 14, every tree (T , σ ) that explains ( G, σ ) contains a vertex u ∈ V 0 (T ) with three distinct children v 1 , v 2 , and v 3 such that x T v 1 , lca T (x , y ) T v 2 and y T v 3 . Thus, u = lca T (x, y) and σ (x) ∈ σ (L(T (v 1 ))) ∩ σ (L (T (v 2 ))). Hence, we can apply Lemma 10 to conclude that x y is (T , σ )-fp for every tree that explains ( G, σ ). Therefore, the edge x y is u-fp.
Prop. 6 implies that there are u-fp edges that are not contained in a quartet, since an hourglass (see Fig. 6(A)) does not contain a P 4 . We next generalize the concept of hourglasses.

Definition 14 (Hourglass chain) An hourglass chain H in a graph
such that the following two conditions are satisfied for all i ∈ {1, . . . , k − 1}: (H1) y i = x i+1 and y i = x i+1 , and (H2) x i y j is an edge in G for all j ∈ {i + 1, . . . , k} A vertex z is called a left (resp., right) tail of the hourglass chain H if it holds that (z, x 1 ) ∈ E( G) and (z, x 1 ) / ∈ E( G) (resp., (z, y k ) ∈ E( G) and (z, y k ) / ∈ E( G)). We call H tailed if it has a left or right tail.
Note that in contrast to good and bad quartets as well as individual hourglasses, an hourglass chain in ( G, σ ) is not necessarily an induced subgraph.
Hourglass chains are composed of "overlapping" hourglasses. The additional condition that x i y j ∈ E(G) for all 1 ≤ i < j ≤ k ensures that the two pairs x k , y k and x l , y l with k = l cannot lie in the same subtree below the last common ancestor u which is common to all hourglasses in the chain.
Proof We prove the statement by induction on k. For the base case k = 1, observe that the hourglass [x 1 y 1 x 1 y 1 ] together with Lemma 14 implies that there is a vertex u ∈ V 0 (T ) with pairwise distinct children v 0 , v 1 and v 2 such that x 1 T v 0 , lca T (x 1 , y 1 ) T v 1 (thus x 1 , y 1 T v 1 ) and y 1 T v 2 . Now let k > 1 and assume that the statement is true for all hourglass chains containing less than k hourglasses. Let H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] be an hourglass chain. By induction hypothesis, for every subsequence H i| := [x 1 y 1 x 1 y 1 ], . . . , [x i y i x i y i ] of H with 1 ≤ i < k, which by Obs. 6 is again an hourglass chain, the statement is true.
Consider the subsequence H i| with i = k − 1. By assumption, there is a vertex x i+1 y i+1 ] and Lemma 14 imply the existence of a vertex Since v i and v i are both children of u, y i = x i+1 and it holds both that Since σ (y i+1 ) = σ (y i+1 ) by the definition of hourglasses, the latter two arguments contradict x j+1 y i+1 ∈ E(G), which must hold by the definition of hourglass chains. Hence, we can conclude that v i+2 = v j for and 0 ≤ j < i and we set v i+2 := v i+2 . In summary, the statement holds for the hourglass chain H i+1| = H.
It is straightforward to generalize the latter statement to tailed hourglass chains.

Lemma 16
Let H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] be an hourglass chain with left (resp. right) tail z in a BMG ( G, σ ). Then, every tree (T , σ ) that explains ( G, σ ) Suppose that z is a left tail of H. We need to show that z T v 0 . By definition, (z, x 1 ) ∈ E( G), (z, x 1 ) / ∈ E( G), and σ (x 1 ) = σ (x 1 ). Therefore, zx 1 |x 1 is an informative triple for ( G, σ ), and hence lca T (z, Since v 0 is the unique child of u with x 1 ≺ T v 0 , we can conclude that lca T (z, x 1 ) T v 0 and thus, z T v 0 .
If z is a right tail of H, a similar argument using the informative triple z y k |y k , which must be displayed by T because (z, y k ) ∈ E( G) and (z, We are now in the position to show that hourglass chains identify additional u-fp edges that are not contained in a single hourglass.
Lemma 17 Let H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] be an hourglass chain in ( G, σ ), possibly with a left tail z or a right tail z . Then every edge e ∈ {x 1 y k , zy k , x 1 z , zz } ∩ E(G) is u-fp, where G denotes the symmetric part of G.
Proof Let (T , σ ) be an arbitrary tree that explains ( G, σ ). By the definition of hourglass chains, we have k ≥ 1. Hence, the sequence contains at least the hourglass [x 1 y 1 . Furthermore, this lemma also implies z T v 0 if z is a left tail of H, and z T v k+1 if z is a right tail of H. Note that lca T (x 1 , x 1 ) = u, and x 1 and x 1 lie below distinct children of u. More precisely x 1 T v 0 and Moreover, lca T (a, b) = u for every edge e = ab in G that coincides with one of x 1 y k , zy k , x 1 z , and zz . The latter two arguments together with Lemma 10 imply that every such edge is (T , σ )-fp. Since (T , σ ) was chosen arbitrarily, every such edge is also u-fp.
It is important to note that the construction of hourglass chains does not imply that an edge e ∈ {x 1 y k , zy k , x 1 z , zz } must exist in ( G, σ ). Nevertheless, whenever such an edge occurs, it is u-fp. We will take a closer look at the properties of hourglass chains in Sec. D.

C.1 Color-set intersection graphs
In this section, we take a closer look at the trees that explain a given BMG. In particular, we consider the color allocation to the subtrees below each vertex of a tree explaining a given BMG. This leads us to the idea of a color intersection graph.

Definition 15
The color-set intersection graph C T (u) of an inner vertex u of a leafcolored gene tree (T , σ ) is the undirected graph with vertex set V := child T (u) and edge set Shortest paths in the color-set intersection graphs will play an important role in identifying many u-fp edges.

Lemma 18
Let v 1 and v k be two distinct vertices in the same connected component of the color-set intersection graph C T (u) of a leaf-colored gene tree (T , σ ), and let P(v 1 , v k ) = (v 1 , . . . , v k ) be a shortest path in C T (u) connecting v 1 and v k . Then σ (L(T (v i ))) ∩ σ (L(T (v j ))) = ∅ for all i and j satisfying 1 ≤ i < i + 2 ≤ j ≤ k.
Proof Assume, for contradiction, that σ (L(T (v i ))) ∩ σ (L(T (v j ))) = ∅ for some i, j with 1 ≤ i < i + 2 ≤ j ≤ k. Then the edge v i v j must be contained in C T (u), contradicting the fact that P (v 1 , v k ) is a shortest path.
The following lemma establishes a close connection between color-set intersection graphs and hourglass chains.

Lemma 19
Let ( G, σ ) be a BMG that is explained by (T , σ ) and suppose that x, y ∈ L(T ) are two distinct leaves with u := lca T (x, y) and v x , v y ∈ child T (u) such that (i) x T v x and y T v y , and (ii) there is a shortest path

length at least two in C T (u). Then there is an hourglass chain
In particular, precisely one of the following conditions is satisfied: 1. x 1 = x and y k = y; 2. y k = y and z := x is a left tail of H; 3. x 1 = x and z := y is a right tail of H; or 4. z := x is a left tail and z := y is a right tail of H.
We proceed by showing that the BMG G(T , σ ) contains an hourglass chain H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] possibly with left tail z and right tail z such that one of the Conditions 1-4 is satisfied.
For each 1 ≤ i ≤ k, we have c i−1 , c i ∈ σ (L(T (v i ))). Thus Lemma 3 ensures the existence of vertices is an hourglass. We already set x 1 and y k . We furthermore set x i := y i−1 for all 1 < i ≤ k, and y i := x i+1 for all 1 ≤ i < k. Thus ensures that (H1) in Def. 14 is satisfied. Moreover, since σ ( We next show that the induced subgraph G[x i , x i , y i , y i ] is an hourglass for 1 ≤ i ≤ k and thus x i y j is an edge in G for all i < j ≤ k. We also know, by construction, that x i y i is an edge in G. Independent of whether x 1 was constructed based on the cases (A) or (B), we have Likewise, independent of whether y k was constructed based on the cases (A') or (B'), we have From σ (x i ) ∈ σ (L(T (v i−1 ))) and σ (y i ) ∈ σ (L(T (v i+1 ))) we obtain σ (x i ) / ∈ σ (L(T (v i+1 ))) and σ (y i ) / ∈ σ (L(T (v i−1 ))). Thus, there is no y such that σ ( y) = σ (y i ) = σ (y i ) and lca T ( Since j ≥ (i − 1) + 2 and P(v 0 , v k+1 ) is a shortest path, Lemma 18 implies that σ (L(T (v i−1 ))) ∩ σ (L(T (v j ))) = ∅. Thus, there is no y such that σ ( y) = σ (y j ) and lca T (x i , y) ≺ T u = lca T (x i , y j ), and no x such that σ ( x) = σ (x i ) and lca T (y j , x) ≺ T u = lca T (y j , x i ). This implies that (x i , y j ) ∈ E( G) and (y j , x i ) ∈ E( G), respectively. Therefore x i y j is an edge in G for 1 ≤ i < j ≤ k. In summary, (H2) of in Def. 14 is always satisfied.
Hence, if x 1 and y 1 are constructed based on Case (A) and (A'), respectively, we are done.
It remains to show that z and z are a left and a right tail, resp., of the hourglass chain in Case (B) or (B'). First assume Case (B), and thus z = x. We have z, x 1 T v 0 by construction and (z, x 1 ) ∈ E( G) as shown above. Together with x 1 T v 1 , this implies that lca T (z, x 1 ) T v 0 ≺ T u = lca T (z, x 1 ). Using σ (x 1 ) = σ (x 1 ) we therefore obtain (z, x 1 ) / ∈ E( G). and hence z is a left tail of the constructed hourglass chain. Now assume Case (B'), and thus, z = y. We have z , y k T v k+1 and (z , y k ) ∈ E( G) by construction. Together with y k T v k this implies lca T (z , y k ) T v k+1 ≺ T u = lca T (z , y k ). Using σ (y k ) = σ (y k ), we obtain (z , y k ) / ∈ E( G) and hence z is a right tail of the constructed hourglass chain.
In summary, H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] is an hourglass chain, possibly with left tail z and right tail z . Furthermore, precisely one of the Conditions 1-4 in the statement holds by construction.

C.2 Hug-edges and no-hug graphs
Definition 16 An edge x y in a vertex-colored graph ( G, σ ) is a hug-edge if it satisfies at least one of the following conditions: (C1) x y is the middle edge of a good quartet in ( G, σ ); (C2) x y is the first edge of an ugly quartet in ( G, σ ); or (C3) there is an hourglass chain H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] in ( G, σ ), and one of the following cases holds: 1. x 1 = x and y k = y; 2. y k = y and z := x is a left tail of H; 3. x 1 = x and z := y is a right tail of H; or 4. z := x is a left tail and z := y is a right tail of H.
The term hug-edge refers to the fact x y is a particular edge of an hourglass-chain, an ugly quartet, or a good quartet.

Theorem 7
An edge x y in G(T , σ ) with u := lca T (x, y), v x , v y ∈ child T (u), x T v x , and y T v y is a hug-edge if v x and v y belong to the same connected component of C T (u). Moreover, every hug-edge is u-fp.
Proof We show first that x y satisfies one of the Conditions (C1), (C2), or ((C3), and hence is hug-edge. First, note that v x = v y . Moreover, Lemma 4 implies σ (x) / ∈ σ (L(T (v y ))) and σ (y) / ∈ σ (L(T (v x ))). Since by assumption v x , v y belong to the same connected component, there is a shortest path P : T (v y ))) = ∅. By Prop. 5, the edge x y is either the middle edge of a good quartet or the first edge of an ugly quartets in ( G, σ ). Hence, Condition (C1) or (C2) is satisfied. If k > 0, Lemma 19 implies Condition (C3).
If e = x y satisfies (C2), then it is the first edge of some ugly quartet, which w.l.o.g. has the form x yx z . Re-using the arguments in the proof of Prop. 4 shows that there must be two distinct children v 1 and v 2 of vertex u = lca T (x, y) such that σ (L(T (v 1 ))) ∩ σ (L(T (v 2 ))) = ∅.
If e = x y satisfies (C3), then there is a (tailed) hourglass chain H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ], k ≥ 1, in G(T , σ ), such that either x = x 1 or z := x is a left tail of H, and either y = y k or z := y is a right tail of H. In either case, Lemma 16 implies x T v 0 and y T v k+1 . Since x 1 and x 1 lie below distinct children v 0 and v 1 of vertex lca T (x, y) and σ (x 1 ) = σ (x 1 ) by the definition of hourglasses, it holds that σ (L(T (v 0 ))) ∩ σ (L(T (v 1 ))) = ∅.
The fact that all hug-edges are u-fp by Thm. 7 suggests to consider the subgraph of a BMG that is left after removing all these unambiguously recognizable false-positive orthology assignments.
Definition 17 Let ( G, σ ) be a BMG with symmetric part G and let F be the set of its hug-edges. The no-hug graph NH( G, σ ) is the subgraph of G with vertex set V ( G), coloring σ and edge set E(G)\F.
The NH( G, σ ) is therefore the subgraph of the underlying RBMG of G that contains all edges that cannot be identified as u-fp by using only good quartets, ugly quartets and (tailed) hourglass chains as outlined in Thm. 7.

Corollary 5 Let (T , σ ) be a leaf-colored tree and μ a reconciliation map from (T , σ )
to some species tree S. Then, , σ ); and by definition, we have NH ( G(T , σ )) ⊆ G(T , σ ). Now, let x y be an edge in (T , t T ) and thus, t T (lca T (x, y)) = . By definition of t T , we have σ (L(T (v 1 ))) ∩ σ (L(T (v 2 ))) = ∅ for any two distinct v 1 , v 2 ∈ child T (lca T (x, y)). The contraposition of Lemma 20 implies that x y is not a hug-edge and thus an edge of NH( G(T , σ )), which completes the proof.
The no-hug graph still may contain false-positive orthology assignments, i.e., NH( G(T , σ )) = (T , t μ ) does not hold in general. In the following section, we shall see that there are, however, no u-fp edges left in the no-hug graph.

C.3 Resolving least resolved trees
Since every BMG ( G, σ ) at least implicitly contains all information needed to identify its u-fp edges, this is also true for its unique least resolved tree (T * , σ ). It is not always possible, however, to assign an event labeling t to T * such that (T * , t) is the cotree for the correct orthology relation. Fig. 7 shows that T * may not be "resolved enough". To tackle this problem, we analyze the redundant edges of more resolved trees that explain ( G, σ ). Cor. 1 implies that all edges below a speciation vertex are redundant because, by Lemma 2, the color sets of distinct subtrees below a speciation vertex do not overlap. More precisely, we have Observation 8 Let μ be a reconciliation map from (T , σ ) to S and assume that there is a vertex u ∈ V 0 (T ) such that μ(u) ∈ V 0 (S) and thus, t μ (u) = . Then every inner edge uv of T with v ∈ child T (u) is redundant w.r.t. G(T , σ ). Moreover, if an inner edge uv with v ∈ child T (u) is non-redundant, then u must have two children with overlapping color sets, and hence, t μ (u) = .
To identify the vertices in (T * , σ ) that can be expanded to yield a tree that still explains G(T * , σ ), we introduce a particular way of "augmenting" a leaf-colored tree.
Definition 18 Let (T , σ ) be a leaf-colored tree, u be an inner vertex of T , C T (u) the corresponding color-set intersection graph, and C the set of connected components of C T (u). Then the tree T u augmented at vertex u is obtained by applying the following editing steps to T : -If C T (u) is connected, do nothing. -Otherwise, for each C ∈ C with |C| > 1 -introduce a vertex w and attach it as a child of u, i.e., add the edge uw, -for every element v i ∈ C, substitute the edge uv i by the edge wv i .
The augmentation step is trivial if T u = T , in which case we say that no edit step was performed.
An example of an augmentation is shown in Fig. 8. It is easy to see that the tree T u obtained by an augmentation of a phylogenetic tree T is again a phylogenetic tree. The augmentation step at vertex u of T is trivial if and only if either C T (u) is connected or all connected components C ∈ C are singletons, i.e., |C| = 1. If (T u , σ ) is obtained by augmenting (T , σ ) at node u, we denote the set of newly introduced vertices by V ¬T := V (T u )\V (T ). Note that V ¬T = ∅ whenever no edit step was performed.
Since augmentation only inserts vertices between u and its children, it affects neither L(T (u)) nor L(T (v)) for v ∈ child(u). As an immediate consequence we find Observation 9 Let (T , σ ) be a leaf-colored tree, u = v two inner vertices of T , C T (u) the corresponding color-set intersection graph, and (T u , σ ) the tree obtained by augmenting T at u. Then C T u (v) = C T (v).
Lemma 21 Let (T , σ ) be a leaf-colored tree. Let u ∈ V 0 (T ) and T u be the tree after augmenting T at vertex u. If C T (u) is disconnected, then σ (L(T u (w 1 ))) ∩ σ (L(T u (w 2 ))) = ∅ for any two distinct vertices w 1 , w 2 ∈ child T u (u).
Proof By construction, the vertex w i in T u , i = 1, 2, is either a child of u in T or was inserted in the augmentation step. Therefore, the two connected components C 1 and C 2 of C T (u) to which w 1 and w 2 belong are disjoint. Thus σ (L(T (v i )))∩σ (L(T (v j ))) = ∅ for all v i , v j ∈ child T (u) with v i ∈ C 1 and v j ∈ C 2 because otherwise there would be an edge v i v j in C T (u) and thus, C 1 = C 2 . Since w i is either the single vertex in C i or w i has as children the vertices of C i in T u , i ∈ {1, 2}, we conclude that σ (L(T u (w 1 ))) ∩ σ (L(T u (w 2 ))) = ∅.
The following result shows that no further edit step can be performed at vertices that have been newly introduced by a previous augmentation step or have already undergone an augmentation.

Lemma 22
Let (T , σ ) be a leaf-colored tree, u ∈ V 0 (T ), (T u , σ ) the tree obtained by augmenting T at u, and denote by (T uw , σ ) the tree obtained by augmenting T u at w. Then T uw = T u for w = u as well as for all newly introduced vertices, i.e., for all w ∈ V ¬T ∪ {u}.
Proof If T u = T , then V ¬T = ∅ and thus T uu = T u = T . If T u = T , then the definition of the augmentation step at u implies that either C T u (u) is connected or all connected components of C T u (u) are singletons. In either case Lemma 21 ensured that augmentation at u leaves T u unchanged, i.e., T uu = T u . By construction, C T u (w) is connected for w ∈ V ¬T \{u} and thus, we have T uw = T u .
The tree obtained by augmenting a set of inner vertices of (T , σ ) is therefore independent of the order of the augmentation steps.

Lemma 23 For every leaf-colored tree (T , σ ) there is a unique tree (A(T ), σ ) obtained from (T , σ ) by repeated application of augmentation steps until only trivial augmentation steps remain. The tree (A(T ), σ ) is computed by Alg. 1.
Proof Lemma 22 together with Obs. 9 implies that (i) every vertex u in T can be non-trivially augmented at most once, (ii) the newly introduced vertices cannot be non-trivially augmented at all, and (iii) augmentation of two distinct inner vertices of T yields the same result irrespective of the order of the augmentation steps. Thus, (A(T ), σ ) is unique. The correctness of Alg. 1 now follows immediately. We finally show that augmentation does not affect the underlying BMG.

Proposition 7 For every leaf-colored tree (T , σ ), it holds G(T , σ ) = G(A(T ), σ ).
Proof Let u ∈ V 0 (T ) and T u be the tree after augmenting T at vertex u. Put A := {uw | w ∈ V ¬T } and note that all edges of T u in A are inner edges. Now consider e ∈ A. Since w ∈ V ¬T , an edit step was performed to obtain w and thus, |C| > 1 in C T (u). Lemma 21 and |C| > 1 imply that for any v ∈ child T u (u) with v = w we have σ (L(T u (v ))) ∩ σ (L(T u (w))) = ∅. Thus, Cor. 1 implies that the edge uw is redundant in (T u , σ ) w.r.t. G (T , σ ).
Denoting by T u A the tree obtained from T u by contraction of all edges in A, we obtain (T , σ ) = (T u A , σ ). Lemma 9 now implies G(T u , σ ) = G(T u A , σ ) = G(T , σ ) for every augmentation step. By Lemma 23, we can repeat this argument for every augmentation in the arbitrary order in which G(A(T ), σ ) is obtained from G(T , σ ), and thus G(A(T ), σ ) = G(T , σ ).

C.4 Extremal labeling of augmented trees
While the least resolved tree in general cannot support an event labeling that properly reflects the underlying true history of a gene family, we shall see here that the augmented tree (A(T ), σ ) does feature sufficient resolution. To this end, we investigate the extremal event labeling of (A(T ), σ ).

Lemma 25 Let t := t A(T ) be the extremal event labeling of the augmented tree (A(T ), σ ) obtained from (T , σ ) and let u be some vertex of A(T ). Then it holds t(u) = if and only if C A(T ) (u) is connected.
Proof By the definitions of the extremal event labeling and C A(T ) (u), the 'if'-direction is clear. Now suppose that t(u) = . There are two possibilities: (1) u ∈ V 0 (T ). If C T (u) is connected, then C A(T ) (u) = C T (u). Otherwise, Lemma 21 implies that σ (L(A(T )(w 1 ))) ∩ σ (L(A(T )(w 2 ))) = ∅ for all w 1 , w 2 ∈ child A(T ) (u), thus the definition of the extremal event labeling implies t(u) = , a contradiction.
(2) u ∈ V ¬T , i.e., u is newly created by augmenting some u ∈ V 0 (T ), hence C T (u) is connected and, by Obs. 9 and Lemma 22, C A(T ) (u) is connected.
For later reference, we need the following Lemma 26 Let ( G, σ ) be a BMG, (T * , σ ) its least resolved tree, and t := t A(T * ) the extremal event labeling of the augmented tree (A(T * ), σ ). Then, (A(T * ), t, σ ) does not contain adjacent speciation vertices, i.e., if t(u) = for a vertex u of A(T * ), then t(v) = for any of its non-leaf children v ∈ child A(T * ) (u)\L(A(T * )).
Proof Set A := A(T * ) and note that, by Prop. 7, (A, σ ) explains ( G, σ ). Assume, for contradiction, that there is an inner edge uv in A with v ≺ A u such that t(u) = t(v) = . By the definition of the extremal event labeling t, we have σ (L(A(v))) ∩ σ (L(A(v ))) = ∅ for any v ∈ child A (u)\{v}. Together with Cor. 1 this implies that uv is redundant for ( G, σ ), and hence, not an edge in the least resolved tree (T * , σ ). Now consider the augmentation in which the edge uv, and thus vertex v was created; resulting in a tree (T , σ ). By the definition of augmenting (Def. 18), it clearly holds that C T (v) is connected. By Lemma 22, the edges adjacent to v do not change in any subsequent augmentation. Thus C A (v) must be connected as well. Lemma 25 now implies that t(v) = ; a contradiction.  (x, y). By definition of the extremal event labeling, σ (L(A(T * )(v 1 ))) ∩ σ (L(A(T * )(v 2 ))) = ∅ for all two distinct vertices v 1 , v 2 ∈ child A(T * ) (u). The latter is true, in particular, for the two children v x , v y ∈ child A(T * ) (u) with x A(T * ) v x and y A(T * ) v y . Therefore, σ (x) / ∈ σ (L(A(T * )(v y ))) and σ (y) / ∈ σ (L(A(T * )(v x ))). We conclude that x and y are reciprocal best matches in A(T * ). Finally, ( G, σ ) = G(A(T * ), σ ) implies that x y is an edge in G. Proof Let (G, σ ) be the symmetric part of ( G = (V , E), σ ). For simplicity, we write G := (A(T * ), t) and G NH := (V , E(NH( G, σ ))). Recall that, by definition, G NH ⊆ G and, by Lemma 27, G ⊆ G. Finally, as G contains only edges of G, we have G ⊆ G. Let F := E(G)\E(G NH ) be the set of all edges of G that are hug-edges, and let F := E(G)\E(G ) be the set of all edges in G that do not form orthologous pairs. Since G NH , G ⊆ G it suffices to verify that F = F in order to show that (G , σ ) = (G NH , σ ).
Assume e = x y ∈ F . Hence, x y / ∈ E(G ) and therefore, t(u) = where u := lca A(T * ) (x, y). By Lemma 25, C A(T * ) (u) has exactly one connected component. This together with Thm. 7 implies that x y is a hug-edge and thus, x y ∈ F, and hence F ⊆ F.

Theorem 11
An edge x y in a BMG ( G, σ ) is u-fp if and only if x y is a hug-edge of ( G, σ ).
Proof Let ( G, σ ) be a BMG, (T * , σ ) its unique least resolved tree, and t := t A(T * ) the extremal event labeling of the augmented tree (A(T * ), σ ). As shown in the proof of Thm. 10, every edge x y of of the symmetric part G that is not a hug-edge satisfies x y ∈ E(G ) and therefore t(u) = , where u := lca A(T * ) (x, y). Lemma 10 implies that e is not (A(T * ), σ )-fp and thus, in particular, not u-fp. That is, all edges in (G , σ ) = (G NH , σ ) are non-u-fp edges. Moreover, Thm. 7 implies that all hugedges in E(G)\E(G NH ) are u-fp. Since (G NH , σ ) does not contain u-fp edges, all u-fp edges must also be hug-edges, which completes the proof.
We next show that NH( G, σ ) can be computed in polynomial time. In fact, the effort is dominated by computing the least resolved tree (T * , σ ) for a given BMG.

C.5 Additional unidentified false-positives
For an event-labeled, leaf-colored tree (T , t, σ ), we consider the triple set Moreover, we will need the following characterization of biologically plausible eventlabeled gene trees: Lemma 29 Let ( G, σ ) be a BMG with LRT (T * , σ ) and let T be given by Eq. (4). Then, the following statements are equivalent: (1) There is no reconciliation map μ from (A(T * ), t, σ ) to any species tree such that t μ = t.
(2) For all trees (T , t, σ ) in T there is no reconciliation map μ from (T , t, σ ) to any species tree such that t μ = t.
In particular, Condition (1) can be verified in polynomial time.
Using the arguments in the proof of Thm. 12 and Thm. 13 we find that Condition (1) can be verified in polynomial time by checking whether S(A(T * ), t, σ ) is incompatible.
It is possible, therefore to check in polynomial time whether the cograph NH( G, σ ) is a biologically feasible orthology relation for ( G, σ ) or whether NH( G, σ ) contains further false-positive edges. Now consider again a true evolutionary scenario ( T , t, σ ). While T always displays the LRT (T * , σ ) of the BMG G( T , σ ), it does not necessarily display the augmented tree A(T * ). As an example consider the scenario in Fig. 7. Augmenting the only multifurcation in this case further resolves the root of T * and thus yields a tree that is not displayed by T . It is interesting to ask, therefore, whether there are situations in which T does display A(T * ).
In Case (a), Lemma 28 together with (T , t, σ ) ∈ T immediately implies that ab|c is also displayed by T .
In Case (b), we have t(u) = . Consider the child v ∈ child A(T * ) (u) with a, b ≺ A(T * ) v. Assume, for contradiction, that v is not a vertex in T * , i.e., it was newly created by augmenting a vertex u . We have u = u by Lemma 22 since u cannot be (non-trivially) augmented any further. Since A(T * ) does not depend on the order of augmentation steps, we may assume w.l.o.g. that v was created in the first augmentation step; resulting in the augmented tree T u . Def. 18 implies that C T (u) is disconnected. Together with Lemma 21, this implies σ (L(T u (w 1 )))∩σ (L(T u (w 2 ))) = ∅ for any two distinct vertices w 1 , w 2 ∈ child T u (u). This must still hold for (A(T * ), σ ) since the edges uw, where w ∈ child T u (u) correspond to the vertices that have been newly introduced in the first augmentation step, do not change in any subsequent augmentation due to Lemma 22. The definition of the extremal event labeling now implies t(u) = ; a contradiction. Therefore, we conclude that v is a vertex in T * , and in particular, a, b ∈ L(T * (v)) and c / ∈ L(T * (v)), which in turn implies that ab|c is displayed by T * . From T * ≤ T we finally conclude that T also displays ab|c. Denoting by r (T ) the set of all triples displayed by T we therefore have r (A(T * )) ⊆ r (T ). Finally, we apply Thm. 1 of Bryant and Steel (1995) to conclude that A(T * ) is displayed by T .

D.1 Hourglass-free BMGs
Definition 20 A BMG ( G, σ ) is hourglass-free if it does not contain an hourglass as an induced subgraph.
Proof First assume that ( G, σ ) contains the hourglass [x y x y ] as an induced subgraph. Then by Lemma 14, (T , σ ) contains a vertex u ∈ V 0 (T ) with three distinct children v 1 , v 2 , and v 3 such that x T v 1 , lca T (x , y ) T v 2 and y T v 3 . Putting r := σ (x) = σ (x ) and s := σ (y) = σ (y ) immediately implies Condition (1). Now, assume for contradiction that Condition (2) is violated and thus s ∈ σ (L(T (v 1 ))) or r ∈ σ (L(T (v 3 ))). If s ∈ σ (L(T (v 1 ))), then there is a leaf y ≺ T v 1 with σ (y ) = s. In this case, however, lca(x, y ) T v 1 ≺ T u = lca T (x, y ) implies that (x, y ) cannot be an arc in ( G, σ ); a contradiction to [x y x y ] being an hourglass. By similar arguments, r ∈ σ (L(T (v 3 ))) is not possible. Therefore, Condition (2) must be satisfied. Now assume that there is a vertex u ∈ V 0 (T ) with pairwise distinct children v 1 , v 2 , and v 3 and two distinct colors r and s satisfying Conditions (1) and (2). It is now straightforward to see that ( G, σ ) contains an hourglass: Condition (1) immediately implies the existence of vertices x ∈ L[r ] ∩ L(T (v 1 )) and y ∈ L[s] ∩ L(T (v 3 )).
Moreover, r , s ∈ σ (L(T (v 2 ))) together with Lemma 3 imply that there is an edge x y in ( G, σ ) with x ∈ L[r ] ∩ L(T (v 2 )) and y ∈ L[s] ∩ L(T (v 2 )). Clearly, the vertices in {x, x , y, y } are pairwise distinct. By Condition (2) and the location of the four leaves, we obtain the arcs (x, y ), (x, y), (y, x ), and (y, x), and thus, in particular the edge x y. Since T (v 2 ) contains both colors r and s, we can furthermore conclude that (x , y) and (y , x) are not arcs in ( G, σ ). In summary, the subgraph of ( G, σ ) induced by the set {x, x , y, y } is an hourglass [x y x y ].
In the following a tree (T , σ ) is called refinable if there is a proper refinement (T , σ ) of (T , σ ), i.e., T ≤ T and T = T , such that G(T , σ ) = G(T , σ ). Otherwise, (T , σ ) is non-refinable. An inner vertex of a tree is non-refinable if it cannot be refined without changing the best match graph induced by the tree.
Clearly, for every BMG ( G, σ ), there is a tree that has the maximum number of vertices among all trees that explain ( G, σ ) and thus, a tree that cannot be further resolved. Hence, every BMG can be explained by a non-refinable tree. We will need the following useful property of non-refinable vertices: Lemma 32 Let ( G, σ ) be a BMG explained by a tree (T , σ ), and let u ∈ V 0 (T ) be a non-refinable vertex of (T , σ ). Then, for any proper subset C child T (u) with |C| ≥ 2, there are two distinct vertices v, v ∈ C, a vertex v ∈ child T (u)\C, and two vertices a T v and b T v such that (a, b) ∈ E( G) and σ (b) ∈ σ (L(T (v ))).
Proof First note that the statement is trivially true if u is binary, since then there is no proper subset C child T (u) such that |C| ≥ 2. Thus, assume |child T (u)| ≥ 3 in the following.
We refine (T , σ ) at vertex u as follows: Take an arbitrary subset C child T (u) such that |C| ≥ 2 (which exists since |child T (u)| ≥ 3) and place all vertices in C as the children of a new vertex w, and connect w as a child of u. Since u is a nonrefinable vertex of (T , σ ), this refinement leads to a tree (T , σ ) that does not explain ( G, σ ), and therefore, the inner edge uw must be non-redundant w.r.t. G(T , σ ). By Lemma 7, there must be an arc (a, b) in G(T , σ ) such that lca T (a, b) = w and σ (b) ∈ σ (L(T (u))\L(T (w))). In particular, lca T (a, b) = w implies that a T v and b T v for two distinct vertices v, v ∈ child T (w) = C. Note that (T , σ ) can be obtained from (T , σ ) by contraction of the edge uw. Hence, we can apply Lemma 8 to conclude that G(T , σ ) ⊆ ( G, σ ). Therefore, (a, b) ∈ E( G). Taking the latter arguments together, for any subset C child T (u) with |C| ≥ 2, there are vertices

Proposition 8 A BMG ( G, σ ) can be explained by a binary tree if and only if it is hourglass-free.
Proof If the BMG ( G, σ ) can be explained by a binary tree, it must be hourglass-free as a consequence of Lemma 14. To prove the converse, we assume, for contradiction, that ( G, σ ) is hourglass-free and cannot be explained by any binary tree. Then there is a nonrefinable non-binary tree (T , σ ) that explains ( G, σ ). By construction, furthermore, T contains a non-binary vertex u ∈ V 0 (T ), which by assumption is non-refinable.
The key device for our proof are pairs (M, N) where M := {v 1 , . . . , v k } is an ordered set of k ≥ 2 pairwise distinct children of u and N := {c 1 , . . . , c k−1 } is an ordered set of k − 1 pairwise distinct colors. We call (M, N) an hourglass-free pair (hf-pair) of order k for u if the following conditions are satisfied: N) is an hf-pair of order k, then Condition (i) implies by construction that N ⊆ σ (L(T (v k−1 ))). Therefore, (M = (v 1 , . . . , v k , v k−1 ), N) is also an hf-pair where M is obtained from M by exchanging the positions of its last two elements. Hf-pairs and the following arguments are illustrated in Fig. 15. In order to obtain the desired contradiction, we show by induction that the children of the non-binary, non-refinable vertex u harbor hf-pairs of arbitrary large order k. Base case. There is an hf-pair (M, N) of order 2 for u.

Proof of Claim
Consider an arbitrary subset {v, v } child T (u) consisting of two distinct children v and v of the non-binary vertex u. By Lemma 32 and since u is nonrefinable, there are vertices a T v and b T v such that w.l.o.g. (a, b) ∈ E( G) and σ (b) ∈ σ (L(T (v ))) for some v ∈ child T (u)\{v, v }. The latter implies that there is a vertex b T v of color σ (b). Clearly, b and b are distinct and the color σ (b) is also present in the subtree T (v ). Thus we can set M := (v 1 := v , v 2 := v ) and N := (c 1 := σ (b)). It is an easy task to verify that (M, N) satisfies Conditions (i)-(iii).

Induction step.
The existence of an hf-pair of order k implies the existence of an hf-pair of order k + 1 for u. Let (M = (v 1 ,. . . ,v k ), N = (c 1 , . . . , c k−1 )) be an hf-pair, and consider the set {v k−1 , v k } child T (u). By Lemma 32 and since u is non-refinable, there are again vertices a T v and b T v for distinct v, v ∈ {v k−1 , v k } such that (a, b) ∈ E( G) and σ (b) ∈ σ (L(T (v ))) for some v ∈ child T (u)\{v k−1 , v k }. We can assume w.l.o.g. that a T v = v k−1 and b T v = v k since otherwise we can simply swap v k−1 and v k in the ordered set M as argued above. Since (a, b) is an arc in ( G, σ ) and lca T (a, b) = u, the color σ (b) cannot be present in the subtree T (v k−1 ). Since N ⊆ σ (L(T (v k−1 ))) and σ (b) / ∈ σ (L(T (v k−1 ))), we conclude that σ (b) / ∈ N. We continue to show that v is distinct from all elements in M. Clearly, in the case k = 2, v is distinct from all elements in M = {v 1 , v 2 } = {v, v } by construction. Now let k > 2 and assume, for contradiction, that there is a vertex v j ∈ {v 1 , . . . , v k−2 } such that σ (b) ∈ σ (L(T (v j ))). In this case, j < k − 1 and Condition (ii) imply that c k−1 / ∈ σ (L(T (v j ))). In addition, we have c k−1 ∈ σ (L(T (v k−1 ))) and c k−1 ∈ σ (L(T (v k ))) by Conditions (i) and (iii), respectively. Recall that v = v k . In summary, we obtain three distinct vertices v j , v k , v k−1 and two distinct colors σ (b) and c k−1 satisfying Conditions (1) and (2) in Lemma 31, which implies that ( G, σ ) contains an hourglass; a contradiction. Hence, σ (b) / ∈ σ (L(T (v j ))) for all j ∈ {1, . . . , k − 2}. This implies that v is distinct from v 1 , . . . , v k−2 . Moreover, by construction, v is distinct from v k−1 and v k . In summary, v is therefore distinct from all elements in M. Two examples of trees whose BMGs G(T , σ ) contain a hexagon x 1 x 2 x 3 x 4 x 5 x 6 . There are exactly two distinct possibilities for the placement of the non-symmetric arcs in the subgraph of the BMG induced by the hexagon

Proof of Claim
x 1 x 2 . . . x 6 such that any three consecutive vertices of C 6 have pairwise distinct colors, i.e., σ (x i ) = σ (x i + 3), 1 ≤ i ≤ 3. Since hexagons contain P 4 s and, by (Geiß et al. 2020c, Lemma 32), any P 4 is either a good or a bad quartet, there are exactly two possible induced subgraphs spanned by a hexagon C 6 = x 1 x 2 . . . x 6 , which are shown in Fig. 16. A graph ( G, σ ) is hexagon-free if it does not contain a hexagon.

Lemma 33 Every hourglass-free BMG ( G, σ ) is hexagon-free.
Proof By Prop. 8, every hourglass-free BMG ( G, σ ) can be explained by a binary tree. Lemma 9 in Geiß et al. (2020b) implies that hexagons can only be explained by non-binary trees. Hence, ( G, σ ) must be hexagon-free.
Clearly, the converse of Lemma 33 is not always satisfied, since, by Obs. 5, an hourglass is a BMG without hexagons.
A very useful observation in previous work is the fact that every 3-colored vertex induced subgraph of an RBMG (G, σ ) is again an RBMG (Geiß et al. 2020c, Thm. 7). Furthermore, the connected components (C, σ ) of every 3-colored vertex induced subgraph of (G, σ ) belong to precisely one of the three types (Geiß et al. 2020c, Thm. 5): Type (A) (C, σ ) contains a K 3 on three colors but no induced P 4 . Type (B) (C, σ ) contains an induced P 4 on three colors whose endpoints have the same color, but no induced cycle C n on n ≥ 5 vertices. Type (C) (C, σ ) contains a hexagon.
The graphs for which all such 3-colored connected components are of Type (A) are exactly the RBMGs that are cographs, or co-RBMGs for short (Geiß et al. 2020c, Thm. 8 and Remark 2). Together with Lemma 33, this classification immediately implies Corollary 7 Let ( G, σ ) be an hourglass-free BMG. Then its symmetric part (G, σ ) is either a co-RBMG or it contains an induced P 4 on three colors whose endpoints have the same color, but no induced cycle C n on n ≥ 5 vertices.
Since all u-fp edges in an hourglass-free BMG are contained in quartets, we have Corollary 8 Let ( G, σ ) be an hourglass-free BMG. Then its symmetric part (G, σ ) is a co-RBMG if and only if there are no u-fp edges in ( G, σ ).
Proof Since (G, σ ) is a cograph, it contains no induced P 4 s and thus, ( G, σ ) contains no good or ugly quartets. By Thm. 11, all hug-edges are determined by hourglass chains and good or ugly quartets. Since none of them is contained in ( G, σ ), it also does not contain u-fp edges. Conversely, suppose that ( G, σ ) contains no u-fp edges. Then, by Thm. 10, (G, σ ) = NH( G, σ ) is an orthology graph and thus, by Thm. 1, a cograph.

D.2 u-fp edges in hourglass chains
The situation is much more complicated in the presence of hourglasses. We start by providing sufficient conditions for u-fp edges that are identified by hourglass chains.
Proposition 9 Let H = [x 1 y 1 x 1 y 1 ], . . . , [x k y k x k y k ] be an hourglass chain in ( G, σ ), possibly with a left tail z or a right tail z . Then, an edge in G is u-fp if it is contained in the set Proof Let (T , σ ) be an arbitrary tree that explains ( G, σ ). By analogous arguments as in the proof of Lemma 17 and by Lemma 16, there is a vertex u ∈ V 0 (T ) with pairwise distinct children v 0 , v 1 , . . . , v k , v k+1 such that it holds x 1 ∈ L(T (v 0 )), y k ∈ L(T (v k+1 )) and, for all 1 ≤ i ≤ k, we have x i , y i ∈ L(T (v i )). Since x i+1 = y i and x i+1 = y i by definition of hourglass chains, it is an easy task to verify that for all edges e = ab ∈ F the vertices a and b are located below distinct children of u and thus, lca T (a, b) = u for all such edges. As argued in the proof of Lemma 17, we have σ (L(T (v 0 ))) ∩ σ (L(T (v 1 ))) = ∅. The latter arguments together with Lemma 10 imply that every edge in F is u-fp.
Figs. 6 and 17 furthermore show that hourglass chains identify false-positive edges that are not associated with quartets in the BMG: The BMG in Fig. 6(A) has the u-fp edge x y, and the BMG in Fig. 17(B) contains the u-fp edges x 1 y 2 , x 1 z and x 1 z . A careful investigation shows that these edges are either not even part of an induced P 4 (such as x y in Fig. 6 and x 1 z in Fig. 17), or at least not identifiable as u-fp via good, bad or ugly quartets according to Props. 2, 3 and 4, as it is the case for x 1 y 2 and x 1 z in Fig. 17.

D.3 Four-colored P 4 s
Geiß et al (2020c, Thm. 8) established that the RBMG (G, σ ) is a co-RBMG, i.e., a cograph, if and only if every subgraph induced on three colors is a cograph. Therefore, if (G, σ ) contains an induced 4-colored P 4 , it also contains an induced 3-colored P 4 . For hourglass-free BMGs ( G, σ ) it is clear that a 4-colored P 4 always overlaps with

Fig. 18
The symmetric part of the BMG ( G, σ ) contains the 4-colored induced P 4 abcd . None of its edges is the middle edge of a good quartet or the first edge of an ugly quartet. According to Lemma 34, there is the bad quartet abca d that contains as first edge the edge ab a 3-colored P 4 : In this case NH( G, σ ) is obtained by deleting middle edges of good quartets and first edges of ugly quartets. Since NH( G, σ ) is a cograph, there is no P 4 left, and thus at least one edge of any 4-colored P 4 was among the deleted edges. It is natural to ask whether this is true for BMGs in general. Fig. 18 shows that good and ugly quartets are not sufficient on their own: there are 4-colored P 4 s that do not overlap with the middle edge of a good quartet or the first edge of an ugly quartet. On the other hand, it is clear that at least one of its edges is u-fp. This does not imply, however, that the u-fp edges in a 4-colored P 4 are also edges of 3-colored P 4 s.
Still, in the context of cograph-editing approaches it is of interest whether the 3colored P 4 -s are sufficient. In the following we provide an affirmative answer.
Lemma 34 Let ( G, σ ) be a BMG and P a 4-colored induced P 4 in the symmetric part of ( G, σ ). Then at least one of the edges of P is either the middle edge of some good quartet or the first edge of a bad or ugly quartet in ( G, σ ).
Proof Let (T , σ ) be an arbitrary tree that explains ( G, σ ) and suppose that P := abcd is a 4-colored induced P 4 in the symmetric part (G, σ ).
If one of the edges ab, bc, or cd of P is the middle edge of some good quartet or the first edge of some ugly quartet, then we are done. Hence, we assume in the following that this is not the case and show that at least one of the edges of P is the first edge in a bad quartet.
By contraposition of Prop. 5, we have S ∩ (a, b) = ∅, S ∩ (b, c) = ∅ and S ∩ (c, d) = ∅. We set v := lca T (b, c) with children v b , v c ∈ child T (v) such that b T v b and c T v c , and w := lca T (a, b) with children w a , w b ∈ child T (w) such that a T w a and b T w b . Note, that v, v b , w, and w b are pairwise comparable, since they are all ancestors of b.
We show that w = v. Assume, for contradiction, that (i) w ≺ T v or (ii) v ≺ T w. In Case (i), we have w a ≺ T w T v b and thus, σ (a) ∈ σ (L(T (v b ))). Hence, as S ∩ (b, c) = ∅, it must hold that σ (a) / ∈ σ (L(T (v c ))) and σ (c) / ∈ σ (L(T (v b ))). Lemma 4 implies ac ∈ E(G). But then P is not an induced P 4 ; a contradiction. In Case (ii), we have v c T v w b and thus, σ (c) ∈ σ (L(T (w b ))). Since S ∩ (a, b) = ∅ we thus have σ (c) / ∈ σ (L(T (w a ))) and σ (a) / ∈ σ (L(T (w b ))). By Lemma 4, ac ∈ E(G); again a contradiction. Thus w = v. Analogous arguments can be used to establish lca T (c, d) = v. We therefore have v = lca T (a, b) = lca T (b, c) = lca T (c, d). In the following v x denotes the child of v with x T v x for x ∈ {a, b, c, d}.
We next show that v a , v b , v c , and v d are pairwise distinct. Fist, assume for contradiction that v a = v c . Together with S ∩ (c, d) = ∅, this assumption implies that σ (a) / ∈ σ (L(T (v d ))) and σ (d) / ∈ σ (L(T (v c ))). By Lemma 4, ad ∈ E(G), contradicting the assumption that P is an induced P 4 . Hence, v a = v c . By symmetry of P, we can use similar arguments to conclude that v b = v d . Finally, assume for contradiction that v a = v d . Then, σ (d) ∈ σ (L(T (v a ))). Hence, S ∩ (a, b) = ∅ implies that σ (d) / ∈ σ (L(T (v b ))) and σ (b) / ∈ σ (L(T (v d ))). Again Lemma 4 implies bd ∈ E(G); a contradiction. In summary, v a , v b , v c , and v d must be pairwise distinct.
We claim σ (c) ∈ σ (L(T (v a ))). Since ad / ∈ E(G) and lca T (a, d) = v, Lemma 4 implies that σ (a) ∈ σ (L(T (v d ))) or σ (d) ∈ σ (L(T (v a ))). By symmetry of P, we can w.l.o.g. assume that σ (a) ∈ σ (L(T (v d ))) and thus, there is a vertex a d ∈ L(T (v d )) with σ (a d ) = σ (a). In this case, S ∩ (c, d) = ∅ implies that σ (a) / ∈ σ (L(T (v c ))). This together with ac / ∈ E(G) and Lemma 4 implies that σ (c) ∈ σ (L(T (v a ))). We claim σ (d) ∈ σ (L(T (v a ))). We assume for contradiction that this is not the case and show that this implies the existence of an ugly quartet cdc a containing cd as its first edge, which leads to a contradiction to our initial assumption that none of the edges in P is the first, resp., middle edge of an ugly, resp., good quartet. To see this, note that σ (a), σ (c) ∈ σ (L(T (v a ))) and Lemma 3 imply that there is an edge a c for two vertices a , c ≺ T v a with σ (a ) = σ (a) and σ (c ) = σ (c). Since σ (a) = σ (a )