Complete Edge-Colored Permutation Graphs

We introduce the concept of complete edge-colored permutation graphs as complete graphs that are the edge-disjoint union of"classical"permutation graphs. We show that a graph $G=(V,E)$ is a complete edge-colored permutation graph if and only if each monochromatic subgraph of $G$ is a"classical"permutation graph and $G$ does not contain a triangle with~$3$ different colors. Using the modular decomposition as a framework we demonstrate that complete edge-colored permutation graphs are characterized in terms of their strong prime modules, which induce also complete edge-colored permutation graphs. This leads to an $\mathcal{O}(|V|^2)$-time recognition algorithm. We show, moreover, that complete edge-colored permutation graphs form a superclass of so-called symbolic ultrametrics and that the coloring of such graphs is always a Gallai coloring.


Introduction
Permutations model the rearrangement of an ordered sequence of objects. Thus they play an important role in card shuffling [2], comparative genomics [9,29,42], and combinatorial optimization [12]. The effect of a permutation can be illustrated in a permutation graph [56] that contains the elements as vertices and that connects two vertices with an edge if the corresponding elements are reversed by the permutation.
The graph class of permutation graphs is of considerable theoretical interest [15,33] because many computationally intractable problems can be solved efficiently on permutation graphs. For example, hamiltonian-cycle (given a graph, is there a cycle containing every vertex?) [20], feedback-vertexset (can we transform the graph into a forest by deleting at most k vertices?) [14], or maximumindependent-set (can we find an independent set of largest possible size for a given graph?) [49] can be solved efficiently on permutation graphs. Furthermore, permutation graphs can be recognized in linear time [19,53] and several characterizations of permutation graphs have been established [3,15,21,31,55].
Multiple permutations over the same set of elements can be represented in a single edge-colored graph by taking the edge-union of the corresponding permutation graphs and assigning to each edge a color that uniquely identifies the underlying permutation. In particular, if the edge sets of the underlying permutation graphs are disjoint, then, each edge obtains a unique label (or "color") in the resulting graph. For certain sets of permutation graphs, this procedure ends up with a complete edge-colored graph, a class of graphs that has received considerable attention as symmetric 2-structures [22,23,25,27,44].
In this article we study the reverse direction: Given a complete edge-colored graph, does it represent a set of permutations? In a graph theoretic sense, we are interested in the structure of graphs that can be generated as superpositions of permutation graphs. For instance, we may ask: Do the induced subgraphs of such graphs have certain interesting properties? Are there forbidden structures? Which graph classes are a superset of such colored permutation graphs?

Contribution I: A Characterization of Complete Edge-Colored Permutation Graphs
Our first contribution is a collection of characterizations of complete edge-colored permutation graphs (graph of the just sketched kind; a formal definition is given in Section 3). We first show that these graphs are hereditary, i. e., each induced subgraph of a complete edge-colored permutation graph is again a complete edge-colored permutation graph.
Furthermore, we provide a characterization that is closely related to Gallai colorings: A complete edge-colored graph is a complete edge-colored permutation graph if and only if all its monochromatic subgraphs are "classical" permutation graphs and it does not contain a rainbow triangle, i. e., a triangle with three distinct edge colors.
Finally, we provide two characterizations in terms of the modular decomposition: A complete edgecolored graph is a complete edge-colored permutation graph if and only if the quotient graph of each strong module is a complete edge-colored permutation graph. Moreover, a complete edge-colored graph is a complete edge-colored permutation graph if and only if the quotient graph of each strong prime module is a complete edge-colored permutation graph.

Contribution II: Recognition of Complete Edge-Colored Permutation Graphs
We prove that complete edge-colored permutation graphs G = (V, E) can be recognized in O(|V | 2 )-time and, in the affirmative case, the underlying permutations can be constructed within the same time complexity.
Contribution III: Connection to other Graph Classes We provide a classification of the class of complete edge-colored permutation graphs with respect to other graph classes. We show that the coloring of each complete edge-colored permutation graph is a Gallai coloring, i. e., it is a complete edge-colored graph that does not contain a rainbow triangle. Furthermore, we prove that every graph representation of a symbolic ultrametric, i. e., a graph that is based on sets of certain symmetric binary relations, is also a complete edge-colored permutation graph. Moreover, we show how symbolic ultrametrics, complete edge-colored graphs, and so-called separable permutations are related.
Related Work Permutation graphs were already characterized in 1976 in terms of forbidden subgraphs [31] and in a number of other characterizations, see for instance [15,33]. Although many computationally intractable problems become tractable on permutation graphs, this is not the case for some coloring problems such as the problem to determine the achromatic number [11] or the cochromatic number [58]. There are also many problems for which the complexity on permutations graphs is still unknown, for instance determining the edge search number [32]. A general overview on permutation graphs can be found in [15,33].
The idea to investigate graphs whose edge set can be decomposed into a set of permutation graphs is not new; in fact, not necessarily complete versions of those graphs were studied by Golumbic et al. in the 1980s [34]. It was shown that the complement of such a graph is a comparability graph, i. e., a graph that corresponds to a strict partially ordered set. In addition, the authors investigated the problem to find a minimum number of permutations whose edge-union forms a given graph. For more information on those graphs, the reader is referred to [33].
The investigation of complete edge-colored graphs without rainbow triangles also has a long history. A complete graph is said to admit a Gallai coloring with k colors, if its edges can be colored with k colors without creating a rainbow triangle [39]. It is an active field of research to study when such a coloring may exist [4,36] and what properties such colorings have [5][6][7]. For example, a Gallai coloring of the Kn, i. e., the complete graph with n ∈ N vertices, contains at most n − 1 colors [28]. Another well-known property is that those graphs can be obtained by substituting complete graphs with Gallai colorings into vertices of 2-edge-colored complete graphs [16,31,39]. A survey on complete edge-colored graphs that admit a Gallai coloring can be found e. g. in [30,35,48].
Symbolic ultrametrics [10] are symmetric binary relations that are closely related to vertex-colored trees. They were recently used in phylogenomics for the characterization of homology relations between genes [43,47]. The graph representation of a symbolic ultrametric can be considered as an edge-colored undirected graph in which each vertex corresponds to a leaf in the corresponding vertex-colored tree. Two vertices x and y of this graph are connected by an edge of a specific color if the last common ancestor of the corresponding leafs x and y in the tree has that specific color. Building upon the results of [10,57], these graphs were studied intensively in recent years, see for instance [43,[45][46][47]52] and references therein. They are of central interest in phylogenomics as their topology can be represented by an event-annotated phylogenetic tree of the given genetic sequences [10,57]. It has recently been shown that the graph representation of a symbolic ultrametric is a generalization of cographs [43], which are graphs that do not contain an induced path on four vertices [18]. In addition, the authors have characterized these graphs in terms of forbidden subgraphs.
Many results that are utilized in this contribution, i. e., the principles of modular decomposition of complete edge-colored graphs, are based on the theory of 2-structures which was first introduced by Ehrenfeucht and Rozenberg [22,23]. The notion of a 2-structure can be seen as a generalization of the notion of a graph and, thus, it provides a convenient framework for studying graphs. In particular, 2-structures facilitate the deduction of strong decomposition theorems for graphs, since they allow to represent graphs hierarchically as trees [26]. For more information and surveys on 2-structures see [25,27].
For an overview on modular graph decompositions we refer to the survey by Habib and Paul [40], which summarizes the algorithmic ideas and techniques that arose from these decompositions. Various results are known that connect permutation graphs and modular decompositions, see for instance [8,17,19].

Organization of this Contribution
In Section 2 we provide formal definitions concerning permutations, graphs, and their modular decomposition. The class of permutation graphs and complete edge-colored permutation graphs are described in Section 3 and characterized in Section 4. In Section 5 we show that complete edge-colored permutation graphs can be recognized in O(|V | 2 )-time. Section 6 investigates the connection between the class of complete edge-colored permutation graphs, symbolic ultrametrics, and Gallai colorings. In Section 7 a summary of the paper is given and avenues for future work are outlined.

Preliminaries: Permutations, Graphs, Modular Decomposition
In this section, we provide the necessary formal notion and respective useful results of permutations, graphs, and modular graph decomposition.

Binary Relations and Strict Total Orders
, for all x, y ∈ V we have either (x, y) ∈ R, (y, x) ∈ R or x = y and (R2) R is transitive, i. e., for all x, y, z ∈ V with (x, y), (y, z) ∈ R it holds that (x, z) ∈ R.
Note that (R1) is equivalent to claiming that R is irreflexive, asymmetric, and that all distinct elements x, y ∈ V are in relation R.
Graphs and Colorings An (undirected) graph G is an ordered pair (V, E) consisting of a non-empty, finite set of vertices V (G) = V and a set of edges E(G) = E ⊆ V 2 , where V 2 denotes the set of all 2-element subsets of V . Observe that this definition explicitly excludes self loops and parallel edges. If G = (V, V 2 ), then G is called complete and denoted by K |V | . For an edge e = {u, v} of G, the vertices u and v are called adjacent and e is said to be incident with u and v. Let v ∈ V be a vertex of G. The degree of v is the number of edges in G that are incident with v. The complement of G is the graph G with vertex set V and edge set V (G) is a graph in which any two vertices are connected by exactly one path. A rooted tree T is a tree with one distinguished vertex ρ ∈ V called the root. The leaves L ⊆ V of T is the set of all vertices that are distinct from the root and have degree 1. Let T = (V, E) be a rooted tree with leaf set L and root ρ. Then, vertex v is called a descendant of vertex u and u an ancestor of v if u lies on the unique path from v to the root ρ. The children of an inner vertex v are its direct descendants, i. e., vertices w with {v, w} ∈ E and w is a descendant of v. In this case, the vertex v is called the parent of w. The map c is also called k-edge-coloring of the edges of G. A k-edge-colored graph is also called edge-colored graph if the number k of colors remains unspecified. By slight abuse of notation, we also call graphs G = (V, E) with E = ∅ edge-colored graphs. Thus, the graph K1 = ({v}, ∅) is an edge-colored graph. Using this notation, every graph G = (V, E) can be considered as a 1-edge-colored graph.
Given a k-edge-colored graph with non-empty edge set and a map c, the edge set E can be partitioned into k non-empty subsets E1, . . . E k , where each Ei contains all edges e with c(e) = i. We call such a partition of E into the sets E1, . . . , E k an (edge-)coloring of G = (V, E) and write (V, E1, . . . , E k ) instead of (V, E).
For a subgraph H of a k-edge-colored graph G, we always assume that each edge e in H retains the color c(e) that it has in G, making H a k -edge-colored graph with k ≤ k. The i-th monochromatic subgraph of a k-edge-colored graph G is the subgraph G |i := (V, Ei), where Ei contains all edges with color i.

Remark 1.
Many of the k-edge-colored graphs considered here are complete graphs. Note, this is not a restriction in general, since each k-edge-colored graph can be transformed into a complete (k + 1)-edgecolored graph by assigning a new color k + 1 to all non-edges. In the literature, various notions of rainbow triangles can be found. Examples are the notions multicolored triangles [37] and tricolored triangles [39].
A quite useful property of complete k-edge-colored graphs without rainbow triangles is summarized in the following Proposition 2.3 ([39], Lemma A). For every complete k-edge-colored graph G with k ∈ N ≥3 that does not contain a rainbow triangle as induced subgraph there exists a color i ∈ [1 : k] such that the i-th monochromatic subgraph G |i of G is disconnected.  The set of strong modules Mstr(G) is called modular decomposition of G. Whereas there may be exponentially many modules, the size of the set of strong modules is O(|V |) [24]. In particular, since strong modules do not overlap by definition, it holds that Mstr(G) forms a hierarchy which gives rise to a unique tree representation TG of G: the modular decomposition tree of G or inclusion tree of Mstr(G) [25,44].  [44].
Modular decomposition trees allow us to extend the "usual" graph isomorphism to complete edgecolored graphs as follows: Two graphs G = (V, E) and G = (V , E ) are isomorphic, if there is a bijection φ : V → V such that for all vertices u, v ∈ V it holds that {u, v} ∈ E if and only if {φ(u), φ(v)} ∈ E . Two complete k-edge-colored graphs G = (V, E1, . . . , E k ) and G = (V , E 1 , . . . , E k ) are isomorphic, denoted by G G , if there is a bijection π : [1 : k] → [1 : k] such that for all i ∈ [1 : k] the i-th monochromatic subgraph of G and the π(i)-th monochromatic subgraph of G are isomorphic. As shown in [22,23], two complete edge-colored graphs are isomorphic precisely if their modular decomposition trees are isomorphic. This result, in particular, implies that two k-edge-colored graphs G and G are isomorphic (using the respective bijections φ and π as above) if and only if, for all subsets W ⊆ V , the induced subgraph G[W ] and G [W ] with W = {φ(v) | v ∈ W } are isomorphic (using the same bijection π as used for the colors of G and G ).
For the definition of so-called quotient graphs we need the following Moreover, since all edges between distinct modules in G must have the same color, we can naturally extend the edge-coloring of G to its quotient graph G/Pmax (V ), that is, an edge {Mi, Mj} obtains color c({u, v}) for some u ∈ Mi and v ∈ Mj.  (a) For non-complete graphs there may exist a third type of strong module called parallel (when G[M ] is disconnected) [54], a case that cannot occur here. We are aware of the fact that the definition of the type of strong modules (series, prime) slightly differs from the one provided, e. g., in [22,23,44], in which the type of strong modules is defined in terms of G[M ] rather than on G[M ]/Pmax(M ).
To be more precise, in [22,23,44] a strong module M is "prime" whenever G[M ] consists of trivial modules only and M is "series" whenever G[M ] is a complete 1-edge-colored graph. In this case, however, the complete 1-edge-colored graph K2 is "prime" and "series" at the same time. Moreover, the complete 2-edge-colored graph K3 with vertices a, b, c and coloring c({a, c}) = c({b, c}) = c({a, b}) would, in this definition, neither be "prime" nor "series". Nevertheless, the quotient graphs always fall into one of these two categories. Hence, in order to simplify and streamline the notation, we use this definition in terms of G[M ]/Pmax(M ). For an example, consider again the K2 or the complete 2-edge-colored K4 that contains a monochromatic subgraph isomorphic to an induced path on four vertices. Both graphs are primitive. On the contrary, every 2-edge-colored K3 is not primitive as it contains always a non-trivial module of size 2.
A useful property of quotient graphs is provided in the following    Interestingly, every complete primitive graph that contains at least three colors must contain a rainbow triangle: Lemma 2.7. Let k ∈ N ≥3 and G be a complete k-edge-colored graph. If G is primitive, then G contains a rainbow triangle. Proof. The proof proceeds by contraposition: We show that every complete k-edge-colored graph G with k ∈ N ≥3 that does not contain a rainbow triangle as induced subgraph contains a non-trivial module, i. e., G is not primitive.
Therefore, {u, x} must have some color j = i. Since G does not contain rainbow triangles, the edge {v, x} must have color j as well. Repeating the latter arguments along the edges in the spanning tree of G |i [M1] implies that all vertices in M1 must be connected to x via an edge of color j. The latter, in particular, remains true for all vertices in V \ M1, that is, all edges leading from vertices in M1 to a fixed vertex x ∈ V \ M1 have the same color. Hence, M1 is a non-trivial module in G which implies that G cannot be primitive.

Definition and Basic Properties of Complete Edge-Colored Permutation Graphs
In this section we introduce the formal definitions and provide some useful results for (complete edgecolored) permutation graphs. Recall that a permutation is a bijection from [1 : n] to itself. Intuitively, the vertices of a permutation graph are the elements of [1 : n] and the edges indicate whether the order of two elements is "reversed" by the permutation. For technical reasons that become clear later it is more convenient to use a labeling that assigns to each vertex v a natural number rather than to define the vertex set V directly as the set [1 : |V |]. To this end, we need the following: Using a labeling, permutation graphs [56] can be defined as follows. [15,50,56]). A graph G is called a (simple) permutation graph if there exists a labeling and a permutation π = (π(1), . . . , π(|V |)) such that for all u, v ∈ V we have: In this case, we say that G is a (simple) permutation graph of π. If the labeling is specified, we may also write that G together with , or simply (G, ), is a (simple) permutation graph (of π).
A permutation graph of π = (1, 5, 2, 4, 7, 3, 6) is illustrated in Figure 3 (a). The property of being a simple permutation graph is hereditary: 19]). The family of permutation graphs is hereditary, that is, every induced subgraph of a permutation graph is a permutation graph.
The following known proposition relates subsequences of a permutation to independent sets and cliques in the corresponding permutation graph. . Let (G, ) be a simple permutation graph of some permutation π ∈ Pn. The following statements are true for any subsequence S = (π(i1), . . . , π(i k )) of π with 1 ≤ i1 ≤ · · · ≤ i k ≤ n: By Proposition 3.4, a simple permutation graph is edgeless (resp., complete) if and only if the corresponding permutation is the identity permutation (resp., the reversed identity permutation).
Corollary 3.5. Let G = (V, E) be the simple permutation graph of a permutation π. The following statements are true: Proof. Follows directly from Proposition 3.4.
Another well-known property of simple permutation graphs is summarized in the following proposition. It states that the complement of a simple permutation graph of a permutation π is isomorphic to the simple permutation graph of the reversed permutation π of π. Proposition 3.6 ([50], Proposition 2.2). Assume that (G, ) is a simple permutation graph of π ∈ P |V | . Then (G, ) is the simple permutation graph of π.
Instead of considering simple permutation graphs (which represent a single permutation) we are interested in complete k-edge-colored permutation graphs (which represent a set of k permutations).
). In this case, we say that G is a complete k-edge-colored permutation graph or simply, complete edgecolored permutation graph (of π1, . . . , π k ). If the labeling is specified, we may also write that G together with , or simply (G, ), is complete k-edge-colored permutation graph (of π1, . . . , π k ).
In Figure 3 (c) a complete 4-edge-colored permutation graph is illustrated. Note that for a complete k-edge-colored permutation graph G K1 of permutations π1, . . . , π k all elements E1, . . . , E k are non-empty, since the edge-coloring of G is surjective. Thus, by Corollary 3.5, we have that πi = ι for all i ∈ [1 : k]. Corollary 3.5 also implies that for all n > 1 there is only one complete 1-edge-colored permutation graph on |V | = n vertices, namely the complete graph Kn which is the simple permutation graph of ι. Clearly, the definition of 1-edge-colored permutation graphs coincides with the definition of simple permutation graphs.
Corollary 3.8. Let G be a complete k-edge-colored graph with k ∈ {1, 2}. Assume that (G |1 , ) is a simple permutation graph for π. Then (G, ) is a complete k-edge-colored permutation graph for π (and π).
By Corollary 3.8, every simple permutation graph G that is neither edgeless nor complete corresponds to a complete 2-edge-colored permutation graph by interpreting the non-edges of G as edges with some new color, see also Figure 3 (a) and Figure 3 (b) for illustrative examples. Note, however, that Corollary 3.8 cannot easily be extended to k-edge-colored (possibly non-complete) graphs where each monochromatic subgraph is a simple permutation graph, cf. Figure 4 for an example.

Characterization of Complete Edge-Colored Permutation Graphs
We provide here the main results of this contribution.
Theorem 4.1. Suppose that G is a complete edge-colored graph. Then the following statements are equivalent: (i) G is a complete edge-colored permutation graph, which is, by definition, if and only if there exists a labeling of G such that for each monochromatic subgraph G |i of G it holds that (G |i , ) is a simple permutation graph.
(ii) Each induced subgraph of G is a complete edge-colored permutation graph, i. e., the property of being a complete edge-colored permutation graph is hereditary. (v) Each monochromatic subgraph of G is together with some labeling (possibly different from the labeling as chosen in Item (i)) a simple permutation graph and G does not contain a rainbow triangle.
It is easy to see that, Item (ii) implies Item (i) (since G is an induced subgraph of itself) and Item (iii) implies the first part of Item (iv).
In what follows, we prove Theorem 4.1 and verify the individual items of Theorem 4.1 in Sections 4.1 to 4.4. In particular, we show that all Items (ii) -(v) are equivalent to Item (i). The reader might have already observed that there is an alternative avenue to show the equivalence between Items (i), (iii), and (iv), since Item (iii) trivially implies the first part of Item (iv). This observation suggests to prove the implication "(i) ⇒ (iii)" and "(iv) ⇒ (i)". Nevertheless, we treat the equivalence between Items (i) and (iii) a well as (i) and (iv) in separate steps. The reason is simple: the proof of implication "(iii) ⇒ (i)" is constructive and used to design our efficient recognition algorithm in Section 5. In particular, this result allows us to provide a simple proof to show that (iv) implies (i).
For the sake of completeness, Section 4.5 summarizes all results to prove Theorem 4.1.

An Induced Subgraph Characterization
In this section, we show that the property of being a complete edge-colored permutation graph is hereditary and that complete edge-colored permutation graphs are characterized by this property. That is, we show the equivalence of Theorem 4.1 (i) and Theorem 4.1 (ii). Clearly, it is not hard to see that Theorem 4.1 (ii) trivially implies Theorem 4.1 (i). However, for the sake of completeness, we summarize this result in the following Lemma 4.2. If every induced subgraph of a graph G is a complete edge-colored permutation graph, then G is a complete edge-colored permutation graph.
Proof. The claim is a consequence of the simple fact that G = (V, E) and the induced subgraph G [V ] are identical.
We now show that the converse of Lemma 4.2 is valid as well. Proof. Let G = (V, E1, . . . , E k ) together with a labeling be a complete k-edge-colored permutation graph for the permutations π1, . . . , π k . The cases |M | = 1 as well as k = 1 are trivial and thus, we assume that m = |M | > 1 as well as k > 1. Now, we utilize and π1, . . . , π k to construct a labelingˆ and permutationsπ1, . . . ,π k such that (G[M ],ˆ ) is a complete k -edge-colored permutation graph for k ≤ k permutations from {π1, . . . ,π k }.  Note thatˆ is bijective and well-defined. In order to transform each σi to a permutationπi : [1 : m] → [1 : m], we additionally provide bijective maps θ P 1 , . . . θ P k by defining for all r ∈ [1 : k] the map θ P r : [1 : m] → Pr as θ P r (i) < θ P r (j) ⇔ i < j for all distinct i, j ∈ Pr. Note that˘ as well as θ P 1 , . . . , θ P k are unique and well-defined since M as well as P1, . . . , P k are totally ordered sets on m elements. See Figure 5 for an illustration of the maps σi,˘ ,ˆ , and θ P i that are used in this proof. To derive the aforementioned permutationsπi : We continue to show that (G[M ],ˆ ) is a complete |I|-edge-colored permutation graph forπi, i ∈ I. To this end, let u, v ∈ M be two vertices and without loss of generality assume that (u) > (v). Since we have not changed the relative order of the labels in M under˘ , we have˘ ( (u)) >˘ ( (v)) which implieŝ (u) >ˆ (v).
First assume that {u, v} ∈Êi for some i ∈ I.

A Characterization in Terms of Quotient Graphs
In this section, we study the quotient graphs of strong modules of complete edge-colored permutation graphs. In particular, we show that a graph is a complete edge-colored permutation graph if and only if the quotient graph of each strong module is a complete edge-colored permutation graph. In other words, we show the equivalence of Theorem 4.1 (i) and Theorem 4.1 (iii).
The strict total orders for each color Î1, Î2 and Î3 defined on Following the proof of Proposition 4.9, we obtain π1, π2 and π3 from Î1, Î2 and Î3, respectively.
In what follows we show that the converse of Proposition 4.4 is valid as well. To this end, we first specify an ordering ≺ of the vertices of G based on the labelings of the quotient graphs of strong modules of G (cf. Definition 4.5). The ordering ≺ can then be used to establish a specific labeling ≺ of G. In order to show that (G, ≺) is a complete edge-colored permutation graph we need to provide the respective permutations. We construct these permutations by employing additional orderings Îi of V for each of the individual colors i of G (cf. Definition 4.7). See also Figure 6 for an illustrative example.
However, to establish these results we first need some further notation. Let G be a graph with vertex set V and TG be the modular decomposition tree of G.
Moreover, let ≺ be the map ≺ : See Figure 6 for an illustrative example of ≺ and ≺.
Lemma 4.6. Let G be a complete edge-colored graph with vertex set V . Then, the binary relation ≺ is a strict total order on V and ≺ a labeling of G.
Proof. Let G be a complete edge-colored graph with vertex set V . Furthermore, let M be a labeling of the quotient graph G[M ]/Pmax(M ) for each M ∈ Mstr(G). To prove that ≺ is a strict total order on V we must show that ≺ satisfies (R1) and (R2), i. e., ≺ is trichotomous (and thus, well-defined) and transitive.
We first verify that ≺ is trichotomous. Since there are no child modules of M u,u = {u} in TG, we never have u ≺ u. Thus, let u, v ∈ V be distinct. Recall that the strong modules M u,v , M u,v u , and M u,v v always exist and that they are unique for u, v.
. By construction, we either have u ≺ v or v ≺ u. In summary, ≺ is trichotomous.
We continue to show that ≺ is transitive. To this end, suppose that u ≺ v and v ≺ w for some u, v, w ∈ V . By trichotomy of ≺, the vertices u, v, w are distinct.
Since 1 ≤ |{M u,v , M v,w , M u,w }| ≤ 2, we have to consider the following four cases: Then, u ≺ v and v ≺ w imply M (Mu) < M (Mv) < M (Mw) and thus, we conclude u ≺ w.
; a contradiction. Hence, u ≺ v and v ≺ w always implies u ≺ w. Therefore, ≺ is transitive. Since ≺ is trichotomous and transitive, the relation ≺ is a strict total order on V .
Since ≺ is a strict total order on V we can immediately conclude that the map ≺ is a labeling of G.
We now define a second type of relation that we use to construct the permutations for the complete edge-colored permutation graph (G, ≺).  We continue to show that Îi is transitive. Suppose that u Îi v and v Îi w for some u, v, w ∈ V . By trichotomy of Îi, the vertices u, v, w are distinct.
Since 1 ≤ |{M u,v , M v,w , M u,w }| ≤ 2, we have to consider the following four cases: In what follows, we refer to the latter condition as Condition "2C ". We now consider six different cases with respect to the total order of (u), (v), and (w).

A Characterization in Terms of Prime Modules
Intriguingly, we can strengthen the results of Section 4.2 by considering strong prime modules only. We show here that complete edge-colored permutation graphs are completely characterized by the fact that the quotient graph of each strong prime module is a complete edge-colored permutation graph. Hence, we show the equivalence of Theorem 4.1 (i) and Theorem 4.1 (iv). Corollary 4.11. Let G be a complete edge-colored permutation graph. Then the quotient graph of each strong prime module in the modular decomposition of G is a complete edge-colored permutation graph. In particular, for every strong prime module on at least three vertices the quotient graph must be 2-edgecolored.
Proof. Let G be a complete edge-colored permutation graph. By Proposition 4.4, the quotient graph of each strong module of G and thus, of each strong prime module of G, is a complete edge-colored permutation graph. We continue to show that the quotient graph of each strong prime module on at least three vertices must be 2-edge-colored. Assume, for contradiction, that G contains a strong prime module M with |M | ≥ 3 whose quotient graph G[M ]/Pmax(M ) is not a 2-edge-colored graph. By Remark 2, G[M ]/Pmax(M ) is complete. However, this implies that G[M ]/Pmax(M ) must be k-edge-colored for some k ≥ 3, as otherwise, it would be a simple permutation graph for ι.
Since G[M ]/Pmax(M ) is primitive (cf. Lemma 2.6), we can apply Lemma 2.7 to conclude that G[M ]/Pmax(M ) contains a rainbow triangle. It is easy to verify that this implies that G must contain a rainbow triangle; a contradiction to Lemma 3.10 and the assumption that G is a complete edge-colored permutation graph.

A Characterization via Monochromatic Subgraphs
In this section, we show that a graph is a complete edge-colored permutation graph if and only if it does not contain a rainbow triangle and each monochromatic subgraph of it is a simple permutation graph. Hence, we show the equivalence of Theorem 4.1 (i) and Theorem 4.1 (v). To this end, we first need the following result: Lemma 4.12. Let G be a complete edge-colored graph. Assume that G |i (together with some labeling i) is a simple permutation graph for all i ∈ [1 : k] and the quotient graph of each strong prime module of G on at least three vertices is a 2-edge-colored graph. Then G is a complete edge-colored permutation graph.
Proof. Let G = (V, E1, . . . , E k ) be a complete k-edge-colored graph. We proceed to show that all conditions of Proposition 4.9 are satisfied in order to show that G is a complete edge-colored permutation graph. To this end, let us examine the quotient graph of a strong module M of G.
If M is series, then its quotient graph G[M ]/Pmax(M ) is a complete 1-edge-colored graph and thus, a complete 1-edge-colored permutation graph for ι.
If  Proof. Let (G, ) be a complete k-edge-colored permutation graph for the permutations π1, . . . , π k ∈ P |V | . By Lemma 3.10, G cannot contain a rainbow triangle. By definition, (G |i , ) is be a simple permutation graph of πi.
Proposition 4.14. Let G be a complete edge-colored graph. If every monochromatic subgraph of G is a simple permutation graph and G does not contain a rainbow triangle, then G is a complete edge-colored permutation graph.
By contraposition, we show that if G is not a complete edge-colored permutation graph, then there exists a monochromatic subgraph of G that is not a simple permutation graph or G contains a rainbow triangle.
Assume that G is not a complete edge-colored permutation graph. Since G contains at least two vertices, we have that k ≥ 1. If k = 1, then G would be a complete 1-edge-colored permutation graph for π1 = ι. Thus, we assume that k ≥ 2. Since G is not a complete edge-colored permutation graph, for all labelings : V → [1 : |V |] of G there are no permutations π1, . . . , π k ∈ P |V | such that (G, ) is a complete k-edge-colored permutation graph of π1, . . . , π k . By definition, for all labelings , G contains always a monochromatic subgraph G |i = (V, Ei) such that (G |i , ) is not a simple permutation graph of πi. Note, this does not imply that G |i is not a simple permutation graph at all, since we might find a different labeling i of G |i such that (G |i , i) is a simple permutation graph for some π i .
If, however, for all possible labelings i, the labeled graph (G |i , i) is not a simple permutation graph, then we are done, since we found a monochromatic subgraph of G that is not a simple permutation graph at all.
Thus, we are left with the situation that G is not a complete edge-colored permutation graph and for all i ∈ [1 : k] there is some labeling i such that (G |i , i) is a simple permutation graph. Note, that this implies that k > 2 as otherwise, E(G) = E(G |1 ) ∪ E(G |1 ) and, by Corollary 3.8, G would be a complete 2-edge-colored permutation graph. It remains to show that G contains a rainbow triangle.
We In summary, we have shown that if the complete edge-colored graph G is not a complete edge-colored permutation graph, then there exists a monochromatic subgraph of G that is not a simple permutation graph or G contains a rainbow triangle, which completes the proof.

Recognition of Complete Edge-Colored Permutation Graphs
In this section we show that complete edge-colored permutation graphs can be recognized in O(|V | 2 )-time. Moreover, we also show that (in the affirmative case) the labeling and the permutations π1, . . . , π k such that (G, ) is a complete k-edge-colored permutation graph of π1, . . . , π k can be constructed in polynomial time.
Simple permutation graphs G = (V, E) can be recognized in O(|V | + |E|)-time [19,53]. These algorithms also construct a corresponding permutation π and labeling of G.
Let us now consider a complete k-edge-colored graph G. As the number of colors k is always bounded by the number of edges of G, we immediately obtain a polynomial-time algorithm to recognize complete edge-colored permutation graphs (cf. Theorem 4.1 (v)): 1) For all i ∈ [1 : k], we check whether the monochromatic subgraph G |i is a simple permutation graph using the algorithms described in [19,53].
2) In addition, we verify that G does not contain a rainbow triangle.
Such an algorithm allows us to verify that G is a complete edge-colored permutation graph or not. However, we are also interested in computing a labeling of G and the corresponding underlying permutations π1, . . . , π k such that (G, ) is a complete edge-colored permutation graph of π1, . . . , π k . The proofs in Section 4.2, however, are constructive and thus provide a recognition algorithm that explicitly computes the required labeling as well as the underlying permutations of a complete edgecolored permutation graph. More precisely, we may use the following procedure: 1) Compute the modular decomposition of G and, thus, obtain all strong modules of G. If there is a strong prime module M of G with |M | ≥ 3 whose quotient graph G[M ]/Pmax(M ) contains more than 2 colors, then G cannot be a complete edge-colored permutation graph (cf. Theorem 4.1 (iv)). In this case, the algorithm stops and returns false. Otherwise, each of these quotient graphs on at least three vertices is 2-edge-colored and we can proceed with Step (2). This algorithm correctly determines whether G is a complete edge-colored permutation graph or not (it essentially checks Item (iv) in Theorem 4.1) and correctly determines the labeling ≺ of G (cf. Lemma 4.6) and the corresponding permutations π1, . . . , π k (cf. proof of Proposition 4.9).
Theorem 5.1. Let G = (V, E) be a complete k-edge-colored graph. Then, it can be verified in O(|V | 2 )time whether G is a complete edge-colored permutation graph or not. In the affirmative case, a labeling and permutations π1, . . . , π k such that (G, ) is a complete edge-colored permutation graph for π1, . . . , π k can be constructed in O(|V | 2 )-time.
Proof. The correctness of the algorithm follows from the discussion above. Thus, let us examine its running time. In Step (1) we have to compute the modular decomposition tree T of G, which can be done in O(|V | 2 )time [24,44]. While computing T we can also store the information which module is associated to which vertex in T within the same time complexity. At the same time, we can also store the information which inclusion-minimal strong module M x,y of G contains x and y as well as the child modules M x,y x and M x,y y that contain x and y, respectively, for all x, y ∈ V in O(|V | 2 )-time. We then have to compute the quotient graph G[M ]/Pmax(M ) for all strong modules M . The quotient graph of an individual strong module M can be computed as follows: The module M is associated with a vertex u in T that has children u1, . . . , ur, r ≥ 2. Each child ui is associated with a strong module Mi and hence, Pmax(M ) = {M1, . . . , Mr}. We now take from each module Mi one vertex vi of G, which can be done in r constant time steps. We finally determine the colored edges {vi, vj}, 1 ≤ i < j ≤ r which can be done in r(r − 1)/2 constant time steps. Note, r = deg T (u) − 1 and thus, the quotient graph of a strong module M associated with u in T can be constructed in deg T (u)−1+(deg T (u)−1)(deg T (u)−2)/2 steps, each of which requires only a constant number of operations.
To compute the quotient graphs of all modules we simply process each vertex in T and its children, and construct the quotient graphs as outlined above and obtain where L(T ) denotes the leaves of T . In the last step we make use of [47,Lemma 1] [19,53] to check if H is a simple permutation graph or not. In the affirmative case, we also obtain a labeling M of H and, thus, a labeling of G[M ]/Pmax(M ). By analogous arguments as in Equation (1), we can observe that applying these algorithms for each strong prime module M with |M | ≥ 3 can be done in O(|V | 2 )-time. In Step (3)

In
Step (4) we use the precomputed M x,y to construct ≺ and ≺ as specified in Definition 4.5. This task takes O(|V | 2 )-time.

Connections between Complete Edge-Colored Permutation Graphs and other Graph Classes
In this section, we show the relationship between complete edge-colored permutation graphs and other graph classes. The first simple observation is that complete k-edge-colored permutation graphs do not contain rainbow triangles (cf. Lemma 3.10). This is precisely the definition of Gallai colorings [38,39,51]. We therefore have Corollary 6.1. The coloring of a complete k-edge-colored permutation graph is a Gallai coloring with k colors.
The set M is often used to represent so-called evolutionary events [43] and can be replaced by any finite set of symbols or the set [1 : k] as done here. A complete edge-colored graph G δ with vertex set X can readily be obtained from δ, by putting the color δ(x, y) = δ(y, x) on the edge {x, y} for all distinct x, y ∈ X. Since δ is surjective, we obtain the complete k-edge-colored graph G δ = (X, E1, . . . , E k ) as the graph representation of δ.
Several characterizations of symbolic ultrametrics are known [10,43], including one that relates them to cographs, i. e., graphs that do not contain induced paths on four vertices [18]. Not every simple permutation graph is a cograph. For example, a path on four vertices represents the permutation graph of (3, 1, 4, 2) but not a cograph. Intriguingly, all cographs are simple permutation graphs [13]. This, together with Proposition 6.3 and Theorem 4.1 (v) immediately implies Corollary 6.4. The graph representation G δ of a symbolic ultrametric δ is a complete edge-colored permutation graph.
Separable permutations can be represented by a so-called separating tree that reflects the structure of the permutation [13] and can be characterized in terms of so-called permutation patterns. For our purposes, the following result is of interest: Proposition 6.5 ( [13]). Let G be a simple permutation graph of π. Then, π is separable if and only if G is a cograph.
It is easy to verify that every induced subgraph of a cograph is again a cograph. This, together with Proposition 6.5, Theorem 4.1, and Proposition 6.3 implies Corollary 6.6. The following statements are equivalent: i) A complete edge-colored graph G is the graph representation of a symbolic ultrametric.
ii) G does not contain a rainbow triangle and every monochromatic subgraph of G is the simple permutation graph of a separable permutation.
Moreover, if G is the graph representation of a symbolic ultrametric, then every monochromatic subgraph of each induced subgraph is the simple permutation graph of a separable permutation.

Summary and Outlook
In this paper, we characterized complete edge-colored permutation graphs, that is, complete edge-colored graphs that can be decomposed into permutation graphs. These graphs form a hereditary class, i. e., every induced subgraph of a complete edge-colored permutation graph is again a complete edge-colored permutation graph, possibly with fewer colors. Moreover, we showed that complete edge-colored permutation graphs are equivalent to those complete edge-colored graphs, i. e., symmetric 2-structures, that contain no rainbow triangle and whose monochromatic subgraphs are simple permutation graphs. Further characterizations in terms of the modular decomposition of complete edge-colored graphs are provided. In particular, complete edge-colored permutation graphs are characterized by the structure of the quotient graphs of their strong (prime) modules. Moreover, we showed that complete edge-colored permutation graphs G = (V, E) can be recognized in O(|V | 2 )-time and that both the labeling and the underlying permutations can be constructed within the same time complexity. As a by-product, we observed that the edge-coloring of a complete edge-colored permutation graph is always a Gallai coloring. In addition, we have shown the close relationship of edge-colored permutation graphs to symbolic ultrametrics, separable permutations, and cographs. In particular, the class of edgecolored graphs representing symbolic ultrametrics is strictly contained in the class of complete edgecolored permutation graphs.
There are many open problems that are of immediate interest for future research. The first obvious open problem is to generalize the results presented here to k-edge-colored graphs that are not necessarily complete, e. g., the graph illustrated in Figure 4 (a). Second, we may consider the converse problem of the one studied in this paper: Consider simple unlabeled permutation graphs G1, . . . , G k . The question arises whether there is a complete edge-colored permutation graph G such that every monochromatic subgraph G |i of G is isomorphic to Gi, 1 ≤ i ≤ k. Third, one may also ask whether one can add colored edges to a given (not necessarily complete) edge-colored graph such that the resulting graph is a complete edge-colored permutation graph.