Rankwidth meets stability
Jaroslav Nesetril, Patrice Ossona de Mendez, Michal Pilipczuk, Roman Rabinovich, Sebastian Siebertz
RRankwidth meets stability
Jaroslav NeˇsetˇrilCharles University (IUUK), Praha, Czech Republic [email protected]
Patrice Ossona de MendezCAMS (CNRS, UMR 8557), Paris, France [email protected]
Micha l PilipczukUniversity of Warsaw, Poland [email protected]
Roman RabinovichTechnical University of Berlin, Germany [email protected]
Sebastian SiebertzUniversity of Bremen, Germany [email protected]
Abstract
We study two notions of being well-structured for classes of graphs that are inspired by classicmodel theory. A class of graphs C is monadically stable if it is impossible to define arbitrarilylong linear orders in vertex-colored graphs from C using a fixed first-order formula. Similarly, monadic dependence corresponds to the impossibility of defining all graphs in this way. Examplesof monadically stable graph classes are nowhere dense classes, which provide a robust theoryof sparsity. Examples of monadically dependent classes are classes of bounded rankwidth (orequivalently, bounded cliquewidth), which can be seen as a dense analog of classes of boundedtreewidth. Thus, monadic stability and monadic dependence extend classical structural notions forgraphs by viewing them in a wider, model-theoretical context. We explore this emerging theory byproving the following:• A class of graphs C is a first-order transduction of a class with bounded treewidth if andonly if C has bounded rankwidth and a stable edge relation (i.e. graphs from C exclude somehalf-graph as a semi-induced subgraph).• If a class of graphs C is monadically dependent and not monadically stable, then C has infact an unstable edge relation.As a consequence, we show that classes with bounded rankwidth excluding some half-graph asa semi-induced subgraph are linearly χ -bounded. Our proofs are effective and lead to polynomialtime algorithms.This paper is a part of projects that have received funding from the European ResearchCouncil (ERC) under the European Union’s Horizon 2020 research and innovationprogramme (grant agreements No 810115 – Dynasnet, and No 677651 – Total). a r X i v : . [ c s . D M ] J u l Introduction
The search for efficient algorithms has led to the study of the structural properties of graph classesdefined by the exclusion of specific substructures. For example, the structure theorem for graphs withexcluded minors [38] and for graphs with excluded topological minors [23, 11] formed the basis ofmany structural and algorithmic studies. A fundamental contribution of these studies was to unveilthe particular importance of classes with bounded treewidth, which was confirmed by their specificalgorithmic properties. Precisely, Courcelle’s theorem asserts that in classes with bounded treewidth,every property definable in monadic second-order logic (MSO) can be tested efficiently [8].Based on the exclusion of shallow minors (or shallow topological minors), two of the authorsproposed a framework for the structural study of classes of sparse graphs, namely bounded expansion classes and (more generally) nowhere dense classes [33]. This last notion of sparsity is characteristic tomonotone classes of graphs with fixed parameter tractable first-order model checking [13, 22].Much effort has been taken to extend the numerous algorithmic applications of sparse graph classes,in particular of treewidth, to dense graphs. For example, Courcelle’s theorem was extended to classesof bounded cliquewidth [10] (or equivalently of bounded rankwidth or bounded
NLC-width ), which isthe dense analog of treewidth.The move from sparse to dense is naturally followed by a move from monotone classes (i.e. classesclosed under subgraphs) to hereditary classes (i.e. classes closed under induced subgraphs). Still, strongalgorithmic properties are known to emerge when one considers hereditary classes of graphs definedby forbidding simple induced subgraphs (as witnessed by the class of cographs, circle graphs, or perfectgraphs), or semi-induced bipartite subgraphs. Recall that a bipartite graph H is a semi-induced subgraph of a graph G if there exist two disjoint subsets of vertices A and B of G such that H is isomorphic tothe subgraph of G with vertex set A ∪ B and all the edges present in G between A and B .For example, the VC-dimension of a graph is defined from the maximum size of a semi-inducedsubgraph isomorphic to a powerset graph , that is, to a bipartite graph with vertex set U ∪ P ( U ) andedge set { xX : x ∈ U, X ∈ P ( U ) , and x ∈ X } . Classes with bounded VC-dimension are known tohave specific statistical properties, which are at the heart of computational learning theory [3] and ofnumerous results in algorithms in geometric graph theory (see e.g. [6, 31]).A stronger assumption is that a graph excludes, as a semi-induced subgraph, some half-graph :a bipartite graphs with vertex set { a , . . . , a n } ∪ { b , . . . , b n } and edge set { a i b j : 1 (cid:54) i (cid:54) j (cid:54) n } . Ithas been observed that half-graphs provide a primary example why irregular pairs cannot be avoided inthe statement of Szemer´edi’s Regularity Lemma. Indeed, Malliaris and Shelah showed that forbidding ahalf-graph as a semi-induced subgraph indeed makes it possible to get rid of irregular pairs [30].In the language of model theory, a class excluding some powerset graph as a semi-induced subgraph(that is, a class with bounded VC-dimension) is said to have a dependent edge relation , and a classexcluding some half-graph as a semi-induced subgraph is said to have a stable edge relation (or tohave bounded order dimension ). This corresponds to the two main dividing lines used in model theory:dependence and stability. In our setting, a class of graphs is dependent if every binary relation that is(first-order) definable in it, seen as an edge relation, is dependent. Similarly, a class is stable if everydefinable binary relation is stable. Stronger model theoretical notions are the notions of monadicdependence and monadic stability , where we restrict binary relations definable not only in graphs fromthe class in question, but also in all their vertex-colorings. A surprising connection with structuralgraph theory is that, for a monotone class of graphs, the properties of dependence, monadic dependence,stability, monadic stability, and nowhere-denseness are equivalent [1]. However, without the assumptionof monotonicity, the notions of monadic dependence and monadic stability do not collapse and presentmuch wider concepts of well-structuredness than nowhere denseness, and they are suited for thetreatment of dense graphs as well. For instance, every class of bounded cliquewidth is monadicallydependent [24], but not necessarily monadically stable.2ne of our prime motivations is to extend the techniques designed for classes of sparse graphs (i.e.bounded expansion or nowhere dense classes) to the dense setting. For this, it is natural to considerhereditary classes of graphs that are dependent, monadically dependent, stable, or even monadicallystable. As recently shown by Fabia ´nski et al. [15], these structural assumptions may be used in a novelway in the design of parameterized algorithms.Monadic dependence and monadic stability can be also defined using transductions. A (first-order)transduction is a way to construct target graphs from vertex-colorings of source graphs by fixed first-order formulas (see Section 2 for formal definitions). In this setting, a class is monadically dependent ifit has no transduction onto the class of all powerset graphs (equivalently, onto the class of all graphs).It is monadically stable if it has no transduction onto the class of all half-graphs [4]. From a dualpoint of view, classes with bounded rankwidth are exactly those that are transductions of the class oftrivially perfect graphs (equivalently, of the class of tree-orders). Similarly, classes with bounded linearrankwidth are exactly those that are transductions of the class of half-graphs (equivalently, of the classof linear orders) [7].In this way, transductions form a basic containment notion for graphs, which can be used todefine structural properties through forbidding obstructions, similarly to (shallow) minors or (induced)subgraphs. The difference is that tranductions represent containment understood in model-theoreticalterms, and thus are suited for considering questions related to first-order logic. As the notions ofmonadic stability and monadic dependence are preserved by taking transductions and they correspondto major dividing lines in model theory, we expect them to be central in the emerging theory.In order to explore this theory, it is imperative to understand classical concepts of structural graphtheory through the lense of transductions. That is, we wish to describe the closures of classes that areknown to be well-structured under transductions. This was done e.g. for classes of bounded degree [16]and for classes of bounded expansion [18]. More importantly for this work, in a previous paper, thefollowing characterization of monadically stable classes of bounded linear rankwidth was given. Theorem 1.1 ([34]) . If a class of graphs C has bounded linear rankwidth, then the following conditionsare equivalent:1. C has a stable edge relation;2. C is stable;3. C is monadically stable;4. C is a transduction of a class with bounded pathwidth. Conceptually, this result means that if a class of graphs C has bounded linear rankwidth andexcludes some half-graph as a semi-induced subgraph, then graphs from C can be “sparsified” in thefollowing sense: for each G ∈ C we can find a vertex-colored graph G (cid:48) of bounded pathwidth suchthat G can be defined from G (cid:48) using fixed first-order formulas. The much more difficult questionwhether a result analogous to Theorem 1.1 holds for classes of bounded rankwidth (instead of linear rankwidth) could not be answered in [34] and was stated there as a conjecture.A by-product of the results of [34] is the conclusion that classes of bounded linear rankwidth arelinearly χ -bounded. Here, a hereditary class C of graphs is (linearly) χ -bounded if the chromaticnumber of graphs in C is functionally (linearly) bounded by their clique number. This concept wasintroduced by Gy´arf´as [26] and has received a lot of attention (see e.g. the surveys [39, 40]). Our contribution.
In this work we prove the conjecture stated in [34] and establish the following:
Theorem 1.2.
If a class of graphs C has bounded rankwidth, then the following conditions are equivalent:1. C has a stable edge relation;2. C is stable;3. C is monadically stable;4. C is a transduction of a class with bounded treewidth.
3e implications 4 ⇒ ⇒ ⇒ ⇒
4, we combine the approachpresented in [34] with the techniques used by Bonamy and the third author in [5] to prove that classesof bounded rankwidth are polynomially χ -bounded. Using the tree variant of Simon’s factorizationdue to Colcombet [7], the authors of [5] introduce a bounded-depth recursive decomposition of thetree encoding of a graph of rankwidth at most k into factors, so that the quotient trees satisfy certainRamsey properties. We show that in the absence of a half-graph, these properties imply that eachroot-to-leaf path in a quotient tree can be partitioned into a bounded number of blocks, and the only“points of interest” on the paths are borders between consecutive blocks. This leads to an encoding ofthe graph in question in a graph of bounded treewidth, which can be decoded using fixed first-orderformulas. We stress that this encoding/decoding scheme is by no means straightforward: it requiresnew combinatorial insights and a careful analysis. The proof is constructive and can be implemented asa polynomial time algorithm.Further, we show that the equivalence of the first three conditions of Theorem 1.1 is in fact a moregeneral phenomenon that occurs in every monadically dependent graph class. Precisely, we prove: Theorem 1.3.
For a monadically dependent graph class C , the following conditions are equivalent:1. C has a stable edge relation;2. C is stable;3. C is monadically stable. Note that implications 3 ⇒ ⇒ ⇒ -subdivided half-graphs, which is dependent and excludes some half-graph as a semi-induced subgraph,but is not monadically stable. For implication 2 ⇒ -subdivided cliques,which is stable and thus dependent, but is not monadically stable.The proof of implication 1 ⇒ C is notmonadically stable, we start with a formula ϕ (¯ x, ¯ y ) that is unstable in some monadic expansion C + of C ; that is, C + consists of graphs from C with some unary predicates added. Then we iterativelyreduce ϕ to simpler and simpler unstable formulas while enriching C + with more unary predicates.Eventually we find an atomic formula that is unstable on some monadic expansion of C , so C hasan unstable edge relation. The assumption that C is monadically dependent is crucially used in eachquantifier elimination step.Moreover, Theorem 1.2 has important corollaries for classes with low rankwidth covers/colorings (introduced in [29]). It follows from [5] that classes with low rankwidth covers are polynomially χ -bounded. Excluding a semi-induced half-graph allows us to get a stronger property. Theorem 1.4.
Every class with low rankwidth covers and stable edge relation is linearly χ -bounded. In particular, Theorem 1.4 implies that classes with bounded rankwidth and stable edge relation arelinearly χ -bounded. Also, requiring that a class has a stable edge relation gives the following collapse. Theorem 1.5.
A class has low rankwidth covers and a stable edge relation if and only if it is a transductionof a class with bounded expansion.
Our results together with observations present in the literature are illustrated by the semi-lattice ofproperties of graph classes in Figure 1. See Figure 5 in Section 6 for an extended version of the schema.
Graphs. If k is a positive integer, we write [ k ] for the set { , . . . , k } . We consider finite, simple,undirected graphs. For a graph G we write V ( G ) for its vertex set and E ( G ) for its edge set.4 ependentedge relationMonadicallydependent Stableedge relationBoundedrankwidth Monadicallystable WeaklysparseBoundedlinearrankwidth Transductionof boundedtreewidth NowheredenseTransductionof boundedpathwidth BoundedtreewidthBoundedpathwidth (1)(2)(3) (4)(5)(6) = = =BoundedVC-dimension Boundedorder-dimensionBicliquefree (1) Monadically stable = monadically dependent ∩ stable edge relation (Theorem 1.3);(2) Structurally bounded treewidth = boundedrankwidth ∩ monadically stable (Theorem 1.2);(3) Structurally bounded pathwidth = bounded lin-ear rankwidth ∩ structurally bounded treewidth(follows from Theorem 1.1, proved in [34]);(4) Nowhere dense = monadically stable ∩ weaklysparse (follows from [12], cf. [35]);(5) Bounded treewidth = structurally boundedtreewidth ∩ nowhere dense (= bounded rankwidth ∩ weakly sparse [25]);(6) Bounded pathwidth = structurally bounded path-width ∩ bounded treewidth (= bounded linearrankwidth ∩ weakly sparse [25]). Figure 1: The semi-lattice of property inclusions.A graph H is a subgraph of G if V ( H ) ⊆ V ( G ) and E ( H ) ⊆ E ( G ) . For X ⊆ V ( G ) , we write G [ X ] for the subgraph of G induced by X , that is, the subgraph with vertex set X and all edges from G with both endpoints in X . A graph H is an induced subgraph of G if there exists X ⊆ V ( G ) suchthat H is isomorphic to G [ X ] . For disjoint subsets X, Y of V ( G ) , we write G [ X, Y ] for the subgraphof G semi-induced by X and Y , that is, the subgraph with vertex set X ∪ Y and all the edges of G withone endpoint in X and one endpoint in Y . A bipartite graph H is a semi-induced subgraph of G if H is isomorphic to G [ X, Y ] for some disjoint subsets X and Y of V ( G ) . A class C of graphs excludes abipartite graph H as a semi-induced subgraph if no G ∈ C contains H as a semi-induced subgraph.The complete bipartite graph (biclique) with each side of size t is denoted by K t,t . The half-graph of order t is the bipartite graph with vertices a , . . . , a t , b , . . . , b t and edges a i b j for all i, j ∈ [ t ] with i (cid:54) j . First-order transductions.
We assume familiarity with first-order logic and refer to [27] for back-ground. We represent graphs as relational structures over a vocabulary consisting of one binary edgerelation symbol E . For a finite set of unary relation symbols Σ , a Σ -expansion of a graph G is astructure G + obtained from G by adding unary relations with symbols in Σ ; thus, one can think of G + as of G with a coloring on the vertex set. If we do not wish to specify Σ , we may simply speak about a monadic expansion of G . For a class C of graphs, a class C + is a monadic expansion of C if there is afinite set of unary relation symbols Σ such that every element of C + is a Σ -expansion of a graph in C .For a formula ϕ (¯ x ) in the vocabulary of Σ -expanded graphs, where ¯ x denotes a tuple of freevariables, and a Σ -expanded graph G , we define ϕ ( G ) := { ¯ u ∈ V ( G ) | ¯ x | : G | = ϕ (¯ u ) } . In partic-ular, if A is a unary relation symbol, then A ( G ) = { u ∈ V ( G ) : G | = A ( u ) } and, as expected, E ( G ) = { ( u, v ) ∈ V ( G ) × V ( G ) : G | = E ( u, v ) } .A simple interpretation I of graphs in Σ -expanded graphs is a pair ( ν ( x ) , η ( x, y )) consisting oftwo formulas (in the vocabulary of Σ -expanded graphs), where η is anti-reflexive and symmetric(i.e. (cid:96) ¬ η ( x, x ) and (cid:96) η ( x, y ) ↔ η ( y, x ) ). If G + is a Σ -expanded graph, then H = I ( G + ) is the graphwith vertex set ν ( G + ) and edge set η ( G + ) ∩ ( ν ( G + ) × ν ( G + )) .A transduction T (from graphs to graphs) is a pair (Σ T , I T ) , where Σ T is a finite set of unaryrelation symbols and I T is a simple interpretation of graphs in Σ T -expanded graphs. A graph H canbe T -transduced from a graph G if there exists a Σ T -expansion G + of G such that I T ( G + ) = H . Aclass D of graphs can be T -transduced from a class C of graphs if for every graph H ∈ D there exists agraph G ∈ C such that H can be T -transduced from G . We also say that T is a transduction from C nto D . Note that if a class D can be T -transduced from a class C and D (cid:48) ⊆ D , then also D (cid:48) can be T -transduced from C . A class D of graphs can be transduced from a class C of graphs if it can be T -transduced from C for some transduction T . Note that transductions compose in the following sense:If a class D can be transduced from a class C and a class E can be transduced from D , then E can betransduced from C . Remark 2.1.
A class has bounded rankwidth if and only if it can be transduced from the class of triviallyperfect graphs (i.e. from tree-orders) [7]. Hence, if a class D can be transduced from a class C of boundedrankwidth, then D has bounded rankwidth. Stability and dependence.
A formula ϕ (¯ x, ¯ y ) is unstable on a class C if for every integer n (cid:62) there exists G ∈ C , ¯ a , . . . , ¯ a n ∈ V ( G ) | ¯ x | and ¯ b , . . . , ¯ b n ∈ V ( G ) | ¯ y | such that G + | = ϕ (¯ a i , ¯ b j ) if andonly if i (cid:54) j . The formula ϕ (¯ x, ¯ y ) is stable on C if it is not unstable on C . The class C has a stable edgerelation if the formula E ( x, y ) is stable on C . The class C is stable if every formula ϕ (¯ x, ¯ y ) is stableon C . The class C is monadically stable if every monadic expansion C + of C is stable.Similarly, a formula ϕ (¯ x, ¯ y ) is independent on a class C if for every integer n (cid:62) there exists G ∈ C , ¯ a , . . . , ¯ a n ∈ V ( G ) | ¯ x | and ¯ b J ∈ V ( G ) | ¯ y | for all J ⊆ [ n ] such that G + | = ϕ (¯ a i , ¯ b J ) if and only if i ∈ J .The formula ϕ (¯ x, ¯ y ) is dependent on C if it is not independent on C . The class C has a dependent edgerelation if the formula E ( x, y ) is dependent on C . The class C is dependent if every formula ϕ (¯ x, ¯ y ) is dependent on C . The class C is monadically dependent if every monadic expansion C + of C isdependent.It turns out that monadic expansions allow us to circumvent the use of tuples of variables ¯ x and ¯ y with length greater than , as stated next. Theorem 2.1 (follows from [4], see also [2]) . A class C is monadically dependent if and only if there isno transduction from C onto the class of all finite graphs. Theorem 2.2 ([4]) . A class C is monadically stable if and only if there is no transduction from C ontothe class the all finite half-graphs. In this section we prove Theorem 1.2. We start with some preliminaries on the toolbox introduced byBonamy and the third author [5], and then proceed to the proper proof.
Trees. A tree is a connected acyclic graph. A rooted tree is a tree T with a distinguished node calledthe root of T , denoted top ( T ) . A rooted tree T defines a partial order on vertices and edges, whichwe denote by (cid:22) T or by (cid:22) if T is clear from the context. In this partial order we have α (cid:22) β (with α, β ∈ V ( T ) ∪ E ( T ) ) if every path in T that starts at the root and includes β also includes α . If α and β are nodes and α (cid:22) β , then we also say that α is an ancestor of β and β is a descendant of α ; note thateach node is considered also an ancestor of itself. We also use terms parent and child with the standardmeaning. The parent of a node v of a rooted tree (or the node v itself if v is the root) is denoted by v ↑ ;we also denote ( v ↑ ) ↑ by v ↑↑ . Note that the ancestor partial order is an inf-semilattice , with the meetoperation ∧ being the least common ancestor. The leaves of a rooted tree T are the (cid:22) -maximal nodesof T ; the set of all leaves of T is denoted by L ( T ) . Note that from the perspective of first-order logic,a partial order is a transitively oriented comparability graph. In particular, a tree-order is a triviallyperfect graph with a transitive orientation. 6 k -trees. For a positive integer k we let S k be the semigroup of all functions from [ k ] to [ k ] withcomposition as the semigroup operation. That is, for f, g ∈ S k we write f ◦ g ∈ S k for the functionthat maps every i ∈ [ k ] to f ( g ( i )) . An element f of a semigroup is idempotent if f ◦ f = f . An S k -tree is a tuple ( T, U, ρ, π ) , where T is a rooted tree, U is a set, ρ : E ( T ) → S k is a labeling of the edges of T by elements of S k , and π : U → V ( T ) is a mapping from U to the nodes of T . Rankwidth, cliquewidth and NLC-width.
There are various equivalent ways of capturing thetreelike structure of dense graphs via hierarchical decompositions. The best known measures areprobably rankwidth [36], cliquewidth [9], and
NLC-width [41]. All of these measures are equivalentin the sense that if one measure is bounded on a class of graphs, then the other measures are alsobounded [28, 36]. We are going to work with the following variant of NLC-width, which is easily seento be equivalent (in the above sense) to the original definition of NLC-width.Let ( T, U, ρ, π ) be an S k -tree. For x, y ∈ V ( T ) with x (cid:22) T y we denote by path T ( y, x ) =( e , . . . , e s ) the sequence of edges on the unique path in T from y to x . For v ∈ U and x (cid:22) T π ( v ) wefurther define path T ( v, x ) := path T ( π ( v ) , x ) . We implicitly extend ρ to sequences of edges as follows: ρ (( e , . . . , e s )) := ρ ( e s ) ◦ · · · ◦ ρ ( e ) . Definition 3.1.
Let k be a positive integer and let U be a set. A k -NLC-tree on U is a tuple T = ( T, U, ρ, π, η, χ ) , where ( T, U, ρ, π ) is an S k -tree, η : V ( T ) → [ k ] × [ k ] and χ : U → [ k ] . Weassume that η is symmetric: for all x ∈ V ( T ) and ( i, j ) ∈ [ k ] × [ k ] , we have ( i, j ) ∈ η ( x ) if and only if ( j, i ) ∈ η ( x ) . Let T = ( T, U, ρ, π, η, χ ) be a k -NLC-tree. We define the color in T of v ∈ U at a node x (cid:22) T π ( v ) of T as κ T ( v, x ) := ρ ( path ( v, x ))( χ ( v )) . The k -NLC-tree T generates the graph G T with vertexset U , defined as follows: For u (cid:54) = v ∈ U , let x = π ( u ) ∧ T π ( v ) . Then uv ∈ E ( G ) if and only if ( κ T ( u, x ) , κ T ( v, x )) ∈ η ( x ) .The NLC-width of a graph G is the minimum integer k such that there exists a k -NLC-tree thatgenerates G (see Figure 2 for an example of k -NLC-tree). TU u vπ ( u ) π ( v ) z = π ( u ) ∧ T π ( v ) χ ( u ) = • χ ( v ) = • e e f f f κ T ( u, z ) = ρ ( e ) ◦ ρ ( e )( χ ( u )) κ T ( v, z ) = ρ ( f ) ◦ ρ ( f ) ◦ ρ ( f )( χ ( v )) uv ∈ E ( G ) ⇐⇒ ( κ F ( u, z ) , κ F ( v, z )) ∈ η ( z ) π Figure 2: A k -NLC-tree T = ( T, U, ρ, π, η, χ ) , and how the adjacency of two vertices u and v isdetermined. 7et T = ( T, U, ρ, π, η, χ ) be a k -NLC-tree. Let F be a subtree of T and let top ( F ) be the rootof F , that is its (cid:22) T -least element. F naturally induces a k -NLC-tree T F = ( F, U F , ρ F , π F , η F , χ F ) ,where U F := { u ∈ U | π ( u ) (cid:23) T top ( F ) } , ρ F is the restriction of ρ to E ( F ) , π F ( v ) (for v ∈ U F ) isthe (cid:22) T -maximum element x of F with x (cid:22) T π ( v ) , η F is the restriction of η to V ( F ) , and χ F ( v ) := κ T ( v, π F ( v )) . Note that if F (cid:48) is a subtree of F , then ( T F ) F (cid:48) = T F (cid:48) . Remark 3.1.
Let G T and G T F denote the graphs generated by T and T F , respectively. Then if for some u, v ∈ U F we have u ∧ T v ∈ V ( F ) , then uv ∈ E ( G T ) if and only if uv ∈ E ( G T F ) . Definition 3.2. A factorization of T = ( T, U, ρ, π, η, χ ) is a partition P of T into vertex-disjointsubtrees. For a factorization P and a subtree F ∈ P , the k -NLC-tree T F is called the factor of T inducedby F . We define the quotient S k -tree T / P = ( Y, U, (cid:37), (cid:36) ) as follows (see Figure 3):• Y is the rooted tree with set of nodes P , where F is an ancestor of F (cid:48) in Y if and only if top ( F ) is an ancestor of top ( F (cid:48) ) in T (i.e. F (cid:22) Y F (cid:48) ⇐⇒ top ( F (cid:48) ) (cid:22) T top ( F ) );• (cid:37) is defined as (cid:37) ( F (cid:48) F ) = ρ ( path T ( top ( F (cid:48) ) , top ( F ))) , where F is the parent of F (cid:48) in Y ;• (cid:36) ( v ) is the tree F ∈ P that contains π ( v ) .Figure 3: Factors and quotient tree (dashed). The square nodes are the top nodes, and represent here thefactors in the quotient tree. Remark 3.2.
Let x (cid:22) T π ( v ) , and assume x ∈ V ( F ) , where F ∈ P . If π ( v ) ∈ V ( F ) , then we have ρ ( path T ( v, x )) = ρ F ( path F ( v, x )) . Otherwise, we have ρ ( path T ( v, x )) = ρ F ( path F ( v, x )) ◦ ρ ( e ( top ( F (cid:48) ))) ◦ (cid:37) ( path Y ( (cid:36) ( v ) , F (cid:48) )) ◦ ρ (cid:36) ( v ) ( path (cid:36) ( v ) ( v, top ( (cid:36) ( v )))) , where F (cid:48) is the child of F in Y satisfying top ( F (cid:48) ) (cid:22) T π ( v ) , and e ( top ( F (cid:48) )) is the edge that connects top ( F (cid:48) ) with its parent in T . Forward Ramsey and splendid trees.
A set A of elements of S k is forward Ramsey [7] if for all e, f ∈ A we have e ◦ f = e . In particular, each e ∈ A is an idempotent in S k , that is, e ◦ e = e . Notethat if A is forward Ramsey, then it is a semigroup (as it is obviously closed by composition). An S k -tree ( T, U, ρ, π ) is splendid if the set { ρ ( e ) : e ∈ E ( T ) } is forward Ramsey. It is shallow if it has height , i.e.every root-to-leaf path has at most one edge.The following lemma follows directly from [5, Lemma 3.6] (which is itself based on [7]).8 emma 3.1 ([5, Lemma 3.6]) . For every integer k there exists a sequence of classes of k -NLC-trees F ⊆ F ⊆ . . . ⊆ F k k and a partition map T (cid:55)→ P ( T ) , such that(1) F contains only single node k -NLC-trees, while F k k is the class of all k -NLC-trees, and(2) for every (cid:54) i (cid:54) k k and every k -NLC-tree T ∈ F i , the factorization P ( T ) of T is such that allthe factors induced by parts of P ( T ) belong to F i − and the quotient tree T / P ( T ) is either splendidor shallow. Let T be a k -NLC-tree. The map P ( · ) defines a recursive factorization of T , which can be representedas a rooted tree, whose root is T , where nodes are factors of T , and where the children of a factor T F are the factors of T F (thus of T ) induced by the parts of P ( T F ) .For a k -NLC-tree T , the depth of T is the minimum integer i such that T ∈ F i . Note that byLemma 3.1, the depth of T is always upper bounded by k k . In this section we prove that if a graph class C has bounded rankwidth and stable edge relation, then C can be transduced from a class of bounded treewidth. Therefore, let us fix positive integers k and h such that every graph in C admits a k -NLC-tree and does not contain a half-graph of order h as asemi-induced subgraph.We shall prove this inductively on the depth, as provided by Lemma 3.1. More precisely, in the i thstep of the induction we prove that graphs from C that admit a k -NLC-tree belonging to F i can betransduced from a class of bounded treewidth. Since the depth of any k -NLC-tree is bounded by k k ,the k k th step of the induction will end the proof of Theorem 1.2.Therefore, let us fix some graph G and a k -NLC-tree T = ( T, U, ρ, π, η, χ ) generating G . We let P = P ( T ) be the factorization of T given by Lemma 3.1, and we denote by ( Y, U, (cid:37), (cid:36) ) the quotient S k -tree T / P . Note that every factor of P has depth lower than that of T , hence we may apply theinduction assumption to it.We first show how to handle the case when ( Y, U, (cid:37), (cid:36) ) is splendid. Then we tackle the shallowcase, which is significantly simpler. Each of these cases finishes with a technical claim summarizing theanalysis. These claims are then used in a global induction scheme. As ( Y, U, (cid:37), (cid:36) ) is splendid, the set R = { (cid:37) ( e ) : e ∈ E ( Y ) } is forward Ramsey. The following lemmashows that the recolorings then have a particularly nice form. Lemma 3.2 (Claim 1 in Lemma 4.4 of [5]) . Let R ⊆ S k be forward Ramsey. Then, for some t (cid:62) , [ k ] canbe partitioned into parts γ , . . . , γ t so that for every f ∈ R and every i ∈ [ t ] there exists m i ∈ γ i suchthat f ( m ) = m i for all m ∈ γ i . By applying Lemma 3.2 to R we obtain a suitable partition Γ of [ k ] . For v ∈ U , we let γ ( v ) be thepart of Γ that contains κ T ( v, top ( (cid:36) ( v ))) . We call v a γ -vertex if γ ( v ) = γ . Types and blocks.
Throughout this section we use letters x, y, z etc. to denote the nodes of Y , whichare parts of the factorization P . For a node x of Y we denote by P ( x ) the set of all ancestors of x in Y ,except for x and its parent in Y , that is, P ( x ) = { y ∈ V ( Y ) : y (cid:22) Y x ↑↑ } . Recall that nodes of Y ,being factors of T , are subtrees of T , hence it is meaningful to say that a node a of T belongs to anode x of Y .Let x and y be two nodes of Y with y ∈ P ( x ) . Further, let γ ∈ Γ . Consider any vertex v ∈ U satisfying x ∧ Y (cid:36) ( v ) = y , and let a = top ( x ) ∧ T π ( v ) . (Note that a is a vertex of y , considered as asubtree of T .) Then we say that x is ( γ, y ) -adjacent to v if for some (equivalently, every) m ∈ γ we have (cid:16) κ T ( v, a ) , ρ (cid:0) path T ( top ( x ) , a ) (cid:1) ( m ) (cid:17) ∈ η ( a ) . x is ( γ, y ) -non-adjacent to v . Note here that by the properties of Γ assertedby Lemma 3.2, the value of ρ ( path T ( top ( x ) , a ))( m ) does not depend on the choice of m ∈ γ whenever a does not belong to x or its parent in Y .It may be useful to think of this definition as follows: if u and v are vertices in U , x = (cid:36) ( u ) , y = x ∧ Y (cid:36) ( v ) , y ∈ P ( x ) , and κ T ( u, top ( x )) ∈ γ (i.e. u is a γ -vertex), then u is adjacent to v in G ifand only if x is ( γ, y ) -adjacent to v .Fix γ , γ ∈ Γ and a node x ∈ V ( Y ) ; possibly γ = γ . For every node y ∈ P ( x ) , we define the ( γ , γ ) -type of y (seen from x ), denoted tp xγ ,γ ( y ) , as the pair s s where s i is set as the symbol• (cid:35) if there is no γ − i -vertex v ∈ U satisfying x ∧ Y (cid:36) ( v ) = y ; and otherwise:• + if x is ( γ i , y ) -adjacent to all the γ − i -vertices v ∈ U satisfying x ∧ Y (cid:36) ( v ) = y ;• − if x is ( γ i , y ) -non-adjacent to all the γ − i -vertices v ∈ U satisfying x ∧ Y (cid:36) ( v ) = y ; and• ± otherwise.The following lemma proves a basic synchronization property: for two nodes x , x ∈ Y , the typeswith respect to x and x synchronize above the parent of the least common ancestor of x and x . Lemma 3.3. If x , x ∈ Y and y ∈ P ( x ∧ Y x ) , then tp x γ ,γ ( y ) = tp x γ ,γ ( y ) .Proof. Let z = x ∧ Y x . Consider any m ∈ γ . We have (cid:37) ( path Y ( x , z ↑ ))( m ) = (cid:37) ( path Y ( z, z ↑ )) ◦ (cid:37) ( path Y ( x , z ))( m )= (cid:37) ( path Y ( z, z ↑ )) ◦ (cid:37) ( path Y ( x , z ))( m ) (by Lemma 3.2) = (cid:37) ( path Y ( x , z ↑ ))( m ) . Therefore, for every node a ∈ V ( T ) that belongs to y and is an ancestor of top ( x ) (equivalently, is anancestor of top ( x ) ), we have ρ ( path T ( top ( x ) , a ))( m ) = ρ ( top ( z ↑ ) , a ) ◦ (cid:37) ( path Y ( x , z ↑ ))( m )= ρ ( top ( z ↑ ) , a ) ◦ (cid:37) ( path Y ( x , z ↑ ))( m )= ρ ( path T ( top ( x ) , a ))( m ) . It follows that the first coordinates of tp x γ ,γ ( y ) and tp x γ ,γ ( y ) are equal. That the second coordinatesare equal as well follows from a symmetric reasoning.The next lemma contains the key combinatorial observation of the proof: a large alternation oftypes along P ( x ) gives rise to a large half-graph as a semi-induced subgraph. Lemma 3.4.
Suppose in P ( x ) there are nodes z (cid:96) ≺ Y y (cid:96) ≺ Y z (cid:96) − ≺ Y y (cid:96) − ≺ Y . . . ≺ Y z ≺ Y y such that one of the following conditions holds:• for each i ∈ [ (cid:96) ] , the first coordinate of tp xγ ,γ ( y i ) belongs to { + , ±} and the second coordinate of tp xγ ,γ ( z i ) belongs to {− , ±} ;• for each i ∈ [ (cid:96) ] , the first coordinate of tp xγ ,γ ( y i ) belongs to {− , ±} and the second coordinate of tp xγ ,γ ( z i ) belongs to { + , ±} .Then (cid:96) (cid:54) h .Proof. Let us assume that the first of the two conditions holds, as the proof in the second case isanalogous. Suppose for contradiction that (cid:96) > h . By the definition of types, for each i ∈ [ (cid:96) ] we canfind a γ -vertex v i that is ( γ , y i ) -adjacent to x . Similarly, for each i ∈ [ (cid:96) ] we can find a γ -vertex w i that is ( γ , z i ) -non-adjacent to x . It easily follows from Lemma 3.3 (see Figure 4) that vertices { v , v , . . . , v h +1 } and { w , w , w , . . . , w h − } semi-induce a half-graph of order h in G , a contradiction.10 ( x ) y z y z y z y z y h +1 y z y z y z y z y z y z y z y P ( x ) y z y z y z y z y h +1 y z y z y z y z y z y z y z y v v v v v h +1 w w w w G (cid:36) v v v v v h +1 w w w w (cid:36) G (cid:36) ( v h +1 ) (cid:36) ( w ) (cid:36) ( w ) (cid:36) ( w ) (cid:36) ( w ) (cid:36) ( v ) (cid:36) ( v ) (cid:36) ( v ) (cid:36) ( v ) (cid:36) ( v h +1 ) (cid:36) ( w ) (cid:36) ( w ) (cid:36) ( w ) (cid:36) ( w ) (cid:36) ( v ) (cid:36) ( v ) (cid:36) ( v ) (cid:36) ( v ) Figure 4: Illustration for Lemma 3.4. On the left, the first coordinate of tp xγ ,γ ( y i ) belongs to { + , ±} andthe second coordinate of tp xγ ,γ ( z i ) belongs to {− , ±} ; on the right, the first coordinate of tp xγ ,γ ( y i ) belongs to {− , ±} and the second coordinate of tp xγ ,γ ( z i ) belongs to { + , ±} . The green vertices areof class γ , the red ones of class γ . Thin edges correspond to paths in Y ; dashed arcs correspond to the (cid:36) mapping; fat edges correspond to edges (plain) and non edges (dotted) of G .From Lemma 3.4 we may derive several structural properties of the sequence of types of nodeson P ( x ) . We consider P ( x ) as a sequence ordered by the ancestor order, that is, the root of Y is thefirst element of this sequence. Let then Types ( x ) be the sequence of types tp xγ ,γ ( y ) for y ∈ P ( x ) ,ordered as in P ( x ) . In the following, by the type of y ∈ P ( x ) we mean the type tp xγ ,γ ( y ) .We call an interval J in the sequence Types ( x ) valid if it is of one of the following kinds:• A fully mixed interval consists of a single node whose type does not contain (cid:35) , but either contains ± or both + and − .• A positive interval consists only of nodes with types in { (cid:35)(cid:35) , + (cid:35) , (cid:35) + , ++ } .• A negative interval consists only of nodes with types in { (cid:35)(cid:35) , − (cid:35) , (cid:35) − , −−} .• A first-biased interval consists only of nodes with types in { (cid:35)(cid:35) , − (cid:35) , + (cid:35) , ± (cid:35) } .• A second-biased interval consists only of nodes with types in { (cid:35)(cid:35) , (cid:35) − , (cid:35) + , (cid:35) ±} .Note that the cases are not exclusive. An interval that is either first- or second-biased will be justcalled biased . Note that a biased interval can be simultaneously positive and negative. If a first-biased(resp. a second-biased) interval J is neither positive nor negative (that is, it includes a symbol ± or bothsymbols + and − ), then J is called mixed-first-biased (resp. mixed-second-biased ).For a node y ∈ P ( x ) , let J ( y ) be the longest valid interval in Types ( x ) that starts at the positioncorresponding to the node y . Then we define a partition Blocks ( x ) = { A , A , . . . } of Types ( x ) intosubsequences, called blocks , via the following greedy procedure: if P ( x ) = y y . . . y (cid:96) , then• A = J ( y ) ;• A = J ( y i +1 ) , where y i is the last element of A ;• A = J ( y i +1 ) , where y i is the last element of A , and so on.The construction finishes once all the nodes of P ( x ) are placed in the blocks. The blocks of Blocks ( x ) are naturally ordered as in Types ( x ) , i.e. A contains y that is the root of Y .The following lemma shows that the number of blocks in the sequence Blocks ( x ) is always boundedin terms of h — the order of the half-graph that is forbidden in the graphs from C . This is the keyobservation of the proof and, up to a technical reasoning, it follows from Lemma 3.4: many blocks giverise to a large half-graph in the generated graph. 11 emma 3.5. Blocks ( x ) contains at most h + 9 blocks.Proof. For contradiction suppose
Blocks ( x ) contains more than h + 9 blocks. Call a block mixed if itis either fully mixed, or mixed-first-biased, or mixed-second-biased. Claim.
Blocks ( x ) contains at most h + 2 fully-mixed blocks.Proof of the claim. Suppose there are at least h + 3 fully mixed blocks in Blocks ( x ) . Recall that eachfully mixed block consists of a single node of type belonging to { + − , − + , ±− , ± + , −± , + ± , ±±} .Hence, we may either find at least k + 2 nodes with types in the set { + − , + ± , ±− , ±±} , or at least h + 2 nodes with types in the set {− + , −± , ± + , ±±} . In both cases, these at least h + 2 nodes forma structure that is forbidden by Lemma 3.4, a contradiction. (cid:67) Claim.
Blocks ( x ) contains at most h + 1 mixed-first-biased blocks and at most h + 1 mixed-second-biased blocks.Proof of the claim. We prove the bound on the number of mixed-first-biased blocks. The bound formixed-second-biased blocks follows analogously with the roles of γ and γ exchanged.Suppose for contradiction that there are more than h + 1 mixed-first-biased blocks in Blocks ( x ) .Let X , . . . , X h +2 be any h + 2 of them, ordered as in Types ( x ) . For i ∈ [6 h + 1] , let z i be the nodeof P ( x ) that immediately follows the last node of X i . Note that by the construction of Blocks ( x ) ,the second coordinate of the type of z i cannot be (cid:35) , for otherwise z i would be in X i . In particular, z i / ∈ X i +1 and z i lies in P ( x ) strictly before X i +1 .As argued, for each i ∈ [6 h + 1] the second coordinate of the type of z i belongs to {− , + , ±} .Therefore, there exists a subset of indices I ⊆ [6 h + 1] of size h + 1 such that either for each i ∈ I ,the second coordinate of the type of z i belongs to {− , ±} , or for each i ∈ I , the second coordinate ofthe type of z i belongs to { + , ±} . Assume the former case, as the proof in the latter case is symmetric.Since each X i is a mixed-first-biased block, for each i ∈ I we may find a node y i ∈ X i such thatthe first coordinate of the type of y i belongs to { + , ±} . Now the nodes { y i , z i : i ∈ I } form a structureforbidden by Lemma 3.4, a contradiction. (cid:67) By the above claims, the total number of mixed blocks is at most k + 4 . Call a block unaffected if it is not mixed and the block succeeding it exists and is not mixed either. Then the total number ofunaffected blocks is larger than (60 h + 9) − · (24 h + 4) − h . Out of these, there are either morethan h unaffected positive blocks, or more than h unaffected negative blocks. Assume the formercase, as the proof in the latter case is symmetric.Let then B , . . . , B h +1 be any h + 1 unaffected positive blocks, and let C , . . . , C h +1 be thesuccessors of blocks B , . . . , B h +1 , respectively. Since B , . . . , B h +1 are unaffected and positive, itfollows that C , . . . , C h +1 are negative blocks. Observe that for each i ∈ [6 h + 1] , it cannot happenthat for all the nodes t ∈ B i ∪ C i , the first coordinate of the type of t is (cid:35) . Indeed, then B i ∪ C i wouldbe a first-biased interval, and therefore it would be a valid interval that would contain the block B i as aprefix. Similarly, for each i ∈ [6 h + 1] , it cannot happen that the second coordinate of the type of t is (cid:35) for all t ∈ B i ∪ C i . We conclude that for each i ∈ [6 h + 1] , we may find nodes y i ∈ B i and z i ∈ C i such that one of the following alternatives holds:• the first coordinate of the type of y i is not (cid:35) (and therefore must be + ) and the second coordinateof the type of z i is not (cid:35) (and therefore must be − ); or• the second coordinate of the type of y i is not (cid:35) (and therefore must be + ) and the first coordinateof the type of z i is not (cid:35) (and therefore must be − ).By the pigeonhole principle, one of these two alternatives holds for at least h + 1 indices i ∈ [6 h + 1] .Suppose this is the first alternative, as the proof in the other case proceeds analogously with the rolesof γ and γ exchanged. It now follows that if I ⊆ [6 h + 1] is a set of size h + 1 such that the firstalternative holds for each i ∈ I , then the nodes { y i , z i : i ∈ I } form a structure forbidden by Lemma 3.4,a contradiction. 12or a node x of Y , we define the following:• Q ( x ) is the set consisting of x and the parent of x in Y , if existent;• S ( x ) is the set containing, for each block A ∈ Blocks ( x ) , the (cid:22) Y -minimal element of A , the (cid:22) Y -minimal element of A whose type belongs to {− , ±} (if existent), and the (cid:22) Y -minimalelement of A whose type belongs to { + , ±} (if existent);• for each γ ∈ Γ , g γ ( x ) is the (cid:22) Y -maximal ancestor of x such that there exists a γ -vertex w satisfying g γ ( x ) (cid:22) Y (cid:36) ( w ) , or g γ ( x ) = ⊥ if no such ancestor exists.Further, let L ( x ) = Q ( x ) ∪ S ( x ) . By Lemma 3.5, we have | L ( x ) | (cid:54) · (60 h + 9) (cid:54) h. Intuitively, L ( x ) ∪ { g γ ( x ) : γ ∈ Γ } contains all vertices that are interesting from the point of viewof x . Recovering edges: combinatorial analysis.
Let us fix two vertices u , u ∈ U . Let x = (cid:36) ( u ) , x = (cid:36) ( u ) ,γ = γ ( u ) , γ = γ ( u ) . Adopting the notation from the previous section, we have sets P ( x ) and P ( x ) and their partitions Blocks ( x ) and Blocks ( x ) . Intuitively, our goal is to show that given sets L ( x ) and L ( x ) , we mayeither directly infer whether u and u are adjacent in G , or locate the node z = x ∧ Y x , that is, thelowest common ancestor of x and x . In the subsequent section we will implement this mechanism infirst-order logic. Lemma 3.3 implies that the sequences of types Types ( x ) and Types ( x ) agree on theprefix up to the grandparent of z .Let Z be the set consisting of:• z ;• the parent of z , if existent;• the child of z that is an ancestor of x , if existent; and• the child of z that is an ancestor of x , if existent.We will further work under the following assumption: L ( x ) ∩ Z = ∅ or L ( x ) ∩ Z = ∅ . ( ∗ )Intuitively, if assumption ( ∗ ) is not satisfied, then both L ( x ) and L ( x ) contain either z or its neighborin Y , and then locating z will be easy.Note that the root of Y always belongs to L ( x ) ∩ L ( x ) . Hence, assuming ( ∗ ), z is neither theroot of Y nor a child of the root of Y . Then both P ( x ) and P ( x ) are non-empty, implying that also Blocks ( x ) and Blocks ( x ) are non-empty. Let Blocks ( x ) = { A , A , . . . , A p } and Blocks ( x ) = { B , B , . . . , B q } , where blocks A i and B j are ordered naturally by the ancestor order so that the root of Y belongsto A and B . For a block A i , let top ( A i ) be the first (i.e. (cid:22) Y -minimal) node of A i ; define top ( B j ) analogously.Let i be the largest index such that top ( A i ) = top ( B i ) . Note that i is well-defined, because top ( A ) = top ( B ) . Let t = top ( A i ) = top ( B i ) . Since t is both an ancestor of x and of x , we have t (cid:22) Y z . Furthermore, since t ∈ L ( x ) ∩ L ( x ) , from ( ∗ ) we infer that t / ∈ Z . Lemma 3.6.
The node z has the following properties:1. z ∈ Q ( x ) or the first coordinate of tp x γ ,γ ( z ) is not equal to (cid:35) ; . z ∈ Q ( x ) or the second coordinate of tp x γ ,γ ( z ) is not equal to (cid:35) ;3. z ∈ A i ∪ B i .Proof. The first two points follow directly from the existence of vertices u and u . We are left with argu-ing that z ∈ A i ∪ B i . Suppose otherwise. Then both A i +1 and B i +1 exist, and moreover top ( A i +1 ) ≺ Y z and top ( B i +1 ) ≺ Y z . By the maximality of i we have top ( A i +1 ) (cid:54) = top ( B i +1 ) .By Lemma 3.3 and the construction of Blocks ( x ) and Blocks ( x ) , every ancestor of the grandparentof z is the top vertex of a block in Blocks ( x ) if and only if it is the top vertex of a block in Blocks ( x ) .Therefore, top ( A i +1 ) (cid:54) = top ( B i +1 ) together with top ( A i +1 ) ≺ Y z and top ( B i +1 ) ≺ Y z implies that top ( A i +1 ) ∈ Z and top ( B i +1 ) ∈ Z . As top ( A i +1 ) ∈ L ( x ) and top ( B i +1 ) ∈ L ( x ) , this contradictsassumption ( ∗ ).Let R := { r : t (cid:22) Y r (cid:22) Y z and r / ∈ Z } . Note that t ∈ R , hence R is non-empty. By Lemma 3.3, wehave tp x γ ,γ ( r ) = tp x γ ,γ ( r ) for each r ∈ R. (1)From the construction of Blocks ( x ) and of Blocks ( x ) it then follows that R ⊆ A i ∩ B i . (2)We now observe the following. Lemma 3.7.
There exists r ∈ R such that tp x γ ,γ ( r ) = tp x γ ,γ ( r ) (cid:54) = (cid:35)(cid:35) . Proof.
Suppose otherwise: tp x γ ,γ ( r ) = tp x γ ,γ ( r ) = (cid:35)(cid:35) for all r ∈ R . By Lemma 3.6, we either have z ∈ Q ( x ) , or tp x γ ,γ ( z ) (cid:54) = (cid:35)(cid:35) . The latter condition implies that either A i +1 exists and top ( A i +1 ) ∈ Z ,or the (cid:22) Y -minimal element of block A i whose type features a non- (cid:35) symbol belongs to Z . In each ofthese three cases we have L ( x ) ∩ Z (cid:54) = ∅ . A symmetric reasoning shows that also L ( x ) ∩ Z (cid:54) = ∅ . Thisis a contradiction with assumption ( ∗ ).We introduce the following notation. For γ ∈ Γ and y ∈ V ( Y ) , if there is a unique grandchild y (cid:48) of y in Y such that for every γ -vertex v satisfying y (cid:22) Y (cid:36) ( v ) we have y (cid:48) (cid:22) Y (cid:36) ( v ) , then we set h γ ( y ) = y (cid:48) . If there is no such grandchild, we set h γ ( y ) = ⊥ . Lemma 3.8.
None of the blocks A i or B i is fully mixed. Moreover, depending on the kinds the blocks A i and B i belong to, we have the following cases:1. If A i is not biased, then• either A i is positive and u u ∈ E ( G ) ,• or A i is negative and u u / ∈ E ( G ) .2. If B i is not biased, then• either B i is positive and u u ∈ E ( G ) ,• or B i is negative and u u / ∈ E ( G ) .3. If both A i and B i are biased, then• either both A i and B i are first-biased, and then h γ ( z ) (cid:54) = ⊥ ,• or both A i and B i are second-biased and then h γ ( z ) (cid:54) = ⊥ .Proof. First, we observe the following. 14 laim.
None of the blocks A i or B i is fully mixed.Proof of the claim. Recall that a fully mixed block consists of one node whose type does not featuresymbol (cid:35) , but features either ± or both + and − . Therefore, if any of A i or B i was fully mixed, thenboth of them would be, implying that A i = B i = { t } . This stands in contradiction with Lemma 3.6. (cid:67) Next, we treat the case when A i or B i is not biased. Claim.
Suppose A i is not biased. Then exactly one of the following holds: A i is positive and u u ∈ E ( G ) ,or A i is negative and u u / ∈ E ( G ) . Symmetrically, supposing B i is not biased, exactly one of the followingholds: B i is positive and u u ∈ E ( G ) , or B i is negative and u u / ∈ E ( G ) .Proof of the claim. We prove the first assertion; the reasoning proving the second one is symmetric.By the previous claim and the assumption, A i is neither fully mixed, nor first-biased, nor second-biased. Therefore, A i is either positive or negative. Note that by Lemma 3.7 and (2), A i cannot be bothpositive and negative at the same time. It remains to prove that if A i is positive, then u u ∈ E ( G ) ;the proof that A i being negative entails u u / ∈ E ( G ) is symmetric.Note that if we have z ∈ A i , then A i being positive immediately implies that u u ∈ E ( G ) .Therefore, suppose that z / ∈ A i , which implies that z (cid:22) top ( A i +1 ) and as top ( B i +1 ) (cid:54) = top ( A i +1 ) (by definition of i ), z ∈ L ( x ) and thus L ( x ) ∩ Z (cid:54) = ∅ . By Lemma 3.6, we have z ∈ B i . Supposefor contradiction that u u / ∈ E ( G ) . Then the second coordinate of tp x γ ,γ ( z ) has to be either − or ± . However, since A i is positive, from (1) and (2) we infer that types tp x γ ,γ ( r ) for r ∈ R featureonly symbols (cid:35) and + . Therefore, the (cid:22) Y -minimal element of B i that contains symbol − or ± iseither z or its parent, implying that L ( x ) ∩ Z (cid:54) = ∅ . Together with L ( x ) ∩ Z (cid:54) = ∅ , this contradictsassumption ( ∗ ). (cid:67) We are left with the case when both A i and B i are biased. First, we observe that they need to bebiased in the same direction. Claim.
If both A i and B i are biased, then exactly one of the following holds: both A i and B i are first-biased,or both A i and B i are second-biased.Proof of the claim. Follows directly from Lemma 3.7 together with (2). (cid:67)
We now show how to locate z in this case. Claim.
Suppose A i and B i are both first-biased. Then z ∈ A i and z = g γ ( x ) ; in particular z ∈ P ( x ) .Moreover, there exists a grandchild z of z such that for every γ -vertex v satisfying z (cid:22) Y (cid:36) ( v ) , we infact have z (cid:22) Y (cid:36) ( v ) . Also, there exist γ -vertices satisfying this condition.In other words, h γ ( z ) = z .Proof of the claim. Since B i is first-biased, from Lemma 3.6(2) we infer that z ∈ Q ( x ) . It implies that L ( x ) ∩ Z (cid:54) = ∅ and that z / ∈ P ( x ) thus z / ∈ B i . By Lemma 3.6(3), z ∈ A i . As z / ∈ B i and R ⊆ B i , wehave L ( x ) ∩ Z (cid:54) = ∅ . Therefore, from assumption ( ∗ ) we conclude that L ( x ) ∩ Z = ∅ .As z ∈ A i , we in particular have z ∈ P ( x ) , hence z is neither x nor the parent of x . Let then z be the grandchild of z such that z (cid:22) Y x . Further, let z (cid:48) be the parent of z . Note that z (cid:48) ∈ Z . Since L ( x ) ∩ Z = ∅ , we must have z (cid:48) ∈ A i .Since A i is first-biased and z, z (cid:48) ∈ A i , the second coordinates of tp x γ ,γ ( z ) and of tp x γ ,γ ( z (cid:48) ) areboth (cid:35) . Therefore, there are no γ -vertices v satisfying x ∧ Y (cid:36) ( v ) = z or x ∧ Y (cid:36) ( v ) = z (cid:48) , whichmeans that for every γ -vertex v satisfying z (cid:22) Y (cid:36) ( v ) , we in fact have z (cid:22) Y (cid:36) ( v ) . That there exist γ -vertices satisfying this condition is witnessed by u . (cid:67) A symmetric reasoning yields the following. 15 laim.
Suppose A i and B i are both second-biased. Then z ∈ B i and z = g γ ( x ) ; in particular z ∈ P ( x ) .Moreover, there exists a grandchild z of z such that for every γ -vertex v satisfying z (cid:22) Y (cid:36) ( v ) , we infact have z (cid:22) Y (cid:36) ( v ) . Also, there exist γ -vertices satisfying this condition.In other words, h γ ( z ) = z . The presented claims verify all the assertions from the lemma statement.
Recovering edges: logical implementation.
We now define a structure H T which encodes all therelevant information about the k -NLC-tree T and its factorization P . Intuitively, H T encodes T in thenatural way, plus in addition we enrich it with pointers encoding sets L ( x ) and functions g γ ( x ) , h γ ( x ) .Formally, the universe of H T is just V ( T ) ; note that the set U will not be directly encoded. In H T we will use only unary predicates and unary (partial) functions. Of course, the latter can be replaced bysuitable functional binary relations in order to make the signature purely relational. In the following,whenever we encode some node y that belongs to the quotient tree Y , we represent it using top ( y ) .For instance, the parent function in Y is represented as a partial function on the nodes of T that maps top ( x ) to top ( x (cid:48) ) whenever x (cid:48) is the parent of x in Y .For x ∈ V ( Y ) , let (cid:98) L ( x ) ⊆ V ( Y ) be the set containing every ancestor of x that:• belongs to L ( x ) ,• is the parent of a node of L ( x ) ,• is the child of a node of L ( x ) on P ( x ) , or• is the grandchild of a node of L ( x ) on P ( x ) .Recalling that | L ( x ) | (cid:54) h , we have | (cid:98) L ( x ) | (cid:54) h . Also, for x ∈ V ( Y ) and γ ∈ Γ , we let (cid:98) g γ ( x ) bethe child of g γ ( x ) that is an ancestor of x . In case g γ ( x ) = x , we set (cid:98) g γ ( x ) = ⊥ .In the following encoding, all values featuring ⊥ are removed from the domains of correspondingmappings. Then, in H T we encode:• the parent function of the tree T ;• the parent function of the tree Y ;• the mapping a (cid:55)→ ρ ( e ( a )) , where a is a node of T and e ( a ) is the edge of T connecting a with itsparent;• the mapping x (cid:55)→ (cid:37) ( e ( x )) , where x is a node of Y and e ( x ) is the edge of Y connecting x withits parent;• the mappings a (cid:55)→ top ( x ( a )) and a (cid:55)→ ρ ( path T ( a, top ( x ( a )))) , where a is a node of T and x ( a ) is the node of Y such that a ∈ x ( a ) ;• for each γ ∈ Γ , the mappings x (cid:55)→ g γ ( x ) , x (cid:55)→ (cid:98) g γ ( x ) , and x (cid:55)→ h γ ( x ) ;• for each γ ∈ Γ , the mapping x (cid:55)→ (cid:37) ( path Y ( x, (cid:98) g γ ( x ))) ;• the mapping x (cid:55)→ (cid:98) L ( x ) , together with relevant data about the elements of (cid:98) L ( x ) ; and• for every node x of Y and y ∈ (cid:98) L ( x ) , the value (cid:37) ( path Y ( x, y )) .Here, the last two points require more explanation. Recall that | (cid:98) L ( x ) | (cid:54) h for each x ∈ V ( Y ) .Therefore, to encode the mapping x (cid:55)→ (cid:98) L ( x ) we use h distinct unary functions, where the i thfunction maps a node x ∈ V ( Y ) to the i th element of (cid:98) L ( x ) , sorted by the ancestor order. The relevantdata about a node y ∈ (cid:98) L ( x ) includes whether y is the (cid:22) Y -minimal node of some block of Blocks ( x ) andif so, what kind of block it is (positive or negative, first-biased or second-biased, etc.). This informationcan be encoded using unary predicates at x . Similarly, to encode the values (cid:37) ( path Y ( x, y )) for y ∈ (cid:98) L ( x ) ,we use h distinct unary predicates at x , where the i th predicate encodes (cid:37) ( path Y ( x, y )) where y isthe i th element of (cid:98) L ( x ) .We later use some properties of H T that follow from the synchronization property expressed byLemma 3.3. For this, for a node a of T , we define N ↑ ( a ) to be the set of all nodes b of T such that b ≺ T a and there is a function f in H T such that b = f ( a ) or a = f ( b ) . Then we have the following. Lemma 3.9.
For each a ∈ V ( T ) , (cid:12)(cid:12)(cid:12) { b ∈ V ( T ) : b ≺ T a } ∩ (cid:91) a (cid:48) (cid:23) T a N ↑ ( a (cid:48) ) (cid:12)(cid:12)(cid:12) (cid:54) h + 2 k + 4 . roof. Let x ∈ V ( Y ) be such that a ∈ x . From Lemma 3.3 and the construction of the blocks it followsthat for all x (cid:48) , x (cid:48)(cid:48) ∈ V ( Y ) such that top ( x (cid:48) ) , top ( x (cid:48)(cid:48) ) (cid:23) T a , we have L ( x (cid:48) ) ∩ P ( x ) = L ( x (cid:48)(cid:48) ) ∩ P ( x ) . Thus, (cid:98) L ( x (cid:48) ) ∩ P ( x ↑ ) = (cid:98) L ( x (cid:48)(cid:48) ) ∩ P ( x ↑ ) for all such x (cid:48) , x (cid:48)(cid:48) . Let M be this common subset of P ( x ↑ ) ; note that (cid:98) L ( x (cid:48) ) ∩ P ( x ) ⊆ M ∪ { x ↑↑ } . Let M (cid:48) = { top ( z ) : z ∈ M } ∪ { top ( x ↑↑ ) } ; then | M (cid:48) | (cid:54) h + 1 .Similarly, for all x (cid:48) , x (cid:48)(cid:48) as above, we have { g γ ( x (cid:48) ) , (cid:98) g γ ( x (cid:48) ) : γ ∈ Γ } ∩ P ( x ) = { g γ ( x (cid:48)(cid:48) ) , (cid:98) g γ ( x (cid:48)(cid:48) ) : γ ∈ Γ } ∩ P ( x ) , so let M be this common subset of P ( x ) and let M (cid:48) = { top ( z ) : z ∈ M } . Note that | M (cid:48) | (cid:54) | Γ | (cid:54) k .It can now be easily seen from the construction of H T that for each a (cid:48) (cid:23) T a , we have { b ∈ V ( T ) : b (cid:22) T a } ∩ N ↑ ( a (cid:48) ) ⊆ M (cid:48) ∪ M (cid:48) ∪ { a ↑ , top ( x ) , top ( x ↑ ) } . Since the set on the right hand side has size at most h + 2 k + 4 , the claim follows.Our next goal is to implement the combinatorial analysis described in the previous section usingfirst-order formulas working over H T . Before we do this, let us see how the information about elementsof U can be recovered from H T . Suppose u ∈ U is a vertex for which we know that π ( u ) = a and χ ( u ) = c . Then (cid:36) ( u ) can be easily inferred as top ( x ( a )) . Similarly, the color κ T ( u, (cid:36) ( u )) can beobtained by applying ρ ( path T ( a, top ( x ( a )))) to c . This in particular gives the value of γ ( u ) . Finally,whenever for some ancestor y of x = (cid:36) ( u ) , the value of (cid:37) ( path Y ( x, y )) is stored in H T , then the color κ T ( u, top ( y )) can be obtained by applying (cid:37) ( path Y ( x, y )) to κ T ( u, (cid:36) ( u )) . This may happen when y = (cid:98) g γ ( x ) for some γ ∈ Γ , or when y ∈ (cid:98) L ( x ) .We are now ready to provide the promised implementation. Lemma 3.10.
Fix c , c ∈ [ k ] . Then there are formulas ϕ c ,c ( p , p ) , ψ c ,c ( p , p ) , and { ζ c ,c ,d ,d ( p , p , q, q , q ) : d , d ∈ [ k ] } in the vocabulary of H T such that the following holds for all distinct u , u ∈ U satisfying χ ( u ) = c and χ ( u ) = c , where a = π ( u ) and a = π ( u ) .• If H T | = ϕ c ,c ( a , a ) , then u and u are adjacent in G if and only if H T | = ψ c ,c ( a , a ) .• If H T (cid:54)| = ϕ c ,c ( a , a ) , then there is a unique -tuple ( d , d , t, t , t ) ∈ [ k ] × V ( T ) such that H T | = ζ c ,c ,d ,d ( a , a , t, t , t ) : – t = top ( (cid:36) ( u ) ∧ Y (cid:36) ( u )) ; – t is the (cid:22) T -maximum node of (cid:36) ( u ) ∧ Y (cid:36) ( u ) satisfying t (cid:22) T π ( u ) ; – t is the (cid:22) T -maximum node of (cid:36) ( u ) ∧ Y (cid:36) ( u ) satisfying t (cid:22) T π ( u ) ; – d = κ T ( u , t ) ; and – d = κ T ( u , t ) .Proof. We explain how, given a , a ∈ V ( T ) , c , c ∈ [ k ] , and access to the information present in H T ,to either determine whether u and u are adjacent in G or not, or find the -tuple ( d , d , t, t , t ) descibed in the statement. It is straightforward to encode the explained mechanism in first-order logic,which gives rise to the postulated first-order formulas.Let us adopt the notation from the previous section for u and u . In particular, u is a γ -vertex, u is a γ -vertex, (cid:36) ( u ) = x , (cid:36) ( u ) = x , and z = x ∧ Y x . As argued, γ , γ , x , x can be inferredfrom c , c , a , a given access to H T .As the first step, we find the (cid:22) Y -maximal element of (cid:98) L ( x ) ∩ (cid:98) L ( x ) . Call it ˜ z . First, we consider thecorner case when x = x = ˜ z . Then we have: 17 t = top ( x ) = top ( x ) ;• t = a ;• t = a ;• d = c ; and• d = c .Second, we check whether both (cid:98) L ( x ) and (cid:98) L ( x ) contain a child of ˜ z . Suppose for a moment thatthis is the case, and let z (cid:48) and z (cid:48) be these children, respectively. Then by the maximality of ˜ z , we musthave z (cid:48) (cid:54) = z (cid:48) , implying z = ˜ z . It follows that:• t = top ( z ) ;• t is the parent in T of top ( z (cid:48) ) ;• t is the parent in T of top ( z (cid:48) ) ;• d = ρ ( e ( top ( z (cid:48) ))) ( κ T ( u , top ( z (cid:48) ))) ; and• d = ρ ( e ( top ( z (cid:48) ))) ( κ T ( u , top ( z (cid:48) ))) .As we argued, these values can be retrieved from H T given c , c , a , a .Next, we consider a mix of the two cases above: x = ˜ z and ˜ z has a child z (cid:48) that belongs to (cid:98) L ( x ) .Then again we have z = ˜ z and:• t = top ( z ) ;• t = a ;• t is the parent in T of top ( z (cid:48) ) ;• d = c ; and• d = ρ ( e ( top ( z (cid:48) ))) ( κ T ( u , top ( z (cid:48) ))) .The case when x = ˜ z and ˜ z has a child z (cid:48) that belongs to (cid:98) L ( x ) is symmetric.We claim that the four cases considered above cover all the situations when assumption ( ∗ ) is notsatisfied, that is, when L ( x ) ∩ Z (cid:54) = ∅ and L ( x ) ∩ Z (cid:54) = ∅ . Indeed, if this is the case, then (cid:98) L ( x ) and (cid:98) L ( x ) both contain z . Moreover, (cid:98) L ( x ) contains the child of z that is an ancestor of x , if existent, andsimilarly (cid:98) L ( x ) contains the child of z that is an ancestor of x , if existent. Then z = ˜ z and in eitherway, one of the four cases considered above applies.Hence, from now on we proceed under the assumption that ( ∗ ) holds. Consequently, all the claimspresented in the previous section can be applied.Denoting P ( x ) = { A , . . . , A p } and P ( x ) = { B , . . . , B q } , we find the largest index i such that top ( A i ) = top ( B i ) . Note that i and the kinds to which blocks A i and B i belong can be retrieved usingthe information stored along with sets (cid:98) L ( x ) and (cid:98) L ( x ) .By Lemma 3.8, none of the blocks A i or B i can be fully mixed. If either A i or B i is not biased, wemay use Lemma 3.8-(1) and Lemma 3.8-(2) to directly infer whether u and u are adjacent in G ornot. We are left with the case when both A i and B i are biased. By Lemma 3.8-(3), they are either bothfirst-biased, or both second-biased.Suppose that both A i and B i are first-biased. Then, by Lemma 3.8, we have:• z = g γ ( x ) ;• z = h γ ( z ) (cid:54) = ⊥ ;• if z (cid:48) is the parent in Y of z , then t is the parent in T of top ( z (cid:48) ) ; and• if d (cid:48) is the unique element of (cid:37) ( e ( z ))( γ ) , then d = ρ ( e ( top ( z (cid:48) )))( d (cid:48) ) .Here, the fact that (cid:37) ( e ( z ))( γ ) consists of exactly one element of γ is implied by the fact that T / P issplendid, as asserted by Lemma 3.2. It remains to retrieve t and d . For this, by Lemma 3.8 we observethat if (cid:98) g γ ( x ) = ⊥ then x = z and we have• t = a and• d = c .Otherwise, if (cid:98) g γ ( x ) (cid:54) = ⊥ , then (cid:98) g γ ( x ) is the ancestor of x that is a child of z and we have:• t is the parent in T of top ( (cid:98) g γ ( x )) and• d = ρ ( e ( (cid:98) g γ ( x ))) ( κ T ( u , top ( (cid:98) g γ ( x )))) .18e case when both A i and B i are second-biased is symmetric. As in all the cases we have eitherconcluded whether u and u are adjacent or not, or we have determined the -tuple ( d , d , t, t , t ) ,this finishes the proof. We now treat the case when the quotient tree ( Y, U, (cid:37), (cid:36) ) is shallow; recall that this means that Y has height . As in the previous section, we encode T in a structure H T whose universe is V ( T ) . Weencode the following information in H T :• the parent function of the tree T ;• the mapping a (cid:55)→ ρ ( e ( a )) , where a is a node of T and e ( a ) is the edge of T connecting a with itsparent;• the mapping a (cid:55)→ top ( x ( a )) , where a is a node of T and x ( a ) is the node of Y such that a ∈ x ( a ) ;and• the mapping a (cid:55)→ ρ ( path T ( a, top ( x ( a )))) .For a ∈ V ( T ) we define N ↑ ( a ) as before: N ↑ ( a ) comprises all strict ancestors of a in T that are boundto a via functions present in H T . We have the following analogue of Lemma 3.9. Lemma 3.11.
For each a ∈ V ( T ) , (cid:12)(cid:12)(cid:12) { b ∈ V ( T ) : b (cid:22) T a } ∩ (cid:91) a (cid:48) (cid:23) T a N ↑ ( a (cid:48) ) (cid:12)(cid:12)(cid:12) (cid:54) . Proof.
The only nodes that may be contained in the involved set are a ↑ and top ( x ( a )) .We may also prove the following analogue of Lemma 3.10. Lemma 3.12.
Fix c , c ∈ [ k ] . Then there formulas { ζ c ,c ,d ,d ( p , p , q, q , q ) : d , d ∈ [ k ] } in the vocabulary of H T such that the following holds for all distinct u , u ∈ U satisfying c = χ ( u ) and c = χ ( u ) , where a = π ( u ) and a = π ( u ) . There is a unique -tuple ( d , d , t, t , t ) ∈ [ k ] × V ( T ) such that H T | = ζ c ,c ,d ,d ( a , a , t, t , t ) :• t = top ( (cid:36) ( u ) ∧ Y (cid:36) ( u )) ;• t is the (cid:22) T -maximum node of (cid:36) ( u ) ∧ Y (cid:36) ( u ) satisfying t (cid:22) T π ( u ) ;• t is the (cid:22) T -maximum node of (cid:36) ( u ) ∧ Y (cid:36) ( u ) satisfying t (cid:22) T π ( u ) ;• d = κ T ( u , t ) ; and• d = κ T ( u , t ) .Proof. As in the proof of Lemma 3.10, we describe a mechanism of determining ( d , d , t, t , t ) from c , c , a , a given access to H T . It is straightforward to formulate this mechanism in first-order logic,which gives rise to the postulated formulas.Let x = (cid:36) ( u ) and x = (cid:36) ( u ) ; note that x and x can be inferred from a and a . First, wecheck whether x = x . If this is the case, then we have• t = top ( x ) = top ( x ) ;• t = a ;• t = a ;• d = c ; and• d = c .Otherwise, x ∧ Y x is equal to the root r of Y . Then:19 t = top ( r ) is the root of T ;• t = a if x = r , or t is the parent of top ( x ) in T otherwise;• t = a if x = r , or t is the parent of top ( x ) in T otherwise;• d = c if x = r , or d = ρ ( e ( top ( x ))) ◦ ρ ( path T ( a , top ( x )))( c ) otherwise; and• d = c if x = r , or d = ρ ( e ( top ( x ))) ◦ ρ ( path T ( a , top ( x )))( c ) otherwise.This concludes the proof. We now utilize the understanding obtained in the previous sections to complete the proof of Theorem 1.2through an induction scheme. Let (cid:96) (cid:54) k k be the length of the sequence of classes provided byLemma 3.1.Recall that we work with a k -NLC-tree T = ( T, U, ρ, π, η, χ ) generating G . We define a sequenceof factorizations Q , . . . , Q (cid:96) of T though backward induction as follows:• Q (cid:96) consists of one factor, being the whole tree T itself; and• for i < (cid:96) , Q i is obtained from Q i +1 by replacing each factor F ∈ Q i with all the factors of P ( T F ) .Thus, Lemma 3.1 asserts that Q is a factorization of T into single-node factors.Next, for each i ∈ [ (cid:96) ] and factor F ∈ Q i we define a structure J F . Intuitively, J F encodes thestructure H T F that we defined in the previous section, as well as all the structures J F (cid:48) for F (cid:48) ∈ P ( T F ) ,constructed in the previous step of the induction. Thus, the universe of T F is V ( F ) , while the relationsin T F are defined by induction on i as follows.For i = 1 , the tree F has exactly one node, say a . Structure J F stores only the value η ( a ) , encodedusing unary relations on a .For i > , the structure J F is constructed as a superposition of the structure H T F and struc-tures J F (cid:48) for F (cid:48) ∈ P ( T F ) as follows. First, consider the induced k -NLC-tree T F and construct thestructure H T F for it as in the previous section. This structure has V ( F ) as its universe. Next, for eachfactor F (cid:48) ∈ P ( T F ) , consider the structure J F (cid:48) constructed in the previous step of induction and add allthe tuples from all the relations of J F (cid:48) to J F . While doing this, we reuse relation names: we assumethat all the structures J F (cid:48) are over the same vocabulary, so to obtain a relation R from this vocabularyin J F we take the union of relations R taken from structures J F (cid:48) for F (cid:48) ∈ P ( T F ) . Note here that theuniverses of structures J F (cid:48) are pairwise disjoint, and the vocabulary used for encoding H T F is assumedto be disjoint from the vocabulary used for encoding structures J F (cid:48) . Finally, for technical reasons weadd to J F a function root i ( · ) that maps each node a ∈ V ( F ) to the root of F .Let now J T := J T , where T is the unique factor of Q (cid:96) . Further, let J (cid:63) T be the structure obtainedfrom J T by adding U to the universe, together with unary and binary relations encoding mappings u (cid:55)→ π ( u ) and u (cid:55)→ χ ( u ) , for u ∈ U .First, we verify that J (cid:63) T contains all the information needed to reconstruct G . Lemma 3.13.
There is a first-order formula α ( p , p ) over the vocabulary of J (cid:63) T such that for all u , u ∈ U ,we have J (cid:63) T | = α ( u , u ) if and only if u u ∈ E ( G ) .Proof. For a pair of vertices a , a ∈ V ( T ) , let the level of ( a , a ) be the smallest integer i such that a and a belong to the same factor of Q i . As Q (cid:96) consists of one factor — the whole tree T — the levelof every pair is upper bounded by (cid:96) . We shall inductively define formulas β ic ,c ( p , p ) for c , c ∈ [ k ] and i ∈ [ (cid:96) ] satisfying the following property: for every pair ( a , a ) ∈ V ( T ) of level at most i , ifthere are vertices u , u ∈ U satisfying π ( u ) = a , π ( u ) = a , χ ( u ) = c , and χ ( u ) = c , then J (cid:63) T | = β ic ,c ( a , a ) iff u u ∈ E ( G ) . If we succeed in this, then formula α ( u , u ) can be written byfirst defining a = π ( u ) , a = π ( u ) , c = χ ( u ) , and c = χ ( u ) , and then applying β (cid:96)c ,c ( a , a ) .Consider first the base case i = 1 . As factorization Q places every node of T in a different factor,then condition that ( a , a ) has level at most boils down to a = a . Hence β c ,c ( a , a ) only needsto check that a = a and that ( c , c ) ∈ η ( a ) . 20e proceed to the induction step. Let F be the factor of Q i that contains both a and a . Weshall assume that the quotient tree T F / P ( T F ) is splendid, hence we will use formulas provided byLemma 3.12 for the k -NLC-tree T F . Note here that the structure H T F encoding T F is contained in J (cid:63) T . Hence, these formulas may be applied in J (cid:63) T in the same manner as in H T F , provided that weappropriately relativize them to the elements of V ( F ) ; these can be distinguished as elements mappedto the root of F by root i ( · ) . The reasoning in the other case, when T F / P ( T F ) is shallow, proceeds inthe same way and is even simpler, as we may use Lemma 3.12 instead of Lemma 3.10.We first check whether ϕ c ,c ( a , a ) holds in H T F . If this is the case, then we may immediatelydetermine whether u and u are adjacent in G by checking whether ψ c ,c ( a , a ) holds in H T F .Otherwise, using formulas ζ c ,c ,d ,d ( p , p , q, q , q ) we can find suitable colors d , d ∈ [ k ] and nodes t, t , t ∈ V ( F ) , as described in Lemma 3.10. Note here that if F (cid:48) is the factor of P ( T F ) that containsthe least common ancestor of a and a , then• t = top ( F (cid:48) ) ;• t = π F (cid:48) ( u ) ;• t = π F (cid:48) ( u ) ;• d = χ F (cid:48) ( u ) ; and• d = χ F (cid:48) ( u ) .Hence, to decide whether u u ∈ E ( G ) , it suffices to check whether J (cid:63) T | = α i − d ,d ( t , t ) , which is aformula that we constructed in the previous step of induction.Recall that the Gaifman graph of a structure A is the undirected graph Gaif ( A ) whose vertexset is the universe of A , and where two elements are considered adjacent if and only if they appearsimultaneously in a tuple in a relation in A . Define D := { Gaif ( J (cid:63) T ) : T is a k -NLC-tree generating a graph from C } . That the class D has bounded treewidth is then proved using the characterization of treewidththrough the strong reachability relation, with the help of Lemma 3.9 and Lemma 3.11.For the proof of Lemma 3.14, we need several definitions.Let G be a graph and let (cid:54) be a vertex ordering of G , that is, a linear order on the vertex set of G .For a vertice u and v of G , we say that v is strongly reachable from u in (cid:54) if v (cid:54) u and in G thereexists a path P from u to v such that u < w for every internal vertex w of P . Then, we define the strong reachability set of u , denoted SReach ∞ [ G, (cid:54) , u ] as the set of all vertices of G that are stronglyreachable from u in (cid:54) . The strong ∞ -coloring number of G is defined as scol ∞ ( G ) = min (cid:54) max u ∈ V ( G ) | SReach ∞ [ G, (cid:54) , u ] | , where the minimum ranges over all vertex orderings of G . It is folklore that the strong ∞ -coloringnumber essentially coincides with treewidth. Theorem 3.1 (see e.g. Chapter 1, Theorem 1.19 of [37]) . For every graph G , the treewidth of G is equalto scol ∞ ( G ) − . We now use Theorem 3.1 together with Lemma 3.9 and Lemma 3.11 to prove the following.
Lemma 3.14.
For every graph G ∈ D , the treewidth of G is at most k k · (836 h + 2 k + 4) .Proof. By Theorem 3.1, it suffices to give a vertex ordering of G where each strong reachability set hassize at most k k · (836 h + 2 k + 4) + 1 . Let G = Gaif ( J (cid:63) T ) , where T = ( T, U, ρ, π, η, χ ) is a k -NLC-treethat generates a graph from C . Then V ( G ) = U ∪ V ( T ) . Let (cid:54) be a vertex ordering of G constructedas follows: first put all the nodes of T in any order that extends (cid:22) T (that is, u (cid:22) T v entails u (cid:54) v ),and then put all the vertices of U in any order. Our goal is to establish an upper bound on the sizes ofstrong reachability sets with respect to the ordering (cid:54) .21bserve that for u ∈ U , we have SReach ∞ [ G, (cid:54) , u ] = { u, π ( u ) } , so this is a set of size . Considerthen any a ∈ V ( T ) . From the construction of J T it follows that all the edges of G which connect twonodes V ( T ) in fact connect a node of T with its ancestor. Hence, we have SReach ∞ [ G, (cid:54) , a ] ⊆ { a } ∪ (cid:96) (cid:91) i =1 N ↑ i ( a ) , where N ↑ i ( a ) is the set N ↑ ( a ) evaluated in the structure H T Fi , where F i is the factor from Q i thatcontains a . By Lemma 3.9 and Lemma 3.11, each of the sets N ↑ i ( a ) has size at most h + 2 k + 4 , so | SReach ∞ [ G, (cid:54) , a ] | (cid:54) (cid:96) · (836 h + 2 k + 4) + 1 = 3 k k · (836 h + 2 k + 4) + 1 , as required.The bound obtained in Lemma 3.14 is not optimal, and could be easily reduced. Note that it is notknown whether there is a collapse in the hierarchy of classes with bounded treewidth with respect tofirst-order transductions, that is, whether there exist integers k < k (cid:48) with the property that the class ofgraphs with treewidth at most k (cid:48) can be transduced from the class of graphs with treewidth at most k .We conjecture that this is not the case.We are now able to prove Theorem 1.2, which we restate below. Theorem 1.2.
If a class of graphs C has bounded rankwidth, then the following conditions are equivalent:1. C has a stable edge relation;2. C is stable;3. C is monadically stable;4. C is a transduction of a class with bounded treewidth.Proof. For a graph G , let (cid:98) G be the graph obtained from G by subdividing every edge uv twice, thatis, replacing it with a path u − s uuv − s vuv − v . Let (cid:98) D = { (cid:98) G : G ∈ D } . As subdividing edges does notincrease the treewidth and D has bounded treewidth by Lemma 3.14, the same bound also applies to (cid:98) D .We now prove that there is a transduction from (cid:98) D onto C , hence establishing the only non-trivialimplication of the theorem.Consider any graph G ∈ C . Let T be any k -NLC-tree that generates G . Let M = Gaif ( J (cid:63) T ) . Weargue that G can be transduced from (cid:99) M ∈ (cid:98) D using a fixed transduction that depends only on k .We first argue that the structure J (cid:63) T can be transduced from (cid:99) M . First, we add colors to distinguishthe original vertices of M from the subdividing vertices (i.e. vertices s uuv and s vuv introduced whenconstructing (cid:99) M from M ). Now, recall that the vocabulary of J (cid:63) T consists only of unary relations andpartial functions. Unary relations present in J (cid:63) T can be introduced directly. For every partial function f present in J (cid:63) T , we transduce it as follows. First, we introduce a unary predicate Z f which selectsvertices s uu f ( u ) for u ranging over the domain of f . Then it is straightforward to interpret f usinga first-order formula involving Z f . Thus, we have introduced all the relations present in J (cid:63) T , and itremains to use a universe restriction formula to dispose of all the subdividing vertices, which shouldnot be included in the universe of J (cid:63) T .Now that J (cid:63) T has been transduced from (cid:99) M , we can use formula α ( p , p ) provided by Lemma 3.13to interpret the edge relation of G in J (cid:63) T . Restricting the universe to U finishes the construction of G from (cid:99) M by means of a transduction.Finally, let us discuss the algorithmic aspects of the proof. Given a graph G ∈ C , we can compute a k -NLC-tree generating G in cubic time [36], for some constant k . The hierarchical factorization providedby Lemma 3.1 can be computed in polynomial time, because the result of Colcombet [7] is effective. Itis straightforward forward to see that all the further elements of the construction, like determining22he types, partitioning into blocks, etc., which amount to the construction of the structure J (cid:63) T , can becarried out in polynomial time. Thus, given G ∈ C , we can in polynomial time compute a graph ofbounded treewidth H from which G can be transduced, together with a suitable monadic extension of H . The interpretation yielding G from this monadic extension of H can be computed as well. Theorem 1.2 asserts that each class with bounded rankwidth and stable edge relation is a transductionof a class with bounded treewidth. We now derive some consequences of this result.Classes with bounded treewidth are examples of classes with bounded expansion [32]. Recall thata class C has bounded expansion if there exists a function f : N → N with the property that everygraph H such that a subdivision of H with edges subdivided at most r times is a subgraph of a graphin C has average degree at most f ( r ) . (The reader is referred to [33] for an in-depth study of theseclasses.)These classes are characterized by the existence of special covers. Let complexity be a graphparameter, such as treewidth or rankwidth. A class C has low complexity covers if for each positiveinteger p there exists a constant C p and a class X p with bounded complexity , such that each graph G ∈ C can be covered by C p induced subgraphs H , . . . , H C p ∈ X p in such a way that every subsetof p vertices of G are jointly covered by some H i ( (cid:54) i (cid:54) C p ).Recall that the treedepth of a graph G [33] is the minimum number of levels of a rooted forest Y such that G is a subgraph of the ancestor-descendant closure of Y . Equivalently, the treedepth of agraph G is the minimum clique number of a supergraph of G that is a trivially perfect graph. Thefollowing result follows from the characterization of bounded expansion in terms of low treedepthcolorings. Theorem 4.1 ([32]) . A class has bounded expansion if and only if it has low treedepth covers.
An extension of this result gives a characterization of the graph classes that are transductions ofclasses with bounded expansion. Following [18], we say that such classes have structurally boundedexpansion . Theorem 4.2 ([18]) . A class has structurally bounded expansion if and only it has low shrubdepth covers.
Recall that a class S has bounded shrubdepth if there exist constants m and h such that for everygraph G ∈ S there is a rooted tree Y with set of leaves L ( Y ) = V ( G ) , a coloring c : L ( Y ) → [ m ] andan assignment v (cid:55)→ f v of a symmetric function f v : [ m ] × [ m ] → { , } to each internal node v of Y , insuch a way that two vertices u, v ∈ V ( G ) are adjacent in G if and only if f u ∧ Y v ( c ( u ) , c ( v )) = 1 [20, 19].In particular, the subgraph of G induced by each single color class is a cograph. Since cographs areperfect, in particular we have χ ( G ) (cid:54) m ω ( G ) . We deduce the following corollary of Theorem 4.2. Corollary 4.1.
For every structurally bounded expansion class C there exists a constant C such that thevertex set of every G ∈ C can be partitioned into at most C classes, each inducing a cograph.In particular, every structurally bounded expansion class is linearly χ -bounded. Note that a class has bounded shrubdepth if and only if it can be transduced from a class withbounded treedepth [20].In an effort to generalize low treedepth coverings further, classes with low rankwidth covers havebeen studied in [29]. As a direct consequence of Theorem 1.2 and Corollary 4.1, we have:
Theorem 1.4.
Every class with low rankwidth covers and stable edge relation is linearly χ -bounded. roof. Let C be the class in question. Taking p = 1 in the definition, for every graph G ∈ C , we canpartition the vertex set of G into a bounded number of parts, each of which induces a subgraph thatbelongs to a class D that has bounded rankwidth and a stable edge relation. By Theorem 1.2, D canbe transduced from a class of bounded treewidth, hence it has structurally bounded expansion. ByCorollary 4.1 we conclude that D is linearly χ -bounded, so it follows that C is linearly χ -bounded aswell.It is known that the chromatic number of graphs with (linear) cliquewidth at most k cannot becomputed in f ( k ) n o ( k ) time for any computable function f , unless ETH fails [21]. However, it followsfrom what precedes that for each class C with bounded rankwidth and stable edge relation there is an O ( n ) -time algorithm, which gives a constant factor approximation for the chromatic number. Indeed,given a graph G from the considered class, we can first use the result of Oum and Seymour [36] tocompute in cubic time a k -NLC-tree of G for some constant k (or any equivalent decomposition, suchas a clique expression). Then, using standard dynamic programming we can compute the clique numberof the graph in linear time. By Theorem 1.4, this clique number is a constant-factor approximation ofthe chromatic number.We also deduce the following result. Theorem 1.5.
A class has low rankwidth covers and a stable edge relation if and only if it is a transductionof a class with bounded expansion.Proof.
If a class has structurally bounded expansion, then it has low shrubdepth covers [16], whichare special instances of low rankwidth covers. Moreover, as bounded expansion classes are nowheredense, they are monadically stable [1], hence structurally bounded expansion classes have a stable edgerelation.Conversely, assume a class C has low rankwidth covers and stable edge relation. Then for eachinteger p there exists a constant C p and a class R p with bounded rankwidth such that each graph G ∈ C can be covered by C p induced subgraphs H , . . . , H C p ∈ R p in such a way that every subsetof p vertices of G are jointly covered by some H i ( (cid:54) i (cid:54) C p ). As C has a stable edge relation, itexcludes some half-graph F . Obviously, we can require that R p contains only induced subgraphs ofgraphs in C . Thus graphs in R p exclude F as well, so R p has a stable edge relation. By Theorem 1.2, R p can be transduced from a class with bounded treewidth, hence R p has structurally bounded expansion.It follows from Theorem 4.2 that there exists C (cid:48) p and a class T p with bounded shrubdepth such thateach graph H i can be covered by C (cid:48) p induced subgraphs T i, , . . . , T i,C (cid:48) p ∈ T p in such a way that everysubset of p vertices of H i are jointly covered by some T i,j . We deduce that C has low shrubdeth covers,so it has structurally bounded expansion.In [18], it was stressed that one of the main difficulties arising when considering low shrubdepthcovers of structurally bounded expansion classes (whose existence is asserted in Theorem 4.2) is thatwe do not know if they may be computed in polynomial time (and that polynomial-time computationof these covers for p = 2 ensures that FO-model checking is FPT on the class). A consequence of thispaper is that for a class with structurally bounded treewidth (that is, a class with bounded rankwidthand stable edge relation), and for each integer p , low shrubdepth covers with parameter p can becomputed in polynomial time. Such a property also holds for structurally bounded degree classes(that is, transductions of classes with bounded degree) [16], as well as classes obtained from boundedexpansion classes by a transduction consisting a bounded number of subgraph complementations [17].We conjecture that this holds in general. Conjecture 4.1.
For every structurally bounded expansion class C , computing a low shrubdepth cover ofa graph G ∈ C at depth p is fixed parameter tractable when parameterized by p . Monadic dependence meets stability
In this section we prove Theorem 1.3, which shows that the equivalence of the first three conditions ofTheorem 1.2 (and Theorem 1.1) is in fact a more general phenomenon that occurs in every monadicallydependent graph class. In our proof, we shall need the following classical theorem.
Theorem 5.1 (Canonical Ramsey Theorem [14]) . For every integer n there exists an integer N with thefollowing property: Suppose that all pairs ( a, b ) of integers with (cid:54) a < b (cid:54) N are arbitrarily distributedinto classes. Then there is an increasing sequence of integers (cid:54) x < x < · · · < x n (cid:54) N such that oneof the following four sets of conditions holds, where it is assumed that (cid:54) α < β (cid:54) n ; (cid:54) γ < δ (cid:54) n :1. All ( x α , x β ) belong to the same class.2. ( x α , x β ) and ( x γ , x δ ) belong to the same class if, and only if, α = γ .3. ( x α , x β ) and ( x γ , x δ ) belong to the same class if, and only if, β = δ .4. ( x α , x β ) and ( x γ , x δ ) belong to the same class if, and only if, α = γ ; β = δ . Let us now proceed to the proof of Theorem 1.3, restated below.
Theorem 1.3.
For a monadically dependent graph class C , the following conditions are equivalent:1. C has a stable edge relation;2. C is stable;3. C is monadically stable.Proof. Implications 3 ⇒ ⇒ C is monadicallydependent but also monadically unstable, then in fact C has an unstable edge relation. Hence, assumethat C is monadically unstable. In the following, we write (cid:0) [ n ]2 (cid:1) for the set of all pairs of integers ( i, j ) such that (cid:54) i < j (cid:54) n .A formula α (¯ x ) is functional on a class if there is a variable x ∈ ¯ x such that for every G in theclass and u ∈ V ( G ) , there exists at most one tuple ¯ u ∈ V ( G ) ¯ x such that G | = α (¯ u ) and ¯ u ( x ) = u .We shall say that a triple of formulas τ = ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y )) in a monadic vocabulary of graphs is problematic if there exists a monadic expansion C + of C , whose vocabulary contains the vocabulariesof α , β , and η , such that α and β are functional on C + , and for every n ∈ N there exists G ∈ C + andtuples ¯ a , . . . , ¯ a n ∈ V ( G ) ¯ x and ¯ b , . . . , ¯ b n ∈ V ( G ) ¯ y satisfying the following:• for all i ∈ [ n ] we have G | = α (¯ a i ) and G | = β (¯ b i ) ; and• for all ( i, j ) ∈ (cid:0) [ n ]2 (cid:1) we have G | = η (¯ a i , ¯ b j ) and G | = ¬ η (¯ a j , ¯ b i ) .Note that we do not specify whether η (¯ a i , ¯ b i ) should hold or not in G . The pair of sequences ¯ a , . . . , ¯ a n and ¯ b , . . . , ¯ b n as above shall be called a τ -ladder of length n in G . Observe that if in graphs from C + one can find arbitrarily long τ -ladders, then η is unstable on C + .As C is monadically unstable, by Theorem 2.2 we know that there is a transduction from C onto theclass of all finite half-graphs. By the definition of a transduction, this implies that there exists a monadicexpansion C + of C and a formula ϕ ( x, y ) with two free variables x and y such that ϕ is unstable on C + . By taking α ( x ) and β ( y ) to be true formulas, we conclude the following. Claim.
There exists a problematic triple of formulas.
We now investigate the properties of problematic formulas.
Claim. If τ = ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y )) is problematic, then so is τ (cid:48) = ( α (¯ x ) , β (¯ y ) , ¬ η (¯ x, ¯ y )) .Proof of the claim. It suffices to observe that reversing both sequences in a τ -ladder yields a τ (cid:48) -ladder. (cid:67) Claim.
If the triple τ = ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y ) ∨ η (¯ x, ¯ y )) is problematic, then at least one of the triples τ = ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y )) and τ = ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y )) is problematic. roof of the claim. By assumption, there is a monadic expansion C + of C such that there are arbitrarilylong τ -ladders in graphs from C . Suppose ¯ a , . . . , ¯ a n and ¯ b , . . . , ¯ b n is such a τ -ladder in some G ∈ C .Observe that for all ( i, j ) ∈ (cid:0) [ n ]2 (cid:1) , we have G | = η (¯ a i , ¯ b j ) or G | = η (¯ a i , ¯ b j ) . By Ramsey’s theorem andsince n can be chosen arbitrarily large, by restricting attention to a sub-ladder we may assume thatone of these cases holds for every pair ( i, j ) ∈ (cid:0) [ n ]2 (cid:1) , say the first one by symmetry. However, for all ( i, j ) ∈ (cid:0) [ n ]2 (cid:1) we also have G | = ¬ ( η (¯ a j , ¯ b i ) ∨ η (¯ a j , ¯ b i )) , which implies G | = ¬ η (¯ a j , ¯ b i ) . We concludethat ¯ a , . . . , ¯ a n and ¯ b , . . . , ¯ b n form a τ -ladder of length n . As n can be chosen arbitrarily large, τ isproblematic. (cid:67) Claim.
If a triple τ = ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y )) is problematic and η (¯ x, ¯ y ) = ∃ z ζ (¯ x, ¯ y, z ) , then there isa problematic triple of the form τ (cid:48) = ( α (cid:48) (¯ x (cid:48) ) , β (cid:48) (¯ y (cid:48) ) , ζ (¯ x (cid:48) , ¯ y (cid:48) )) where either (¯ x (cid:48) , ¯ y (cid:48) ) = (¯ x ∪ { z } , ¯ y ) or (¯ x (cid:48) , ¯ y (cid:48) ) = (¯ x, ¯ y ∪ { z } ) .Proof of the claim. Consider any n ∈ N and let N be the integer given by the Canonical RamseyTheorem (Theorem 5.1) for n . By assumption, there is a monadic expansion C + of C such that there existarbitrarily long τ -ladders in graphs from C + . Hence, we can find a τ -ladder ¯ a , . . . , ¯ a N , ¯ b , . . . , ¯ b N of length N in some G ∈ C + . By restricting attention to a sub-ladder consisting of every odd elementof the sequence ¯ a , . . . , ¯ a N and every even element of the sequence ¯ b , . . . , ¯ b N , and appropriatelyreindexing, we find a τ -ladder ¯ a , . . . , ¯ a N , ¯ b , . . . , ¯ b N of length- N in G such that G | = η (¯ a i , ¯ b i ) for all i ∈ [ n ] . Note that tuples ¯ a , . . . , ¯ a N have to be pairwise different, because for each i ∈ [ N ] , the smallest j ∈ [ N ] satisfying G | = η (¯ a i , ¯ b j ) is equal to i . Similarly, tuples ¯ b , . . . , ¯ b N have to be pairwise differentas well.Let x ∈ ¯ x and y ∈ ¯ y be the variables witnessing that α and β are functional, respectively. For i ∈ [ n ] , let a i = ¯ a i ( x ) and b i = ¯ b j ( y ) . As α is functional, we conclude that vertices a , . . . , a N arepairwise different, and similarly vertices b , . . . , b N are pairwise different as well. Let A = { a , . . . , a N } and B = { b , . . . , b N } , and let G AB be a monadic expansion of G where A and B are additionallydistinguished using unary predicates, which we shall respectively call A and B by a slight abuse ofnotation.Let ≺ be the (strict) lexicographic order on (cid:0) [ N ]2 (cid:1) . Observe that there exists a formula λ (¯ x, ¯ y, ¯ x ◦ , ¯ y ◦ ) ,where ¯ x ◦ and ¯ y ◦ are copies of ¯ x and ¯ y , respectively, such that the following holds: if (¯ a, ¯ b ) = (¯ a i , ¯ b j ) and (¯ a ◦ , ¯ b ◦ ) = (¯ a i ◦ , ¯ b j ◦ ) for some ( i, j ) , ( i ◦ , j ◦ ) ∈ (cid:0) [ n ]2 (cid:1) , then G + | = λ (¯ a, ¯ b, ¯ a ◦ , ¯ b ◦ ) if and only if ( i, j ) ≺ ( i ◦ , j ◦ ) . Indeed, the formula ∀ ¯ w [( B ( w ) ∧ β ( ¯ w ) ∧ η (¯ a ◦ , ¯ w )) → η (¯ a, ¯ w )] (where the variable w ∈ ¯ w corresponds to the variable y ∈ ¯ y ) allows us to check the assertion i (cid:54) i ◦ . A formula expressing j (cid:54) j ◦ can be written in a symmetric way. Then the condition ( i, j ) ≺ ( i ◦ , j ◦ ) can be expressed using aboolean combination of assertions i (cid:54) i ◦ , i (cid:62) i ◦ , j (cid:54) j ◦ , and j (cid:62) j ◦ .As for every pair ( i, j ) ∈ (cid:0) [ N ]2 (cid:1) we have G | = ∃ z ζ (¯ a i , ¯ b j , z ) , there is a vertex c ∈ V ( G ) such that G | = ζ (¯ a i , ¯ b j , c ) . Let C be an inclusion-wise minimal subset of V ( G ) such that for each ( i, j ) ∈ (cid:0) [ N ]2 (cid:1) there exists c ∈ C satisfying G | = ζ (¯ a i , ¯ b j , c ) . For every c ∈ C , define J ( c ) = (cid:26) ( i, j ) ∈ (cid:18) [ N ]2 (cid:19) : ζ (¯ a i , ¯ b j , c ) (cid:27) . Note that by the minimality of C , the sets J ( c ) are pairwise not contained in one another. Let G ABC be the monadic expansion of G AB where C is additionally distinguished using a unary predicate C .Now, for c, c (cid:48) ∈ C , we set c (cid:60) c (cid:48) if and only if min ≺ (cid:0) J ( c ) \ J ( c (cid:48) ) (cid:1) ≺ min ≺ (cid:0) J ( c (cid:48) ) \ J ( c ) (cid:1) . It is straightforward to see that (cid:60) is a (strict) linear order on C . Let us partition pairs ( i, j ) ∈ (cid:0) [ N ]2 (cid:1) intoclasses { I ( c ) : c ∈ C } as follows: ( i, j ) ∈ I ( c ) if and only if c = min (cid:60) { d ∈ C : ( i, j ) ∈ J ( d ) } . λ we can easily write a formula κ (¯ x, ¯ y, z ) with the following property: for all ( i, j ) ∈ (cid:0) N (cid:1) and c ∈ C , we have G ABC | = κ (¯ a i , ¯ b j , c ) if and only if ( i, j ) ∈ I ( c ) .By the Canonical Ramsey Theorem (Theorem 5.1) there exists F ⊆ [ N ] such that | F | = n and oneof the following conditions is satisfied:(1) all pairs ( i, j ) ∈ (cid:0) F (cid:1) belong to the same class I ( c ) , for some c ∈ C ;(2) there exist pairwise different c i such that ( i, j ) ∈ I ( c i ) for all ( i, j ) ∈ (cid:0) F (cid:1) ;(3) there exist pairwise different c j such that ( i, j ) ∈ I ( c j ) for all ( i, j ) ∈ (cid:0) F (cid:1) ;(4) there exist pairwise different c i,j such that ( i, j ) ∈ I ( c i,j ) for all ( i, j ) ∈ (cid:0) F (cid:1) .Let G A (cid:48) B (cid:48) C be the monadic expansion of G ABC where sets A (cid:48) = { a i : i ∈ F } and B (cid:48) = { b i : i ∈ F } are additionally distinguished using unary predicates A (cid:48) and B (cid:48) .We first consider the second case above. Let G A (cid:48) B (cid:48) CD be a monadic expansion of G A (cid:48) B (cid:48) C thatdistinguishes the single vertex b max F using a unary predicate D . Consider the formula α (cid:48) (¯ x, z ) = A (cid:48) ( x ) ∧ C ( z ) ∧ α (¯ x ) ∧ ∃ ¯ y [ D ( y ) ∧ β (¯ y ) ∧ κ (¯ x, ¯ y, z )] . Observe that for any ¯ u ∈ V ( G ) ¯ x and w ∈ V ( G ) , we have G A (cid:48) B (cid:48) CD | = γ (¯ u, w ) if and only if ¯ u = ¯ a i for some i ∈ F and w = c i . As α (¯ x ) is functional, it follows that so is α (cid:48) (¯ x, z ) . It is now straightfor-ward to see that { (¯ a i , c i ) : i ∈ F } and { ¯ b i : i ∈ F } form a τ (cid:48) -ladder in G A (cid:48) B (cid:48) CD of length n , where τ (cid:48) = ( α (cid:48) (¯ x, z ) , β (¯ y ) , ζ (¯ x, ¯ y, z )) . Hence, if the second case occurs for infinitely many n , then τ (cid:48) isproblematic.The same argument applies if the first case occurs for infinitely many n , and a symmetric argumentapplies when the third case occurs for infinitely many n . We are left with considering the situationwhere the fourth case occurs for infinitely many n . Let S = { c i,j : ( i, j ) ∈ (cid:0) F (cid:1) } . Observe that if wechoose any subset P ⊆ S and distinguish it using a unary predicate P in a monadic expansion G A (cid:48) B (cid:48) CP of G A (cid:48) B (cid:48) C , then the formula ξ (¯ x, ¯ y ) = A (cid:48) ( x ) ∧ α (¯ x ) ∧ B (cid:48) ( y ) ∧ β (¯ y ) ∧ ∃ z [ P ( z ) ∧ κ (¯ x, ¯ y, z )] , is true exactly for those tuples ¯ a i and ¯ b j for which ( i, j ) ∈ (cid:0) F (cid:1) and c i,j ∈ P . Hence, using ξ anddifferent choices of P we may interpret in graphs G A (cid:48) B (cid:48) CP all subgraphs of a half-graph of order n . Itfollows that there is a transduction from C onto the class of all bipartite graphs; this contradicts theassumption that C is monadically dependent. (cid:67) By the above claims we infer that there is a problematic triple ( α (¯ x ) , β (¯ y ) , η (¯ x, ¯ y )) such that η (¯ x, ¯ y ) is an atomic formula. In particular, this means that there is a monadic expansion C + of C such that η is unstable on C + . Since η is atomic, it is of one of the following forms: a unary predicate applied toany variable; the equality relation applied to any pair of variables; or the edge relation E ( · , · ) applied toany pair of variables. The first two cases cannot happen, as such formulas are stable on every class ofgraphs. We conclude that the last case occurs, hence C has an unstable edge relation. We have started to explore the theory of monadic dependence and monadic stability from a graphtheoretical point of view. Several interesting questions and conjectures arise from our studies. Toput our research in perspective, we show in Figure 5 the following extended semi-lattice of propertyinclusions.A quick examination of the figure reveals an unresolved question of prime importance. WhileTheorem 1.1 and Theorem 1.2 exactly identify classes of structurally bounded pathwidth/treewidthas monadically stable classes that have bounded (linear) rankwidth, the chart does not specify thealignment of structurally nowhere dense classes (i.e. transductions of nowhere dense classes). Clearly,27 oundedrankwidthTransductionof boundedtreewidthTransductionof boundedpathwidth BoundedtreewidthBoundedpathwidthBoundedlinearrankwidth Lowrankwidthcovers Structurallyboundedexpansion BoundedexpansionBoundedshrubdepth BoundedtreedepthBoundedembeddedshrubdepth Dependentedge relation Stableedge relationMonadicallystable WeaklysparseNowheredense = = =BoundedVC-dimension Boundedorder-dimensionBicliquefree ? Monadicallydependent
Figure 5: The extended semi-lattice of property inclusions.every structurally nowhere dense class of graphs is monadically stable, but the precise relationshipbetween these notions remains to be understood. It would be even consistent with our knowledge ifthe two concepts coincided for classes of graphs. If this was true, it would reveal very strong structuralqualities of monadically stable classes of graphs, which could be used in the algorithmic context.
Conjecture 6.1.
A graph class is monadically stable if and only if it is structurally nowhere dense.
Obviously, besides classes of bounded pathwidth or treewidth, there are multiple other notions ofsparsity whose structural analogs could be investigated. For instance, can we characterize structurallyplanar classes, that is, images of the class of planar graphs under transductions? More generally,one may consider images under transductions of classes with forbidden minors or with forbiddentopological minors. So far, suitable characterizations have been given for classes with structurallybounded degree [16] and with structurally bounded expansion [18]. Such characterizations, if efficientlyconstructive, are very helpful in the design of fixed-parameter algorithms for the FO model-checkingproblem, as was done in the case of classes with structurally bounded degree [16]. Based on theunderstanding revealed in [16, 18], we hypothesize that such characterizations may rely on the conceptof covers (see Section 4). For instance, transductions of classes with bounded expansion are characterizedby the existence of such covers (see Theorem 4.2). This motivates the following:
Conjecture 6.2.
Every class with low rankwidth covers is monadically dependent.
Finally, we recall the conjecture we posed in Section 4.
Conjecture 4.1.
For every structurally bounded expansion class C , computing a low shrubdepth cover ofa graph G ∈ C at depth p is fixed parameter tractable when parameterized by p . eferences [1] H. Adler and I. Adler. Interpreting nowhere dense graph classes as a classical notion of modeltheory. European Journal of Combinatorics , 36:322–330, 2014.[2] P. J. Anderson. Tree-decomposable theories. Master’s thesis, Department of Mathematics andStatistics, Simon Fraser University, 1990.[3] D. Angluin. Computational learning theory: survey and selected bibliography. In
Proceedings ofthe twenty-fourth annual ACM symposium on Theory of computing , pages 351–369, 1992.[4] J. T. Baldwin and S. Shelah. Second-order quantifiers and the complexity of theories.
Notre DameJournal of Formal Logic , 26(3):229–303, 1985.[5] M. Bonamy and M. Pilipczuk. Graphs of bounded cliquewidth are polynomially χ -bounded. Advances in Combinatorics , 2020(8). 21pp.[6] H. Br¨onnimann and M. T. Goodrich. Almost optimal set covers in finite VC-dimension.
Discrete &Computational Geometry , 14(4):463–479, Dec 1995.[7] T. Colcombet. A combinatorial theorem for trees. In
Proceedings of the 34th International Colloquiumon Automata, Languages and Programming, ICALP 2007 , volume 4596 of
Lecture Notes in ComputerScience , pages 901–912. Springer, 2007.[8] B. Courcelle. The monadic second-order logic of graphs. i. recognizable sets of finite graphs.
Information and computation , 85(1):12–75, 1990.[9] B. Courcelle, J. Engelfriet, and G. Rozenberg. Handle-rewriting hypergraph grammars.
Journal ofComputer and System Sciences , 46(2):218–270, 1993.[10] B. Courcelle, J. A. Makowsky, and U. Rotics. Linear time solvable optimization problems on graphsof bounded clique-width.
Theory of Computing Systems , 33(2):125–150, 2000.[11] Z. Dvoˇr´ak. A stronger structure theorem for excluded topological minors. 2012.[12] Z. Dvoˇr´ak. Induced subdivisions and bounded expansion.
European Journal of Combinatorics ,69:143–148, 2018.[13] Z. Dvoˇr´ak, D. Kr´al’, and R. Thomas. Testing first-order properties for subclasses of sparse graphs.
Journal of the ACM (JACM) , 60(5):1–24, 2013.[14] P. Erd˝os and R. Rado. A combinatorial theorem.
Journal of the London Mathematical Society ,1(4):249–255, 1950.[15] G. Fabia ´nski, M. Pilipczuk, S. Siebertz, and S. Toru ´nczyk. Progressive algorithms for dominationand independence. In , volume 126 of
LIPIcs , pages 27:1–27:16. Schloss Dagstuhl - Leibniz-Zentrum f¨urInformatik, 2019.[16] J. Gajarsk´y, P. Hlinˇen´y, J. Obdrˇz´alek, D. Lokshtanov, and M. S. Ramanujan. A new perspective onFO model checking of dense graph classes. In
Proceedings of the 31st Annual ACM/IEEE Symposiumon Logic in Computer Science, LICS 2016 , pages 176–184. ACM, 2016.[17] J. Gajarsk´y and D. Kr´al’. Recovering sparse graphs. In . Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik,2018. 2918] J. Gajarsk´y, S. Kreutzer, J. Neˇsetˇril, P. Ossona de Mendez, M. Pilipczuk, S. Siebertz, and S. Toru ´nczyk.First-order interpretations of bounded expansion classes.
ACM Trans. Comput. Logic , 21(4):articleno. 29, 2020.[19] R. Ganian, P. Hlinˇen´y, J. Neˇsetˇril, J. Obdrˇz´alek, and P. Ossona de Mendez. Shrub-depth: Capturingheight of dense graphs.
Logical Methods in Computer Science , 15(1), 2019. oai:arXiv.org:1707.00359.[20] R. Ganian, P. Hlinˇen´y, J. Neˇsetˇril, J. Obdrˇz´alek, P. Ossona de Mendez, and R. Ramadurai. Whentrees grow low: Shrubs and fast
MSO . In International Symposium on Mathematical Foundationsof Computer Science , volume 7464 of
Lecture Notes in Computer Science , pages 419–430. Springer-Verlag, 2012.[21] P. A. Golovach, D. Lokshtanov, S. Saurabh, and M. Zehavi. Cliquewidth III: the odd case of graphcoloring parameterized by cliquewidth. In
Proceedings of the Twenty-Ninth Annual ACM-SIAMSymposium on Discrete Algorithms , pages 262–273. SIAM, 2018.[22] M. Grohe, S. Kreutzer, and S. Siebertz. Deciding first-order properties of nowhere dense graphs.
Journal of the ACM (JACM) , 64(3):1–32, 2017.[23] M. Grohe and D. Marx. Structure theorem and isomorphism test for graphs with excludedtopological subgraphs.
SIAM Journal on Computing , 44(1):114–159, 2015.[24] M. Grohe and G. Tur´an. Learnability and definability in trees and similar structures.
Theory ofComputing Systems , 37(1):193–220, 2004.[25] F. Gurski and E. Wanke. The tree-width of clique-width bounded graphs without K n,n . In Proceedings of the 26th International Workshop on Graph-Theoretic Concepts in Computer Science,WG 2000 , volume 1928 of
Lecture Notes in Computer Science , pages 196–205. Springer, 2000.[26] A. Gy´arf´as.
Problems from the world surrounding perfect graphs . Number 177. MTASz´am´ıt´astechnikai ´es Automatiz´al´asi Kutat´o Int´ezet, 1985.[27] W. Hodges and H. Wilfrid.
Model theory . Cambridge University Press, 1993.[28] ¨O. Johansson. Clique-decomposition, NLC-decomposition, and modular decomposition-relationships and results for random graphs. In
Congressus Numerantium , pages 39–60, 1998.[29] O. Kwon, M. Pilipczuk, and S. Siebertz. On low rank-width colorings.
Eur. J. Comb. , 83, 2020.[30] M. Malliaris and S. Shelah. Regularity lemmas for stable graphs.
Transactions of the AmericanMathematical Society , 366(3):1551–1585, 2014.[31] J. Matouˇsek. Bounded VC-dimension implies a fractional Helly theorem.
Discrete & ComputationalGeometry , 31(2):251–255, 2004.[32] J. Neˇsetˇril and P. Ossona de Mendez. Grad and classes with bounded expansion I. decompositions.
European Journal of Combinatorics , 29(3):760–776, 2008.[33] J. Neˇsetˇril and P. Ossona de Mendez.
Sparsity: Graphs, Structures, and Algorithms , volume 28 of
Algorithms and Combinatorics . Springer, 2012.[34] J. Neˇsetˇril, P. Ossona de Mendez, R. Rabinovich, and S. Siebertz. Linear rankwidth meets stability. In
Proceedings of the 31st ACM-SIAM Symposium on Discrete Algorithms, SODA 2020 , pages 1180–1199,2020.[35] J. Neˇsetˇril, P. Ossona de Mendez, R. Rabinovich, and S. Siebertz. Linear rankwidth meets stability.