Abstract 1 Introduction 2 Preliminaries 3 Metric conversion 4 Flip-separability References

Separability Properties of Monadically Dependent Graph Classes

Édouard Bonnet ORCID CNRS, ENS de Lyon, Université Claude Bernard Lyon 1, LIP UMR 5668, Lyon, France Samuel Braunfeld ORCID Computer Science Institute, Charles University, Prague, Czech Republic
Institute of Computer Science, The Czech Academy of Sciences, Prague, Czech Republic
Ioannis Eleftheriadis ORCID Department of Computer Science and Technology, University of Cambridge, UK Colin Geniet ORCID Discrete Mathematics Group, Institute for Basic Science (IBS), Daejeon, South Korea Nikolas Mählmann ORCID University of Bremen, Germany Michał Pilipczuk ORCID University of Warsaw, Poland Wojciech Przybyszewski ORCID University of Warsaw, Poland Szymon Toruńczyk ORCID University of Warsaw, Poland
Abstract

A graph class 𝒞 is monadically dependent if one cannot interpret all graphs in colored graphs from 𝒞 using a fixed first-order interpretation. We prove that monadically dependent classes can be exactly characterized by the following property, which we call flip-separability: for every r, ε>0, and every graph G𝒞 equipped with a weight function on vertices, one can apply a bounded (in terms of 𝒞,r,ε) number of flips (complementations of the adjacency relation on a subset of vertices) to G so that in the resulting graph, every radius-r ball contains at most an ε-fraction of the total weight. On the way to this result, we introduce a robust toolbox for working with various notions of local separations in monadically dependent classes.

Keywords and phrases:
Structural graph theory, Monadic dependence
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Copyright and License:
[Uncaptioned image] © Édouard Bonnet, Samuel Braunfeld, Ioannis Eleftheriadis, Colin Geniet, Nikolas
Mählmann, Michał Pilipczuk, Wojciech Przybyszewski, and Szymon Toruńczyk; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Graph theory
; Theory of computation Finite Model Theory
Funding:
ÉB and CG were supported by the ANR projects TWIN-WIDTH (ANR-21-CE48-0014-01) and DIGRAPHS (ANR-19-CE48-0013-01). SB received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 810115 - Dynasnet), and by Project 24-12591M of the Czech Science Foundation (GAČR), and supported partly by the long-term strategic development financing of the Institute of Computer Science (RVO: 67985807). IE was supported by a George and Marie Vergottis Scholarship awarded through Cambridge Trust, an Onassis Foundation Scholarship, and a Robert Sansom studentship. CG was further supported by the Institute for Basic Science (IBS-R029-C1). NM was supported by the German Research Foundation (DFG) with grant agreement No. 444419611. MP and WP were supported by the project BOBR that has received funding from ERC under the European Union’s Horizon 2020 research and innovation programme, grant agreement No. 948057. SzT received funding from ERC grant BUKA (No. 101126229).
Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele Puppis

1 Introduction

In this work we study separability properties in well-structured dense graphs. To put our work in context, let us first review the setting of sparse graphs. An archetypal statement concerning separability is the following: Every n-vertex tree has a centroid – a vertex whose removal breaks the tree into subtrees with at most n/2 vertices each. This statement can be generalized to graphs of bounded treewidth: If an n-vertex graph G has treewidth k, then there is a set S of at most k+1 vertices so that every connected component of GS contains at most n/2 vertices. A set S with this property is called a balanced vertex separator of G.

One way to generalize this statement to graphs that are not necessarily tree-like is to allow separators of larger cardinality. For instance, a classic result of Lipton and Tarjan [8] states that every n-vertex planar graph has a balanced vertex separator of size 𝒪(n). Such sublinear separators are a fundamental tool in the algorithmic theory of graphs with topological structure. In this work, we are interested in a different kind of separators, where we still require the separator to be of bounded size, but we relax the separation requirement to have a local, rather than a global character. The statement below represents the kind of results we are interested in.

Theorem 1 ([12, Thm. 42]).

For every nowhere dense graph class 𝒞, r, and ε>0 there is some k with the following property. For every n-vertex graph G𝒞 there is a set S consisting of at most k vertices of G such that every ball of radius r in GS contains at most εn vertices.

Nowhere denseness is a very general notion of uniform, local sparseness [13]. Nowhere dense classes include for example the class of planar graphs, all classes of bounded treewidth, and all classes excluding a minor; see [11] for an introduction to the topic. Intuitively, the separator S provided by Theorem 1 shatters the graph’s metric into small local “vicinities”, but does not need to break the graph into components in any global sense. This way, even if a graph does not admit any sublinear-size balanced separators in the global sense, it may have a very small separator in the local sense; consider for instance subcubic expanders.

What would be an analogue of Theorem 1 in dense graphs? A recent line of work has identified the model-theoretic notion of monadic dependence as a promising candidate for the dense counterpart of nowhere denseness. Without going into technical details, a graph class 𝒞 is monadically dependent if there is no fixed one-dimensional first-order interpretation that allows interpreting all graphs in vertex-colored graphs from 𝒞; see Section 2.3 for a full definition. Apart from all nowhere dense classes, monadically dependent classes also include all monadically stable classes and all classes of bounded clique- or twin-width. It turns out that multiple characterizations of nowhere dense classes can be lifted to analogous characterizations of monadically dependent classes (and related concepts), giving suitable dense counterparts; see e.g. [3, 4, 7, 18] and an overview in a recent survey [15] and in the thesis [9]. In this analogy, the concept of vertex deletion is replaced by the concept of applying a flip operation: replacing all edges with non-edges and vice versa within some subset of vertices. Note that a single flip operation can destroy multiple edges – for instance turn a complete graph into an edgeless graph – hence this concept is well-suited to serve as a notion of separation in the setting of dense graphs.

And indeed, it is not hard to prove that if an n-vertex graph G has cliquewidth at most k (cliquewidth is the dense counterpart of treewidth), then 𝒪(k) flip operations can be applied to G so that every component of the obtained graph has at most n/2 vertices. This is the dense counterpart of the aforementioned separability property of graphs of bounded treewidth. The main result of this work is the dense counterpart of Theorem 1. We phrase it and prove it in the more general setting of vertex-weighted graphs. Here, a weighted graph is a graph G equipped with a weight function 𝐰:V(G)0; for XV(G), we denote 𝐰(X)uX𝐰(u). Additionally, BallGr(v) denotes the set of vertices at distance at most r from the vertex v in the graph G.

Definition 2.

A graph class 𝒞 is flip-separable if for every r and ε>0, there exists k with the following property. For every graph G𝒞 and weight function 𝐰:V(G)0, there is a graph G that can be obtained by applying at most k flip operations to G so that

𝐰(BallGr(v))ε𝐰(V(G))for every vV(G) with weight at most ε𝐰(V(G)).
Theorem 3.

A graph class 𝒞 is monadically dependent if and only if it is flip-separable.

Together with the characterization of monadic dependence through flip-breakability (see Corollary 17), proposed by Dreier, Mählmann, and Toruńczyk [4], Theorem 3 corroborates the intuition that graphs from monadically dependent classes can be sparsified on a local level using few flips. In fact, we use flip-breakability in our proof, and flip-breakability can be easily derived from flip-separability (Lemma 24); so Theorem 3 can be seen as a strengthening of the result of [4]. In terms of applications, we believe that Theorem 3 will have direct consequences for the existence of modelling 𝖥𝖮-limits for 𝖥𝖮-convergent sequences of graphs from monadically dependent classes, similarly as is the case for Theorem 1 in the context of nowhere dense classes [10]. We defer working out this application to future work.

On our way to the proof of Theorem 3, we develop a versatile toolbox of flip-metrics: working with the local metric structure of a graph under various notions of flips. This toolbox is an equally important contribution of this work, and we now discuss it in more detail.

Flip metrics and metric conversion

There are several, closely related variants of flips, and of the metrics they define, each of which has its advantage over the others. The emerging toolbox allows converting one variant into another, taking advantage of the benefits of each variant.

Partition flips.

So far, we have only discussed the “operational” concept of flips, which boils down to applying a number of flip operations – complementing the adjacency relation within some set of vertices. It is equivalent, but more useful, to see this as a single operation consisting of taking a partition of the vertex set and complementing the adjacency relation within a selection of pairs of parts. Concretely, if G is a graph and 𝒫 is a partition of vertices of G, then a 𝒫-flip of G is any graph G that can be obtained from G as follows: for every pair of parts A,B𝒫 (possibly A=B), either complement the adjacency relation within A×B or leave it intact. Further, call G a k-flip of G if G is a 𝒫-flip of G for some partition 𝒫 with |𝒫|k. It can be easily seen that if G is a k-flip of G, then G can be obtained from G by applying 𝒪(k2) single flip operations; and if G can be obtained from G by applying single flip operations, then G is a 2-flip of G. Hence, from now on we will use the definition of a k-flip of a graph as our basic notion of flips. In particular, in Definition 2 we can equivalently postulate that G is a k-flip of G.

Definable flips.

The caveat of k-flips is that the definition considers an arbitrary partition 𝒫 of the vertex set. In many arguments, particularly those concerning first-order logic, it is useful to restrict attention to some well-behaved partitions, for instance definable from a handful of vertices. For this purpose, one considers definable flips, first used by Bonnet et al. [2], and then more explicitly by Gajarský et al. [7]. Concretely, if S is a set of vertices of a graph G, then we consider the partition 𝒫S in which every sS is in its own singleton part, while the vertices vV(G)S are partitioned according to their neighborhood in S, i.e. u,v are in the same part if NG(u)S=NG(v)S, where NG(u) denotes the (open) neighborhood of u in G. Then, 𝒫S-flips are called S-definable flips.

While definable flips are in general less powerful than classic flips, it turns out that in classes of bounded VC-dimension, every classic flip can be in some sense emulated by a definable flip. This observation is formalized in the lemma below, first proved by Bonnet et al. [2] (we use the formulation of Toruńczyk [18]). Recall that the VC-dimension of a graph G is the maximum cardinality of a set AV(G) such that {NG(v)AvV(G)}=2A; monadically dependent classes have bounded VC-dimension.

Lemma 4 ([2, 18]).

Let G be a graph of VC-dimension at most d and let G be a k-flip of G. Then there is a set SV(G) with |S|𝒪(dk2) and an S-definable flip G′′ of G so that for all r, we have

BallG′′r(v)BallG5r(v)for all vV(G).

The right way of seeing the conclusion of Lemma 4 is that G′′ sparsifies G at least as well as G, because bounded-radius balls in G′′ are contained in bounded-radius balls in G. Lemma 4 turned out to be an indispensable tool in the study of flips, see its applications in [2, 14, 18].

Flip-metrics.

A fundamental property of vertex separators is that they are easily aggregable. For instance, let G be a graph with some vertices colored red and some colored blue, and let S1,S2 be vertex sets such that every component of GS1 contains at most p red vertices, and every component of GS2 contains at most p blue vertices. Then, the union S1S2 is a separator achieving both properties: every component of G(S1S2) has at most p red vertices and at most p blue vertices. However, it is not obvious how to achieve this kind of aggregability in the context of flips: if G1,G2 are k-flips of G so that every component of G1 has at most p red vertices and every component of G2 has at most p blue vertices, how do we construct a single flip G that satisfies both these properties?

A way of approaching this issue was proposed by Gajarský et al. [7] in the form of flip-metrics. In a nutshell, the idea is that given a set of vertices S, we consider all the S-definable flips at the same time. Concretely, for two vertices u,v, we define

distS(u,v)max{distG(u,v):G is an S-definable flip of G}.

As observed in [7], this is a metric on the vertex set of G. Note that balls in this metric satisfy the following:

BallSr(v){uV(G):distS(u,v)r}={BallGr(v):G is an S-definable flip of G}.

Crucially, the flip-metrics are aggregable in the following sense: for two vertex sets S,T we always have distST(u,v)max(distS(u,v),distT(u,v)), hence every r-ball in the metric distST is contained in the intersection of r-balls in the metrics distS and distT.

The caveat of flip-metrics is that they no longer originate from a single graph on which one could work. Our main contribution to the theory of flips is the following lemma, which shows that in classes of bounded VC dimension, any flip-metric can be emulated by the usual distance metric in a single definable flip.

Lemma 5.

Let G be a graph of VC-dimension at most d and let T be a set of vertices of G of size at most k. Then there is a set of vertices S with |S|k𝒪(d2) and an S-definable flip G of G such that

BallGr(v)BallT30r(v)for all vV(G) and r.

Lemmas 4 and 5 show that in graph classes of bounded VC-dimension, all the discussed viewpoints – in the paragraphs partition flips, definable flips, and flip-metrics – are essentially equivalent, and one can easily move from one viewpoint to the other depending on specific properties that are useful in a context. We showcase this in the proof of Theorem 3, given is Section 4. However, we expect that the combination of Lemmas 4 and 5 will have further applications in the treatment of monadically dependent classes.

Outline of the proof of Theorem 3

Let us close this introduction by sketching the proof of our main result. We will present an incorrect proof attempt, and explain the changes needed to fix it.

We are given G in the monadically dependent class 𝒞 with weights 𝐰, and search for a k-flip of G in which all r-balls have at most an ε-proportion of the total weight. Using the metric conversion results, it is enough to find a bounded set S for which the above holds in the flip metric distS; we say that such an S sparsifies G. We will start with S=V(G) which trivially sparsifies G, and show that as long as S is very large, it can be modified to reduce its size.

We first apply flip-breakability [4] to S: this states that in the very large set S, we can find large subsets A1,A2 with distF(A1,A2)>2r for some bounded flip F, and some fixed distance r we will choose later. By repeated application, we can instead find p1ε (which is a constant) large subsets A1,,Ap pairwise at distance 2r. Then the r-balls around all the Ais are pairwise disjoint, and one of them, say BallFr(Ai), must have weight at most ε𝐰(V(G)).

We now want to modify S by adding F and removing all but a bounded subset X of Ai. Since F is bounded and Ai is large, this will decrease the size of S. To show that the resulting set S=SAi+X+F still sparsifies G, we have to consider two cases:

  1. 1.

    If v is close to Ai, meaning distF(v,Ai)rr, then F already is enough to sparsify the ball around v, as it is contained in BallFr(Ai).

  2. 2.

    On the other hand, if v at distance more than rr from Ai for an appropriately large choice of r, then we would like to use a locality result to show that most of Ai is irrelevant in sparsifying the ball around v: we can find a bounded set X which emulates the behaviour of all vertices in Ai and whose choice does not depend on v, allowing to delete AiX from S.

The issue is of course that this supposed locality result needed in the second case of the proof fails. We are considering all S-flips for this unbounded set S, and this appears to be far too powerful for this kind of arguments to hold.

A similar and correct locality statement goes informally as follows: in a large collection 𝒜 of sets of size t, there is some bounded subcollection 𝒳𝒜 such that if u,v are far from all of 𝒜, and distS(u,v)>r holds for some S𝒜, then it also holds for some S𝒳. This is a simple corollary of Gaifman’s locality for first-order logic. Note that while 𝒜 is unbounded, we only consider S-flips for sets S𝒜 of bounded size t.

This suggests a way to fix the proof: rather than having one large set S and considering S-flips, we consider a large family  of sets of size t, and work with the metric dist(u,v)=maxSdistS(u,v) combining S-flips for all S. The previous sketch can be adjusted to this new setting without major changes if one picks t to be the size of flips produced by flip-breakability, and once we reach the last case of the proof, the form of locality required is exactly the one stated above.

2 Preliminaries

For a nonnegative integer p, we denote [p]{1,,p}. If 𝒳 is a set of sets, then 𝒳 is their union.

2.1 Standard graph-theoretic notation

We denote by V(G) and E(G) the sets of vertices and of edges of a graph G, respectively. A graph H is a subgraph of a graph G if H can be obtained from G by vertex and edge deletions. Graph H is an induced subgraph of G if H is obtained from G by vertex deletions only. For SV(G), the subgraph of G induced by S, denoted G[S], is obtained by removing from G all the vertices that are not in S (together with their incident edges). Then, GS is a shorthand for G[V(G)S].

We denote the (open) neighborhood of a vertex v in G by NG(v) and by BallGr(v) the set of vertices at distance at most r from v in G. We set BallGr(S)vSBallGr(v) for SV(G). The diameter of a graph G, denoted by diam(G), is defined as maxu,vV(G)distG(u,v) where distG(u,v) is the shortest-path distance between u and v. A biclique in G is made of two non-empty disjoint sets A,BV(G) such that for every aA and for every bB, abE(G). For any A,BV(G), we denote by EG(A,B) the edge set {uvE(G)|uA,vB}. If furthermore, A and B are disjoint, we denote by G[A,B] the bipartite subgraph of G with bipartition (A,B) and edge set EG(A,B).

2.2 Flips

Given a graph G and two not necessarily disjoint subsets A,BV(G), the (A,B)-flip of G is the graph with vertex set V(G) and edge set

E(G){ab:aA,bB,ab},

where is the symmetric difference. A flip of a graph G is any (A,B)-flip of G for some A,BV(G).

Given a partition 𝒫 of V(G), a 𝒫-flip of a graph G is any graph obtained from G by performing a sequence of flips, each of which is a (P,P)-flip for some (possibly equal) P,P𝒫. Note that a 𝒫-flip of G is fully determined by specifying a graph on vertex set 𝒫 with possible loops. In particular, there are at most 2|𝒫|2 many 𝒫-flips of G, and the sequence of flips can always be chosen to be of length at most |𝒫|2. Then, for any positive integer k, a k-flip of G is any 𝒫-flip of G with |𝒫|k, i.e., 𝒫 comprises at most k parts.

For any SV(G), the partition of V(G) defined by S, denoted by 𝒫S, is

{{s}:sS}{{vV(GS)|NG(v)S=S}:SS},

where empty sets are removed from the partition. Note that 𝒫S is indeed a partition of V(G), with at most |S|+2|S| parts. An S-definable flip of G is simply a 𝒫S-flip of G, and a k-definable flip is an S-definable flip for some SV(G) of size at most k.

We associate distances to flips. Recall that, given u,vV(G), distG(u,v) denotes the shortest-path distance between u and v in G. Then, for any 𝒫 partition of V(G), we define

dist𝒫G(u,v)max{distG(u,v):G is a 𝒫-flip of G};

and for SV(G),

distSG(u,v)max{distG(u,v):G is an S-definable flip of G}.

We also define the corresponding balls

Ball𝒫r(v){uV(G):dist𝒫G(u,v)r}andBallSr(v){uV(G):distSG(u,v)r},

where the graph G will always be clear from the context. In these cases we may also omit G from sub- or superscripts.

2.3 VC-dimension, transductions, and monadic dependence

We recall the standard terminology of VC-theory in the context of graphs. Given a graph G and a set of vertices A, we say that G shatters A if for each BA there exists a vertex uB such that N(uB)A=B. We define the VC-dimension of G, denoted as VCdim(G), as the maximum size of a set AV(G) shattered by G. For a graph class 𝒞 we write VCdim(𝒞)sup{VCdim(G):G𝒞}; note that it may happen that VCdim(𝒞)= in case graphs from 𝒞 contain arbitrarily large shattered sets. We additionally define the growth function, or shatter function, of G as the map πG: given by

πG(n)maxAV(G),|A|=n|{NG(v)A:vV(G)}|.

Evidently πG(n)2n, while VCdim(G)<nπG(m)<2m for every mn. However, a bound on the VC-dimension implies a much stronger bound on the shatter function.

Fact 6 (Sauer-Shelah Lemma, [16, 17]).

Let G be a graph with kVCdim(G). Then for all nk, we have

πG(n)i=0k(ni).

In particular, πG(n)𝒪(nk).

We now recall the definition of first-order transductions, or transductions for short, in the special case of languages over (vertex-colored) graphs; see also the discussion in [15] for a broader introduction. A (vertex-colored) graph is here seen as a relational structure consisting of the vertex set equipped with one binary relation E(,) signifying adjacency, and one unary relation per color. Given a non-negative integer k, a transduction 𝖳 is specified by a set of colors Σ and a first-order formula φ(x,y) with two free variables in the language of Σ-colored graphs. For every (uncolored) graph G, we denote by 𝖳(G) the family of all induced subgraphs of graphs H with V(H)=V(G) satisfying the following: there are subsets {UC:CΣ} of V(G) such that for all distinct u,vV(H), we have uvE(H) if and only if φ(u,v) holds in G with vertices of UC marked as of color C, for each CΣ.

Given a graph class 𝒞, we denote by 𝖳(𝒞) the class G𝒞𝖳(G). We say that a graph class 𝒞 transduces a class 𝒟 if there is a transduction T such that 𝒟𝖳(𝒞). Finally, a characterization of Baldwin and Shelah [1] states that a graph class is monadically dependent (or monadically NIP) if it does not transduce the class of all graphs. We take it as our definition of monadic dependence.

The quantifier rank of a (first-order) formula φ, denoted by qr(φ), is the maximum number of nested quantifiers in φ.

3 Metric conversion

In this section we prove Lemma 5. In fact, we shall establish the following stronger result that more generally shows that the metric arising from an arbitrary partition can be approximated by that coming from a definable flip.

Theorem 7.

For every graph G of VC-dimension d and a partition 𝒫 of V(G), there is a set of vertices S of size 𝒪(d|𝒫|2d+2) and an S-definable flip G of G such that for every r, vV(G), and 𝒫-flip H of G

BallGr(v)BallH30r(v).

Note that Lemma 5 follows immediately from Theorem 7. This is because for any vertex set T of size k, the partition 𝒫T has size 𝒪(kd) where d is the VC-dimension, by the Sauer-Shelah Lemma (Fact 6); and the definition of the metric distT considers all 𝒫T-flips.

Towards Theorem 7, we argue that the partition metric can be approximated by the distance metric of a concrete, not necessarily definable, flip.

Lemma 8.

Let G be a graph and 𝒫 a partition of the vertex set of G. Then there exists a refinement 𝒫 of 𝒫 and a 𝒫-flip G of G such that for all vV(G),

BallGr(v)Ball𝒫6r(v).

Furthermore, we have |𝒫||𝒫|2|𝒫|, and if G has VC-dimension at most d, then |𝒫|=𝒪(|𝒫|d+1). Moreover, G and 𝒫 can be computed from G and 𝒫 in time 𝒪(|𝒫|2|V(G)|2).

Evidently, this result together with Lemma 4, which allows to approximate the metric of an arbitrary flip by that of a definable flip, imply Theorem 7. We now turn to the proof of Lemma 8. For this, we first use some folklore results. Let G¯ denote the complement of a graph G, i.e., the graph obtained from G by replacing all edges with non-edges and vice versa.

Lemma 9.

For any graph G, we have diam(G)3 or diam(G¯)3.

Proof.

Assume that diam(G)>3, i.e., there are vertices u,v with distG(u,v)>3 (possibly u,v are in distinct connected components). Then there is no common neighbor of u,v. Thus, in the complement G¯, all vertices are neighbors of either u or v, and uv is an edge. This implies that diam(G¯)3. Observe that Lemma 9 proves Lemma 8 in the case where the partition 𝒫={V(G)} is trivial. Indeed, suppose first that diam(G)3. We then let 𝒫=𝒫 and G=G¯, which is a 𝒫 flip of G. Thus, for every edge uvE(G), we have that the edge uv is a path of length 1 connecting u and v in G¯, and there is always a path connecting u and v of length 3 in G. Consequently dist𝒫(u,v)3 and, more generally, dist𝒫(u,v)3distG(u,v). The case when diam(G¯)3 can be handled by a symmetric argument.

To generalize this, we need a variant of Lemma 9 for bipartite graphs. Let B=(U,V,E) be a bipartite graph, where U,V are the two sides of the bipartition. We consider the choice of bipartition (which is not necessarily unique) to be a part of B. The bipartite complement B¯ of B is the bipartite graph with edge set {uv:uUvV and uvE(B)}. A degenerate case appears in this bipartite setting: it is possible for both B and B¯ to be disconnected (which is impossible for the usual notion of complement).

Lemma 10.

For any bipartite graph B, either diam(B)6, diam(B¯)6, or both B and B¯ are disconnected.

Proof.

See Figure 1 for an illustration. Assume that one of B,B¯ is connected, say B. Suppose furthermore that diam(B)>6. We must then show diam(B¯)6. Using that B is connected, we can pick vertices x,y at distance exactly 6, and a shortest path x=x0,,x6=y between them. This path alternates between the sides U,V of the bipartition, say xiU for even i and xiV for odd i.

Figure 1: A bipartite graph B with a shortest path x1,,x6 of length 6. Note that the neighborhoods of x0,x1,x5,x6 must be disjoint. The set R denotes what remains outside these neighborhoods. The red-dashed edges form a path P of length 4 in the bipartite complement B¯ which dominates all of B¯, i.e., no vertex of B is adjacent to all of P. This ensures diam(B¯)6.

Now a vertex uU cannot be adjacent to both x1 and x5, as these vertices are at distance 4. Similarly, a vertex vV cannot be adjacent to both x0 and x6. It follows that in B¯, all vertices are adjacent to one of x0,x1,x5,x6, and the latter are connected by the following path of length 4: (x5,x0,x3,x6,x1). It follows that diam(B¯)6.

The degenerate cases of Lemma 10 have a simple classification.

Lemma 11.

Let B=(U,V,E) be a bipartite graph such that both B and B¯ are disconnected. Then

  1. 1.

    either B is the disjoint union of two bicliques, or

  2. 2.

    up to swapping U and V, there are vertices v,v+V such that v is isolated and v+ is adjacent to all of U.

Figure 2: The two types of bipartite graphs B with both B and B¯ disconnected (Lemma 11).

Proof.

Assume first that B contains an isolated vertex v, which without loss of generality is in V. Thus in B¯, U{v} is connected. If all vertices of V had a non-neighbor in U, then B¯ would be connected, see Figure 3(a). Hence, there must be some v+V connected to all of U, and case 2 of the lemma holds.

Otherwise, every connected component of B has at least two vertices. Let C1,,Ck be the components of B, where k2, for we assume that B is disconnected. Call Ui=UCi and Vi=VCi the two sides of component Ci; they are non-empty since Ci has more than one vertex. Note that for all ij, (Ui,Vj) is a biclique in B¯. If there are at least 3 components Ci, it is then simple to check that B¯ is connected, a contradiction (see Figure 3(b)).

We finally assume that there are only two components C1,C2, each with at least two vertices. Once again, (U1,V2) and (U2,V1) are bicliques in B¯. If in either C1 or C2 there is some non-edge between U and V, then the corresponding edge in B¯ connects these two bicliques, and thus all of B¯, a contradiction (see Figure 3(c)). Therefore, C1 and C2 are themselves bicliques in B, so case 1 of the lemma holds.

(a) Vertex vV is isolated, and no vV dominates U, i.e., all of them have a non-edge to U.
(b) There are at least 3 non-trivial connected components C1,C2,C3.
(c) The graph has exactly 2 non-trivial components, with at least one non-edge in one of them.
Figure 3: Impossible situations in the proof of Lemma 11, in which enough non-edges (drawn with dashes) are found for B¯ to be connected.

Next, we prove Lemma 8 for bipartite graphs when the partition 𝒫 is trivial. In this context, a flip of a bipartite graph B=(U,V,E) should preserve the fixed bipartition (U,V), i.e., we only consider flips between some subset of U and some subset of V. We call this a bipartite flip.

Lemma 12.

For every bipartite graph B=(U,V,E), there are partitions (U1,U2) of U and (V1,V2) of V2, and a {U1,U2,V1,V2}-bipartite flip B such that if uvE(B), then distB(u,v)6 and distB¯(u,v)6. Furthermore, we either have U2= or U1=N(v) for some vV; and similarly, either V2= or V1=N(u) for some uU.

Proof.

We apply Lemma 11 to choose the appropriate partition:

  1. 1.

    If B or B¯ is connected, then the partition is trivial: U1=U,U2=,V1=V,V2=.

  2. 2.

    If B is the disjoint union of two bicliques, then we partition accordingly so that the bicliques are (U1,V1) and (U2,V2).

  3. 3.

    If v,v+V are isolated and fully adjacent to U respectively, then we pick uU arbitrarily and let V1=N(u) and V2=VV1. The partition of U remains trivial: U1=U and U2=.

In all three cases, for each nonempty Ui,Vj the bipartite graph B[Ui,Vj] or its complement is connected. Furthermore, the partitions (U1,U2) and (V1,V2) are of the required form.

For all nonempty Ui,Vj, Lemma 10 gives that either B[Ui,Vj] or its complement has diameter at most 6. In the former case, we flip the adjacency relation between Ui and Vj, and the flip B is the one obtained by doing so for each pair Ui,Vj. By construction, B[Ui,Vj]¯ has diameter at most 6 for all nonempty Ui,Vj. Thus, if uvE(B) with uUi, vVj, then u,v are at distance at most 6 in both B[Ui,Vj] and its complement. Finally, B contains either B[Ui,Vj] or B[Ui,Vj]¯ as an induced subgraph, hence such u,v are also at distance at most 6 in both B and B¯.

Having established the above, we proceed with the proof of Lemma 8.

Proof of Lemma 8.

Let G be a graph and 𝒫 a partition of V(G). We construct a flip G of G as follows:

  • For each part X𝒫, we flip (X,X) if necessary to ensure that diam(G[X]¯)3 has diameter at most 3, using Lemma 9.

  • For each pair of distinct parts X,Y𝒫, we apply Lemma 12 to the bipartite graph G[X,Y]. This gives partitions 𝒫X,Y of X and 𝒫Y,X of Y into at most two parts each, and a (𝒫X,Y𝒫Y,X) bipartite flip GXY of G[X,Y], ensuring the following: whenever uv is an edge in GXY, then u,v are at distance at most 6 in both G[X,Y] and G[X,Y]¯. We apply the same flip in G to obtain G.

Define 𝒫 to be the partition of V(G) whose parts are of the form Y𝒫PX,Y for all possible choices of X𝒫 and {PX,Y𝒫X,Y}Y𝒫. Clearly, the partition 𝒫 refines both 𝒫 and all 𝒫X,Y, i.e., any part of the latters can be obtained as union of parts of 𝒫. It follows that G is a 𝒫-flip of G.

Consider an edge uvE(G), and let X,Y be the parts of 𝒫 containing u and v, respectively (possibly X=Y). Further, consider an arbitrary 𝒫-flip G′′ of G. If XY, notice that G[X,Y] is equal to the flip GXY provided by Lemma 12. Thus, uv is an edge in GXY, which implies that u,v are at distance at most 6 in both G[X,Y] and G[X,Y]¯. Since G′′ is a 𝒫-flip of G and X,Y𝒫, the restriction G′′[X,Y] coincides with either G[X,Y] or G[X,Y]¯, hence distG′′[X,Y](u,v)6, and a fortiori distG′′(u,v)6. And in the case X=Y, we have distG[X](u,v)=1 and distG[X]¯(u,v)3 due to diam(G[X]¯)3, hence also distG′′(u,v)3 because G′′[X] is equal to G[X] or its complement. Since G′′ was chosen arbitrarily as a 𝒫-flip of G, this proves that dist𝒫(u,v)6 holds for any edge uvE(G). So we have more generally dist𝒫(u,v)6distG(u,v) for every pair of vertices u,v, which in terms of balls is equivalent to BallGr(v)Ball𝒫6r(v) for all vertices v and radius r.

Consider now the partition 𝒫 used to obtain the flip G. Recall that its part are of the form Y𝒫PX,Y for all |𝒫| choices of X𝒫, and all 2|𝒫| choices of {PX,Y𝒫X,Y}Y𝒫. This immediately gives the general bound |𝒫||𝒫|2|𝒫|. Assuming now that G has VC-dimension at most d, we will improve this bound using the additional restriction on 𝒫X,Y ensured by Lemma 12: either 𝒫X,Y={X} is trivial, or there is some vertex vX,YY such that 𝒫X,Y={XN(vY),XN(vY)} is the partition into neighbours and non-neighbours of vY. Call A the collection of these vertices vY. The above implies that 𝒫 partitions X into neighbourhood types over A, that is parts of the form {xX:N(x)A=B} for all choices of BA. By the Sauer–Shelah lemma (see Fact 6), if G has VC-dimension at most d, then at most 𝒪(|A|d)=𝒪(|𝒫|d) of these neighbourhood types are non-empty. Summing over all choices of X, this gives |𝒫|=𝒪(|𝒫|d+1).

We finally compute the running time of this procedure. For each part X𝒫, the algorithm checks if diam(G[X])3 and either complements or keeps G[X] as is; evidently, this can be achieved in time 𝒪(|𝒫||V(G)|2). Additionally, for each distinct pair of parts X,Y𝒫, the algorithm checks if diam(G[X,Y])6 or diam(G[X,Y]¯)6; if neither holds, then G[X,Y] and G[X,Y]¯ are necessarily both disconnected by Lemma 10, and so the algorithm checks if G[X,Y] is the disjoint union of two bicliques. This may be achieved in time 𝒪(|𝒫|2|V(G)|2). In any one of these outcomes, the flips and the refinement of the partition are directly obtainable by Lemma 12.

We remark that an inspection of the proof of Lemma 4 yields a polynomial-time algorithm for converting arbitrary flips into definable ones. The combination of this fact together with Lemma 8 gives an effective lemma for translating the partition metric into the metric induced by a definable flip, i.e., an effective version of Theorem 7.

4 Flip-separability

The starting point to our proof of separability is the recent characterization of monadic dependence via flip-breakability [4], a combinatorial property that allows to find large sets that are pairwise far apart after a bounded number of flips. To make use of this property, we require some additional tools which we believe will be very useful in the analysis of monadically dependent classes. The first is a locality property of the partition metric.

4.1 Locality for various metrics

Evidently, for every graph G and its k-flip G, we may definably recover the structure of G in G by expanding the language with k unary predicates that account for the flip. As such, the metric induced by a concrete flip may be used in a variant of Gaifman’s locality theorem [6]. Interestingly, this idea also applies to any partition metric as these can be approximated by concrete flips due to Lemma 8. This idea is crucially used in our proof of separability; we make this precise below. Recall the following standard corollary of Gaifman’s locality theorem [6], see e.g. [2]. Here, by a k-colored graph we mean a graph with k unary predicates (colors) on it, and the distance between tuples u¯ and v¯ is defined as the minimum distance between any vertex present in u¯ and any vertex present in v¯.

Theorem 13.

For every k and every first-order formula φ(x¯,y¯) in the language of k-colored graphs, there exist numbers r=r(qr(φ)) and t=t(qr(φ),|x¯|,|y¯|,k) such that for every k-colored graph G, there are colorings col1:V(G)x¯[t] and col2:V(G)y¯[t] satisfying the property that for any two tuples u¯V(G)x¯,v¯V(G)y¯ with distG(u¯,v¯)>r, whether φ(u¯,v¯) holds in G depends only on col1(u¯) and col2(v¯).

We argue that a variant of the above is true if we replace distG(u¯,v¯) by dist𝒫(u¯,v¯).

Lemma 14.

For every p and every first-order formula φ(x¯,y¯) in the language of graphs there exist numbers ρ=ρ(qr(φ)) and =(qr(φ),|x¯|,|y¯|,p) such that for every graph G and every partition 𝒫 of V(G) with at most p parts, there are colorings col1:V(G)x¯[] and col2:V(G)y¯[] satisfying the property that for any u¯V(G)x¯,v¯V(G)y¯ with dist𝒫(u¯,v¯)>ρ, whether φ(u¯,v¯) holds in G depends only on col1(u¯) and col2(v¯).

Proof.

Let k:=p2p, r:=r(qr(φ)) and t:=t(qr(φ),|x¯|,|y¯|,k) from Theorem 13, and set ρ:=6r, :=t. Consider a graph G and a partition 𝒫 of G into p parts. By Lemma 8 it follows that there is a k-flip G of G such that

dist𝒫(u,v)6distG(u,v),for all u,vV(G).

Consider an expansion G^ of G with k unary predicates, interpreted as the parts defining this flip. It follows that the edge relation of G can be defined in G^ by a quantifier-free formula, and consequently, we may rewrite φ(x¯,y¯) into a formula φ(x¯,y¯) in the language of k-colored graphs and with the same quantifier rank as φ, that satisfies

Gφ(u¯,v¯)G^φ(u¯,v¯),for all u¯V(G)x¯,v¯V(G)y¯.

Applying Theorem 13, we obtain colorings col1:V(G)x¯[] and in col2:V(G)y¯[] satisfying the property that for any u¯V(G)x¯,v¯V(G)y¯ with distG(u¯,v¯)>r, whether φ(u¯,v¯) holds in G^ only depends on col1(u¯) and col2(v¯). It thus follows by (4.1) and (4.1) that for any tuples u¯V(G)x¯,v¯V(G)y¯ with dist𝒫(u¯,v¯)>ρ, whether φ(u¯,v¯) holds in G only depends on col1(u¯) and col2(v¯), as required.

4.2 Flip-breakability

We will rely on the notion of flip-breakability, introduced in [4].

Definition 15.

A graph class 𝒞 is flip-breakable if for every radius r, there is a tt(𝒞,r) and a function Mr:, such that the following holds. For every graph G𝒞, m, and set WV(G) of size at least Mr(m), there are disjoint subsets A1,A2W each of size at least m and a t-flip H of G such that BallHr(A1)BallHr(A2)=.

Theorem 16 ([4]).

A graph class is monadically dependent if and only if it is flip-breakable.

A natural two-set variant of this property also holds, in which two large sets W1,W2 both of size Mr(m) are given, and one finds the distant subsets A1,A2 of size m with AiWi, see [4, full version, Theorem 19.14]. Combined with Lemma 4 which allows to replace t-flips with t-definable flips, we obtain the following statement which we use in the proof.

Corollary 17.

For every monadically dependent graph class 𝒞 and radius r, there is a t:=t(𝒞,r) and a function Mr:, such that the following holds. For every graph G𝒞, m, and sets W1,W2V(G) each of size at least Mr(m), there are disjoint subsets A1W1,A2W2 each of size at least m and a t-definable flip H of G such that BallHr(A1)BallHr(A2)=.

A simple application of flip-breakability is the following: in a graph G from a monadically dependent class with weights 𝐰, given a very large set of vertices W, there is a large subset AW and a bounded set S satisfying 𝐰(BallSr(A))ε𝐰(V(G)). Indeed, for p1ε, by applying p1 times flip-breakability with radius 2r to W, we obtain p large subsets A1,,Ap of W pairwise at distance more than 2r in some flip metric distS with bounded |S|. Then, the r-balls BallSr(Ai) are all disjoint, and one of them must have only an ε-proportion of the total weight.

The main technical result of this section (Lemma 19 below) is a variant of this statement in which the sets W and S of vertices are replaced by a families  and 𝒴 of t-tuples of vertices. To state this result, we need to define the flip-metric associated with 𝒴, which combines the flip metric distS for all S𝒴. For a graph G and a family 𝒴2V(G), we define for all u,vV(G), and A,BV(G),

dist𝒴(u,v):=maxS𝒴distS(u,v)anddist𝒴(A,B):=minaA,bBdist𝒴(a,b).

Thus, we also have

Ball𝒴r(v):=S𝒴BallSr(v)andBall𝒴r(A)=vABall𝒴r(v).

We call t-uniform if every set in has size exactly t. We will use the sunflower lemma:

Theorem 18 ([5]).

For every t there is a function f: satisfying the following. For every m and in any t-uniform family of size f(m), there is a subfamily of size m and a set Y such that for all AB in , AB=Y. The subfamily  is called a sunflower, and Y its core.

We proceed with the main technical lemma of this section.

Lemma 19.

For every monadically dependent graph class 𝒞, radius r, and ε>0, there are numbers t:=t(𝒞,r) and k:=k(𝒞,r,ε) and a function M:=M(𝒞,r,ε): satisfying the following. Given a graph G𝒞 with weights 𝐰 and a t-uniform family 2V(G) of size ||M(m), there exist two t-uniform families and 𝒴2V(G) of size ||m and |𝒴|k, such that for each S, we have

𝐰(Ball𝒴r(S𝒴))ε𝐰(V(G)).

The proof follows the previously sketched argument, replacing vertices with t-tuples. We repetitively apply flip-breakability to , considering each coordinate of t-tuples one after the other, until  is broken into 1ε subsets with pairwise disjoint r-neighbourhoods. One of these subsets has a r-neighbourhood with only an ε-fraction of the total weight, and satisfies the desired condition. The sunflower lemma is used as a preprocessing step to reduce the problem to the case where tuples in  are pairwise disjoint.

Proof of Lemma 19.

Fix 𝒞,r,ε as in the statement, choose t:=t(𝒞,r) as given by flip-breakability (Corollary 17), and fix p1ε, (p2)t2, and kk(𝒞,r,ε)=+1. Further, call Mbrk: the function given by Corollary 17 (depending on 𝒞,r), and define

M(m)f(pMbrk()(m)),

where f is the bound in the sunflower lemma (Theorem 18), and Mbrk() is the -fold composition of Mbrk.

Consider now G𝒞 with weights 𝐰 and a t-uniform family  of size M(m). Applying Theorem 18 to , we obtain a subfamily SS of size pMbrk()(m) and a core Y such that for all ABSS, AB=Y. Define SS={SY:SSS} the collection of petals of the sunflower SS. By construction, it is t-uniform for t:=t|Y|, and no two sets in SS share a vertex. We arbitrarily partition SS into p subfamilies 1,,p, each of equal size Mbrk()(m).

We now write each set in each q as a t-tuple s¯=(s1,,st). Our goal, using Corollary 17, is to restrict each q to some subfamily of size m, so that q and q are far apart in some appropriate flip metric for qq. Note here that we allow ourselves to discard entire tuples from the family q, but we cannot discard individual vertices from a kept tuple s¯q.

We proceed as follows for every q<q and every i,j[t]: define W1={si:s¯q} the set of ith vertices in tuples of q, and similarly W2={sj:s¯q}. Since the sunflower lemma ensures that no two tuples of q share a vertex, we have |W1|=|q| and |W2|=|q|, which at the start of the procedure are equal to Mbrk()(m). Flip-breakability (Corollary 17) applied to W1,W2 then gives subsets A1W1, A2W2 of size Mbrk(1)(m) each, and a set Y1 of size t such that BallY1r(A1)BallY1r(A2)=, or equivalently distY1(A1,A2)>2r. We then restrict q to the Mbrk(1)(m) tuples whose ith element belongs to A1, and q to the Mbrk(1)(m) tuples whose jth element belongs to A2. For simplicity, we also restrict every remaining q′′, q′′{q,q} to an arbitrary subfamily of size Mbrk(1)(m). We then continue with the next choice of q,q,i,j, yielding the next set Y2 of size t, and further restricting the families s to size Mbrk(2)(m).

After =(p2)t2 steps, m tuples remain in each q, and we have accumulated flip-defining sets Y1,,Y, each of size t. Adding the sunflower core, define 𝒴={Y,Y1,,Y} (here |Y|<t, but we can add arbitrary elements to Y to make 𝒴 t-uniform: this only helps to reach the conclusion of the lemma). By construction, for all qq and all i,j[t], the ith elements of tuples of q are at distance more than 2r from the jth elements of tuples of q in the flip metric distY for some []. A fortiori, the same holds in the metric dist𝒴. Therefore, dist𝒴(q,q)>2r for all qq, or equivalently Ball𝒴r(q) and Ball𝒴r(q) are disjoint. Since these p=1ε balls are disjoint, the one with minimum weight, say around q, will satisfy

𝐰(Ball𝒴r(q))ε𝐰(V(G)). (1)

Finally, we construct  by adding back the core Y to each tuple of q, so that they are once again t-tuples. Since Y𝒴, we clearly have for any S that S𝒴q, and thus the conclusion follows directly from (1).

4.3 Monadic dependence implies flip-separability

We are now ready to prove our main result: any monadically dependent (or equivalently flip-breakable) class 𝒞 is flip-separable. The core of the proof is the following lemma, in which flip-separability is modified to use the metric dist for a t-uniform family , as defined in the previous section. For simplicity, we assume that no vertex has large weight: a weight function 𝐰:V(G)0 of a graph G is called ε-balanced if no vertex vV(G) has weight larger than ε𝐰(V(G)). Vertices with large weight will be added back afterwards.

Lemma 20.

For every monadically dependent graph class 𝒞, r, and ε>0, there are t,k with the following property. For every G𝒞 with an ε-balanced weight function 𝐰, there exists a family 2V(G) of at most k many sets each of size at most t, such that for every vertex vV(G), we have

𝐰(Ballr(v))ε𝐰(V(G)).

We will call a t-uniform family 2V(G) a sparsifying family if it satisfies the conclusion of Lemma 20, i.e. for every vertex vV(G),

𝐰(Ballr(v))ε𝐰(V(G)).

The proof of Lemma 20 follows the sketch given at the end of Section 1. The goal is to find a small sparsifying family . We start with a very large : for instance any  satisfying =V(G) is trivially sparsifying. As long as  is very large, we shrink it as follows. Applying Lemma 19 gives a large subfamily  and a t-uniform family 𝒴 of bounded size which sparsifies . This ensures that any vertex close to  is sparsified by 𝒴 itself. For vertices which are far from , we use locality (Lemma 14) to show that a bounded subfamily 𝒳¯ is enough to replicate the sparsifying power of . Then, tuples in 𝒳𝒳¯ are redundant, and (𝒳)𝒴 is a sparsifying family. Since || is unbounded (function of ||) and |𝒳¯|,|𝒴| are bounded, this new sparsifying family is smaller than .

Proof of Lemma 20.

Fix 𝒞, r, ε as in the statement. Let r>r be the distance given by Lemma 14 for formulas with quantifier rank at most r. Let tt(𝒞,3r,ε), λk(𝒞,3r,ε), and MM(𝒞,r,ε) be defined as in Lemma 19. All defined quantities so far depend only on 𝒞, r, ε.

Fix a graph G𝒞 with ε-balanced weights 𝐰. We may assume that G has at least t vertices, as otherwise ε-balancedness lets us conclude with {V(G)}. Since the weights 𝐰 are ε-balanced, there exists a (large) sparsifying family {Sv:vV(G)} where we can choose Sv to be any set of size t that contains v. We will show that there is a k, which only depends on 𝒞,r,ε, such that whenever we have a sparsifying family of size at least k, we can also find a sparsifying family of strictly smaller size ||<||. This will prove the lemma by induction.

We will specify the value of k later, and now assume that we are given a sparsifying family  of size at least k that we want to compress. We first apply Lemma 19 with radius 3r and ε to which yields t-uniform families and 𝒴 with ||M1(k) and |𝒴|λ such that for each S,

𝐰(Ball𝒴3r(S𝒴))ε𝐰(V(G)). ()

We will next show the existence of a family 𝒳 such that

:=(𝒳)𝒴

is a sparsifying family that is smaller than . We first show that vertices v close to already define balls of small-enough weight, regardless of 𝒳. This is made formal with the following claim.

Claim 21.

For every vBall𝒴2r() we have 𝐰(Ball𝒴r(v))ε𝐰(V(G)).

Proof.

Consider a vertex v as in the claim, i.e. vBall𝒴2r(S) for some S. By definition, every y𝒴 satisfies Ball𝒴2r(y)=Ball𝒴r(y)={y}. This means if vBall𝒴2r(𝒴) then actually v𝒴 and Ball𝒴r(v)={v} has small weight by ε-balancedness. Otherwise, we must have vBall𝒴2r(S𝒴). Then by the triangle inequality

Ball𝒴r(v)Ball𝒴r(v)Ball𝒴3r(S𝒴)

and Ball𝒴r(v) has small weight by (4.3). We will next use the locality of first order logic, to show that we can handle the vertices far from , by only keeping few representatives from . We define the family 𝒳 containing the “redundant” sets from . In order to build 𝒳, consider the first-order formula φ(vw,s¯) with quantifier rank at most r that asserts distS(v,w)>r for every two vertices v,wV(G), set S of size t, and t-tuple s¯ that enumerates S. Moreover, let 𝒫 be the coarsest simultaneous refinement of every partition 𝒫S with S𝒴. Each 𝒫S has size at most (t+2t), hence the size of 𝒫 is bounded by p(t+2t)λ, and dist𝒫(u,v)dist𝒴(u,v) holds for all vertices u,vV(G).

Applying Lemma 14 to φ and p yields a number (r,2,t,p) that only depends on 𝒞,r,ε, and two -colorings col1:V(G)2[] and col2:V(G)t[] of the 2-tuples and t-tuples of V(G) such that for all uvV(G)2 and s¯V(G)t with dist𝒫(uv,s¯)>r, whether or not Gφ(uv,s¯) holds only depends on col1(uv) and col2(s¯). By our choice of φ, whether or not distS(u,v)>r holds for S:={s:ss¯} depends only on these colors, too. Since dist𝒫(uv,s¯)dist𝒴(uv,s¯), the above in particular holds when dist𝒴(uv,s¯)>r.

Let 𝒳¯ be a subfamily constructed by picking for every color K[] a set S such that col2(s¯)=K holds for some enumeration s¯ of S (when such a set S exists for K). We set 𝒳:=𝒳¯, which completes the definition of . Let us now show that is a sparsifying family. We have already argued in Claim 21 that vertices close to some set S have balls of sufficiently small weight. It remains to argue that the same holds for vertices far from .

Claim 22.

For every vV(G) with vBall𝒴2r(), we have Ballr(v)Ballr(v).

Proof.

Let v be as in the statement of the claim. Let wBallr(v). We want to show that wBallr(v), too. By assumption, there exists a set S such that distS(v,w)>r. If S is also contained in , then we are done. Otherwise, S𝒳. Let s¯ be a t-tuple that enumerates S. We know that Gφ(vw,s¯). Since S𝒳, we know that dist𝒴(v,s¯)>2r by assumption. Now if dist𝒴(v,w)>r, then we are also done. Otherwise, we have dist𝒴(v,w)r and by the triangle inequality dist𝒴(vw,s¯)>r. By construction of 𝒳 there is another S that has an enumeration s¯ such that col2(s¯)=col2(s¯)=K. By the same argument as before, also dist𝒴(vw,s¯)>r. As s¯ and s¯ have the same color and are both far from vw, Lemma 14 gives us that also Gφ(vw,s¯) and dist(v,w)>r, as desired. It follows by Claim 21, Claim 22, and being a sparsifying family, that also is a sparsifying family. It finally remains to analyze the size of . We have

|||||𝒳|+|𝒴|,

where has size at least k, 𝒴 has size at most λ, and 𝒳 has size at least M1(k). This means

||||M1(k)++λ.

Setting kM(+λ+1) yields ||<|| as desired.

We can now wrap things up in the main result of this section.

Lemma 23.

Every monadically dependent graph class is flip-separable.

Proof.

Let 𝒞 be monadically dependent and fix r and ε>0. Consider the graph class

𝒞+:={G+In:G𝒞,n}

where In denotes an independent set of size n, and + denotes disjoint union of graphs. Evidently, 𝒞+ is still monadically dependent. Let t,k0 be the constants obtained by applying Lemma 20 on 𝒞+ with r:=6r and ε:=ε. We fix k1:=(k0t+2k0t), k2:=k12k1, and k:=k2(1ε+21ε). Take G𝒞 and weights 𝐰:V(G)0, and let W:={vV(G):𝐰(v)>ε𝐰(V(G))} be the set of vertices of ε-large weight. Evidently, |W|1ε. By assigning ε-small weights to vertices in the independent set we obtain some c, a graph G+:=G+Ic𝒞+, and a weight function 𝐰+:V(G+)0 with the following properties:

  1. 1.

    𝐰+(v)=𝐰(v) for all vV(G)W;

  2. 2.

    𝐰+(v)=0 for all vW;

  3. 3.

    𝐰+(V(G+))=𝐰(V(G));

  4. 4.

    𝐰+ is ε-balanced.

It follows by Lemma 20 that there is a collection 2V(G) of at most k0 many sets of size at most t such that for every vertex vV(G+)

𝐰+(Ball6r(v))ε𝐰+(V(G+)).

Let SS=V(G); clearly |SS|k0t. Consider the partition 𝒫 of size k1 into SS-classes. By Lemma 8 we obtain a k2-flip G0+ of G+ such that for all vV(G)

BallG0+r(v)Ball𝒫6r(v)=BallSS6r(v)Ball6r(v).

Finally, consider the k-flip G1+ of G+ obtained from G0+ by isolating the vertices in V(G)W, and let G:=G1+[V(G)]; this is a k-flip of G. It follows that for every vV(G) of ε-small weight,

𝐰(BallGr(v))=𝐰(BallG1+r(v))=𝐰+(BallG0+r(v))𝐰+(Ball6r(v))
ε𝐰+(V(G+))=ε𝐰(V(G)).

Hence, 𝒞 is flip-separable as claimed.

4.4 Flip-separability implies monadic dependence

We finally show that flip-separability implies flip-breakability, which is known to be equivalent to monadic dependence [4].

Lemma 24.

Every flip-separable graph class is flip-breakable, and hence monadically dependent.

Proof.

For every integer r0 and for ε=1/2, let k satisfy the definition of flip-separability of 𝒞 for the parameters 4r and ε. We show that we can take t=t(r,𝒞):=k and Mr(m)=4m2, in Definition 15, to witness that 𝒞 is flip-breakable.

Fix G𝒞, m, and WV(G) of size at least Mr(m)=4m2. We can assume without loss of generality that W has size exactly 4m2. Define the weights 𝐰:V(G)0 by 𝐰(v)=1 for every vW, and 𝐰(v)=0 otherwise. The flip-separability of 𝒞 with radius 4r, ε=1/2, and this weight function yields a k-flip H of G such that

𝐰(BallH4r(v))=|BallH4r(v)W|ε𝐰(V(G))=|W|/2

for every vV(G) of weight at most |W|/2. We can of course assume m>0 (there is nothing to prove otherwise), thus |W|4, and every vertex of G has weight at most |W|/2. We distinguish two covering cases.

Case 1.

There is a vertex vV(G) such that |BallH2r(v)W||W|.
On the one hand, A1BallH2r(v)W has size at least 4m2=2m>m. From the flip-separability, we also know that ABallH4r(v)W has size at most |W|/2. Therefore, on the other hand, A2WA has size at least |W|/2=2m2m. In H, no vertex of A1 is at distance at most 2r of a vertex w of A2, as that would put w in BallH4r(v). Thus, A1,A2 satisfy the conclusion of Definition 15.

Case 2.

For every vV(G), it holds that |BallH2r(v)W|<|W|.
Let {v1,v2,,vh} be a maximal (greedily-constructed) subset of W such that for every ij[h], vi and vj are at distance larger than 2r from each other in H. By assumption, we have that h|W|/|W|=|W|=2m. Therefore, A1{v1,v2,,vm} and A2{vm+1,vm+2,,v2m} satisfy the conclusion of Definition 15.

Lemmas 23 and 24 jointly establish Theorem 3. We remark that the flip-breakability margins Mr(m)=4m2 obtained in Lemma 24 are polynomial in m and depend on neither 𝒞 nor r. This is a strengthening of the original bounds obtained in [4], where Mr was established as a fast-growing function with dependence on both 𝒞 and r. This means our proof of Theorem 3 can also be seen as a boosting argument for flip-breakability.

References

  • [1] J.T. Baldwin and S. Shelah. Second-order quantifiers and the complexity of theories. Notre Dame Journal of Formal Logic, 26(3):229–303, 1985. doi:10.1305/NDJFL/1093870870.
  • [2] Édouard Bonnet, Jan Dreier, Jakub Gajarský, Stephan Kreutzer, Nikolas Mählmann, Pierre Simon, and Szymon Torunczyk. Model checking on interpretations of classes of bounded local cliquewidth. In Christel Baier and Dana Fisman, editors, LICS ’22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2 - 5, 2022, pages 54:1–54:13. ACM, 2022. doi:10.1145/3531130.3533367.
  • [3] Jan Dreier, Nikolas Mählmann, Sebastian Siebertz, and Szymon Toruńczyk. Indiscernibles and Flatness in Monadically Stable and Monadically NIP Classes. In 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, volume 261 of LIPIcs, pages 125:1–125:18, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2023.125.
  • [4] Jan Dreier, Nikolas Mählmann, and Szymon Toruńczyk. Flip-breakability: A combinatorial dichotomy for monadically dependent graph classes. In 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 1550–1560. ACM, 2024. full version: arXiv:2403.15201. doi:10.1145/3618260.3649739.
  • [5] Paul Erdős and Richard Rado. Intersection theorems for systems of sets. Journal of the London Mathematical Society, s1-35(1):85–90, 1960. doi:10.1112/jlms/s1-35.1.85.
  • [6] Haim Gaifman. On local and non-local properties. In J. Stern, editor, Proceedings of the Herbrand Symposium, volume 107 of Studies in Logic and the Foundations of Mathematics, pages 105–135. Elsevier, 1982. doi:10.1016/S0049-237X(08)71879-2.
  • [7] Jakub Gajarský, Nikolas Mählmann, Rose McCarty, Pierre Ohlmann, Michał Pilipczuk, Wojciech Przybyszewski, Sebastian Siebertz, Marek Sokołowski, and Szymon Toruńczyk. Flipper Games for Monadically Stable Graph Classes. In 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, volume 261 of LIPIcs, pages 128:1–128:16, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2023.128.
  • [8] Richard J. Lipton and Robert Endre Tarjan. Applications of a planar separator theorem. SIAM Journal on Computing, 9(3):615–627, 1980. doi:10.1137/0209046.
  • [9] Nikolas Mählmann. Monadically Stable and Monadically Dependent Graph Classes: Characterizations and Algorithmic Meta-Theorems. PhD thesis, University of Bremen, 2024.
  • [10] Jaroslav Nešetřil and Patrice Ossona de Mendez. Existence of modeling limits for sequences of sparse structures. The Journal of Symbolic Logic, 84(2):452–472, 2019. doi:10.1017/jsl.2018.32.
  • [11] Jaroslav Nešetřil and Patrice Ossona de Mendez. Sparsity - Graphs, Structures, and Algorithms, volume 28 of Algorithms and Combinatorics. Springer, 2012. doi:10.1007/978-3-642-27875-4.
  • [12] Jaroslav Nešetřil and Patrice Ossona de Mendez. Structural sparsity. Russian Mathematical Surveys, 71(1):79, February 2016. doi:10.1070/RM9688.
  • [13] Jaroslav Nešetřil and Patrice Ossona de Mendez. On nowhere dense graphs. Eur. J. Comb., 32(4):600–617, 2011. doi:10.1016/j.ejc.2011.01.006.
  • [14] Pierre Ohlmann, Michał Pilipczuk, Wojciech Przybyszewski, and Szymon Toruńczyk. Canonical Decompositions in Monadically Stable and Bounded Shrubdepth Graph Classes. In 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, volume 261 of LIPIcs, pages 135:1–135:17, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2023.135.
  • [15] Michał Pilipczuk. Graph classes through the lens of logic. ArXiv preprint, abs/2501.04166, 2025. doi:10.48550/arXiv.2501.04166.
  • [16] Norbert Sauer. On the density of families of sets. Journal of Combinatorial Theory, Series A, 13(1):145–147, 1972. doi:10.1016/0097-3165(72)90019-2.
  • [17] Saharon Shelah. A combinatorial problem; stability and order for models and theories in infinitary languages. Pacific Journal of Mathematics, 41(1):247–261, 1972.
  • [18] Szymon Toruńczyk. Flip-width: Cops and robber on dense graphs. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, pages 663–700. IEEE, 2023. doi:10.1109/FOCS57990.2023.00045.