First-Order Logic and Twin-Width for Some Geometric Graphs
Abstract
For some geometric graph classes, tractability of testing first-order formulas is precisely characterised by the graph parameter twin-width. This was first proved for interval graphs among others in [BCKKLT, IPEC ’22], where the equivalence is called delineation, and more generally holds for circle graphs, rooted directed path graphs, and -graphs when is a forest. Delineation is based on the key idea that geometric graphs often admit natural vertex orderings, allowing to use the very rich theory of twin-width for ordered graphs.
Answering two questions raised in their work, we prove that delineation holds for intersection graphs of non-degenerate axis-parallel unit segment graphs, but fails for visibility graphs of 1.5D terrains. We also prove delineation for intersection graphs of circular arcs.
Keywords and phrases:
Twin-width, axis-parallel unit segment graphs, circular arc graphs, terrain visibility graphs, first-order logic, model checking, FPTFunding:
Colin Geniet: Supported by the Institute for Basic Science (IBS-R029-C1).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithms ; Theory of computation Finite Model Theory ; Theory of computation Computational geometry ; Mathematics of computing Graph theoryAcknowledgements:
The authors are extremely grateful to Eunjung Kim for suggesting the questions treated in this work and for very insightful discussions on these topics, as well as Sebastian Wiederrecht for stimulating discussions during the early stages of this project. We would also like to thank Édouard Bonnet for very helpful explanations regarding twin-width of segment graphs.Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The first-order model checking problem asks, given a graph and a first-order (FO) formula , to test whether satisfies . In general this is a difficult problem, known to be -hard [8], and subsuming problems such as finding in an independent set, a dominating set, or any fixed induced subgraph. For a graph class , one may ask whether this FO model checking problem admits a fixed parameter tractable (FPT) algorithm, i.e. one running in time for some (computable) function .
Classically, this problem has been studied in sparse graph classes, such as bounded degree graphs [17] and more generally nowhere dense classes [13], which admit such FPT algorithms. A more recent and incomparable development has come from the graph parameter twin-width [4]: if is a class of bounded twin-width, and witnesses of this (so-called contraction sequences) can be efficiently computed, then FO model checking in is FPT.
Since bounded twin-width and bounded degree are incomparable, a class with FPT model checking need not have bounded twin-width. Yet a number of remarkable cases exist in which twin-width is exactly the boundary of efficient FO model checking. A fundamental result of [3] is that for any hereditary (i.e. closed under induced subgraphs) class of ordered graphs (i.e. graphs given with a total ordering of vertices, which formulas can query), model checking in is FPT if and only if has bounded twin-width111Under the assumption , or equivalently that model checking for all graphs is not FPT.. By reducing to ordered graphs using a “nice” vertex ordering, similar results were proved for interval graphs and rooted directed path graphs in [1], where this equivalence is called delineation. It also holds for circle graphs [15], -graphs for any fixed forest [5], and tournaments [12]. We continue this line of delineation results for geometric intersection graphs:
Theorem 1.
Model checking in is FPT if and only if has bounded twin-width (under the assumption ) in the following cases:
-
1.
is a hereditary subclass of intersection graphs of circular arcs, or
-
2.
is a hereditary subclass of intersection graphs of non-degenerate, axis-parallel unit segments, given by their geometric representation.
In the axis-parallel unit segments (APUS) case, we require the geometric representation to be given, as computing it is NP-hard [16]. This is not an issue in circular arc graphs, where representations can be found in polynomial time [18]. We can also prove that relaxing any of the assumptions on non-degenerate APUS breaks delineation.
Finally, we show that delineation fails for visibility graphs of 1.5D-terrains (i.e. polygonal curves formed by an -monotone sequence of points).
Theorem 2 ().
There is a class of 1.5D-terrain visibility graphs, whose hereditary closure allows FPT model checking, but which has unbounded twin-width.
The questions of APUS graphs and 1.5D-terrain graphs were both raised in [1].
To further pursue this line of results, one may consider other shapes with unit size: whether unit disks graphs are delineated seems particularly interesting. The difficulty there might be to find the right notion of minimisation. One could also consider unit squares; we expect that our techniques can be used to prove delineation in the case of axis-aligned unit squares, and that delineation fails without the axis-aligned condition.
It may also make sense to consider other parameters than twin-width. Our non-delineated constructions of degenerate APUS graphs and terrain graphs use merge-width [10] to obtain FPT model checking. One can ask whether for these graphs, FPT model checking is equivalent to having bounded merge-width. Tackling this question would likely require characterising merge-width through some obstructions, a difficult open problem.
1.1 Proof overview
Let be the graph class we are interested in, e.g. the class of all circular-arc graphs. Our goal is the following: for any hereditary222The hereditary assumption is necessary to avoid classes in which model checking is easy for trivial reasons, such as graphs of the form: a complex graph on vertices, plus isolated vertices as padding. subclass , there is an FPT model checking algorithm in if and only if has bounded twin-width. Inspired by [1, 15], we obtain such an equivalence by proving a dichotomy of the following form, for any subclass :
-
Either we can compute in polynomial time a contraction sequence for any , witnessing that has bounded twin-width. Then [4] gives FPT model checking in .
-
Or is monadically independent, which informally means that graphs in can be used to encode arbitrary graphs through FO logic (this is formalised by FO transductions, see Section 2.4 for the definition). In that case, and if additionally is hereditary, then FO model checking on the class of all graphs reduces to FO model checking on [9], proving that the latter is hard for the parametrised complexity class [8].
Let us point out that if has bounded twin-width, then it is monadically dependent (the opposite of monadically independent). Thus a subclass has bounded twin-width if and only if it is monadically dependent; this is the precise definition of delineation in [1]. The above dichotomy is a slight strengthening of delineation, additionally requiring to be able to efficiently find contraction sequences. When is hereditary, and assuming , this strengthening gives the equivalence of having bounded twin-width, being monadically dependent, and admitting an FPT model checking algorithm. Let us point out that it is a major conjecture in finite model theory that the last two points are always equivalent:
Conjecture 3 ([11, Conjecture 8.2]).
For any hereditary class , there is an FPT FO model checking algorithm for graphs in if and only if is monadically dependent.
Our results confirm special cases of this, where twin-width explains the equivalence.
Coming back to the proof overview, let us explain how the previously stated dichotomy is achieved. The starting point is the characterisation of twin-width through obstructions in matrices [4]: given any 0–1 matrix , one can efficiently find either a contraction sequence for (witnessing small twin-width), or a grid. Given the geometric representation of the graph , we construct some auxiliary matrix . For instance, for circular arc graphs, we identify the circle with modulo , and the matrix has a 1 at position whenever there is an arc clockwise from to . We then prove two facts:
-
First, can be reconstructed from by a sequence of operations that preserve twin-width. Thus if has bounded twin-width, then so does . This is efficient: a contraction sequence for can quickly be computed from one for .
-
Second, if contains a sufficiently large grid, then contains a complex structure called a transversal pair. It is known that if graphs in contain arbitrarily large transversal pairs, then is monadically independent [1].
Thus either one can find contraction sequences for the auxiliary matrices , and thus also for , or these matrices have arbitrarily large grids, hence contains arbitrarily large transversal pairs and is monadically independent. The case of APUS graphs requires one additional step: we construct local auxiliary matrices, corresponding to 1-by-1 squares in the segment representation. If any such matrix has a grid, then we find a transversal pair; if all local matrices have bounded twin-width, then so does the full graph.
2 Preliminaries
The proofs for results marked with () can be found in the full version. For , we denote by the interval of integers .
2.1 Graphs and relational structures
For a graph , we write and for its vertex and edge sets. The set of neighbours of is . Vertices are twins if ( may or not be an edge). For , is the subgraph induced by . When is a linear ordering of , we denote by the adjacency matrix with rows and columns ordered by . Similarly, if and are orderings of and , then is the incidence matrix with rows and columns ordered by and .
More generally, a binary relational structure (or simply binary structure) consists of a vertex set , and relations . It can be viewed as a directed graph with kinds of edges, where there may be several edges of different kinds between two vertices (but not multiple edges of the same kind). Given a linear ordering of , one defines the adjacency matrix of each relation , denoted by . An ordered binary structure is a binary structure in which one of the relations is a linear ordering of the vertex set, normally denoted by . The structure is thus of the form . A special case is ordered graphs , where is a graph and a linear ordering of .
2.2 Grids
The following notion of grids comes from [14]. Given a point , we write for its - and -coordinates. A -grid in the plane is a family of points satisfying the following for any :
| if , then andif , then . |
Observe that there are intervals and of such that : take to be the smallest interval containing for all , and similarly with .
This extends to 0–1 matrices, interpreting a one at position in the matrix as a point with coordinates . We say that contains a -grid if the point set defined by the ones in contains a -grid in the previous sense. Then there are partitions into intervals and of the rows and columns as above. The ordering of rows and columns is crucial, which is why we make it explicit in .
The Ramsey property for grids easily follows from the Ramsey theorem on bicliques:
Lemma 4 (Ramsey theorem for grids, ).
There is a function such that if is a point set containing an -grid, and is any colouring, then contains a -grid consisting only of points of colour for some .
When the - and -coordinates of the grid are indexed by the same set (e.g. in an adjacency matrix), they can be assumed to come from disjoint intervals at a slight cost:
Lemma 5 ().
Any -grid contains a -subgrid such that the sets and of - and -coordinates satisfy either or .
The following technical lemma relates grids in incidence and adjacency matrices.
Lemma 6 ().
Let be a binary relation such that has no -grid. Let be the lexicographic ordering of , i.e. if either , or and . Then has no -grid.
2.3 Twin-width
Twin-width [4] is defined by contraction sequences: a contraction sequence of width is a witness that the twin-width is at most . We omit this definition, as we do not directly manipulate contraction sequences, instead relying on higher level results. It suffices to know that twin-width is well-defined when is a graph or a binary structure.
We will use the following observation, which is the origin of the name “twin-width”.
Lemma 7 ([4]).
If are twins in , then .
The fundamental characterisation of twin-width is that it corresponds to ordered graphs whose adjacency matrix excludes some high-rank grid-like structures [3, Theorem 7]. This characterisation is furthermore efficient. It is simple to check that these high-rank grids contain our notion of grid, hence this implies the following.
Corollary 8 (of [4, Thm. 5.4] or [3, Thm. 7]).
There are functions and an algorithm which, given an ordered graph whose matrix has no -grid, computes a contraction sequence witnessing that in time .
Ordered graphs of high twin-width have a Ramsey-like property:
Theorem 9 ([3]).
There is a function such that if is an ordered graph with , and for all , then .
Proof.
This follows from the characterisation of bounded twin-width for ordered graphs by excluding so-called high-rank divisions [3, Theorems 7 and 23], and the Ramsey property for these high-rank divisions [3, Lemma 24].
It is easy to observe that the twin-width of a graph is the maximum twin-width of its connected components. We will use the following variant of this result for ordered graphs.
Lemma 10 ().
Let be an ordered graph, with partitioned into intervals , such that each edge is between and for some , and the subgraphs have twin-width at most for all . Then .
2.4 First-order logic
A relational signature is a set of relation symbols , each with an arity . In this work, we will only use unary and binary symbols, i.e. with arity 1 or 2. A -structure consists of a vertex set , and an interpretation of each symbol as a relation of appropriate arity. Thus a unary symbol is interpreted as a vertex subset, and a binary symbol as a set of directed edges with loops. For instance, graphs are -structures, and ordered graphs are -structures (with binary symbols).
FO formulas over a signature consist of quantifiers over vertices , , boolean operators , and predicates testing whether is a tuple in the interpretation of , as well as the equality predicate . For example,
is a formula over the signature (for graphs) expressing that are at distance at most two. When the formula has free variables, they are written as arguments of as above. A formula without free variables is called a sentence. If is a formula over , is a -structure, and are vertices, then denotes that is satisfied by , with the variables interpreted as respectively.
The FPT model checking algorithm for twin-width shows the following.
Theorem 11 ([4, Theorem 1]).
Given a graph , a contraction sequence of width for , and a sentence , one can test whether in time .
Given two signatures , an FO interpretation from to is a map, defined in FO logic, from -structures to -structures. Precisely, is described by giving
-
1.
for each symbol of arity , an FO formula over , and
-
2.
one last FO formula again over .
Given a -structure , its image is the relational structure where the vertex set is restricted to vertices satisfying , i.e.
and for each symbol , the relation set is described by , i.e.
Transductions are a non-deterministic generalisation of interpretations, i.e., a -to- transduction outputs a set of -structures, rather than a single one. Let be a signature, and be unary symbols, disjoint from . The -colouring is the one-to-many operation which maps a -structure to all possible extensions of as -structures , meaning that and for any , while the are chosen as arbitrary subsets of . An FO transduction is the composition of a -colouring (for fixed ), followed by an FO interpretation.
It is folklore that interpretations and transductions can be composed.
Lemma 12.
If are FO transductions (resp. interpretations) from to and to respectively, then the composition is an FO transduction (interpretation) from to .
Transductions preserve bounded twin-width, and this can be made efficient.
Theorem 13 ([4, Theorem 8.1]).
For any FO transduction , there is a function such that for any binary structure and , .
Furthermore, given a contraction sequence of width for , and the colouring of used to obtain through , one can compute in time a contraction sequence of width for for some function depending on .
A graph class is called monadically independent if it FO transduces the class of all graphs, i.e. if there exists a transduction such that contains all graphs. If there is no such transduction, then is called monadically dependent. Theorem 13 implies that bounded twin-width classes are monadically dependent.
Theorem 14 ([9]).
If is a hereditary monadically independent class of graphs, then FO model checking in is -hard.
To prove that a class is monadically independent, we will use the next construction, proposed in [1]. Our definition differs slightly, but the idea and purpose are the same.
Definition 15.
A transversal pair consists of three sets , and with edges if and only if , and if and only if (see Figure 1). Edges within or between and are unconstrained.
Lemma 16 ().
Let be a graph class such that for any , some contains a transversal pair . Then is monadically independent.
2.5 Geometric graphs
Given a set family , the intersection graph is defined with as its vertex set, and an edge between if and only if . The family is a representation of .
Circular arc graphs.
A circular arc graph is an intersection graph of arcs around a circle. We work with discrete representations in modulo : a (discrete) circular arc is an interval modulo ; explicitly, when , and when . Any circular arc representation of can be turned into a discrete circular arcs representation as above for , in time polynomial in the size of the encoding of . We often identify the vertices of with the arcs of . When is an arc, and denote its endpoints.
Theorem 17 ([18]).
Given a graph , one can compute a circular arc representation of or detect that it is not a circular arc graph in polynomial time.
Axis-parallel unit segment graphs.
An axis-parallel unit segment (APUS) is a segment of length 1 in the plane that is horizontal or vertical. We denote by the horizontal segment from to , and by the vertical one from to . An APUS graph is the intersection graph of a family of APUS. We again work with discrete representations: Any APUS graph has a representation using coordinates that are non-negative multiples of . This follows from a similar result on unit interval graphs [7], applied to vertical and horizontal coordinates independently.
A family of APUS is non-degenerate if no two horizontal (resp. two vertical) segments of intersect. Intersection graphs of non-degenerate APUS families are called non-degenerate APUS graphs. This is equivalent to being the intersection graph of an arbitrary family of APUS, ignoring intersections between horizontal (vertical) segments (i.e. has no edge for such intersections). Non-degenerate APUS graphs have a natural bipartition into horizontal and vertical segments. We use the second definition of non-degenerate APUS graphs, that is, degenerate intersections can exist, but are ignored in intersection graphs. The reason is that we will use APUS representations with minimized coordinates (see Section 4).
3 Delineation of circular arc graphs
In this section, we prove Theorem 1 for circular arc graphs.
Given a family of circular arcs in , we define its endpoint matrix , where rows and columns are , and there is a 1 at position if and only if .
Lemma 18.
There are functions such that if has no -grid, then one can compute a contraction sequence witnessing that in FPT time .
Proof.
In a first time, let us assume that does not contain multiple identical circular arcs.
We identify intervals with pairs , so that describes a binary relation on . Its adjacency matrix with the natural ordering of is exactly . It has no -grid, hence by Lemma 6, the incidence matrix has no -grid, where is the lexicographic ordering of .
Construct the following ordered graph . The vertex set is , ordered with before , with the natural ordering inside , and the lexicographic ordering inside . In , each interval is connected to its two endpoints. Thus consists of and its transpose arranged as diagonal blocks. Since has no -grid, one may check that this implies that has no -grid. Using Corollary 8, one can compute in FPT time a contraction sequence of bounded width for .
To conclude using Theorem 13, we build an FO transduction such that :
-
1.
Firstly, add colours to to distinguish and , and also to indicate for each interval whether or not (this is 3 colours in total).
-
2.
Using these colours, we can write a formula testing if belongs to the interval . Indeed, let be the neighbours of , with . Then the interval is either or , indicated by the colour given to at step 1. It suffices for to check that in the first case, and that in the second.
As an extreme case, one could have , which is adjacent to only. Then is the only point contained in . All of the above is easily expressed by a first-order formula.
-
3.
Now, one can test if intersect with the formula .
-
4.
Finally, vertices of are deleted, keeping only and the edges defined by .
This is a transduction which, for the choice of colours specified at step 1, yields from . By Theorem 13, we obtain a contraction sequence for from the one for in time.
It remains to consider the case where has multiple identical arcs. Let be with these duplicates removed. Then , and is with some twins removed, hence by Lemma 7 . We conclude using the results for .
Say a circular arc representation is minimized if its circular arcs are inclusion-wise minimal while representing , i.e. for any , removing either endpoint of would cause it to no longer intersect some other arc . A circular arc representation can easily be minimized in time polynomial in the size of the encoding of .
Lemma 19.
If is a minimized circular arc representation and with , then there exist such that and .
Proof.
If violates the condition, then it can be shortened by deleting either or .
Lemma 20.
Let be a positive integer. Consider a minimized circular arc representation of a graph . If contains a -grid, then contains a transversal pair .
Proof.
Consider a -grid in . It consists of intervals with whenever , and whenever . By Lemma 5, a -grid can be extracted so that the - and -coordinates belong to disjoint intervals. Thus we assume that , and that for all , the case being similar.333This does not reduce the problem to an interval graph, as we will still use arcs other than the s.
Let us start constructing the transversal pair . Its central vertices are obtained by picking every other row and column of the grid. For the left vertices , we first extract auxiliary intervals for . We claim that for all
| if , then , and | (1) | ||
| if , then . | (2) |
Indeed, if , then , which gives
| (3) |
In addition, since all left endpoints are smaller than all right endpoints for intervals of the grid, we also have . Thus contains , proving (1). On the other hand, if , then we have and , which gives
| (4) |
the inclusion being strict at both endpoints, which implies (2).
Using the minimality of and Lemma 19, there is an interval such that . It follows from 1 and 2 that and intersect if and only if . Symmetrically, we define , use Lemma 19 to find such that , and obtain that and intersect if and only if . Up to reversing the order of indices, the former description of gives a transversal pair.
Theorem 21.
Let be a subclass of circular arc graphs. Then has bounded twin-width if and only if it is monadically dependent. Further, when is hereditary, and assuming , these are also equivalent to FO model checking in being FPT.
Proof.
For each , call the circular arc representation computed by Theorem 17, after minimizing it. Consider the endpoint matrices . If matrices in have no -grid for some , then by Lemma 18 contraction sequences of width can be computed in FPT time for graphs in . Thus has bounded twin-width (and thus is monadically dependent), and model checking in is FPT by Theorem 11.
If however matrices in have arbitrarily large grids, then by Lemma 20, contains arbitrarily large transversal pairs. Thus is monadically independent by Lemma 16. If is hereditary, this implies by Theorem 14 that model checking in is -hard.
4 Delineation of axis-parallel unit segment graphs
This section proves Theorem 1 for APUS graphs. Recall that we work with non-degenerate APUS graphs: intersections between two horizontal (resp. vertical) segments are ignored.
As in the circular arc case, we associate the endpoint matrix to a family of APUS. The columns (resp. rows) are the - (-) coordinates of all endpoints of segments in , and the entry at position is 1 if and only if or . A variant of Lemma 18 shows that when has no -grid, then has bounded twin-width. However, the converse fails: even with appropriate minimality conditions on , a grid in does not imply that has unbounded twin-width. This e.g. fails if the grid is formed by segments that are pairwise at distance more than 1 from each other. The solution, inspired by [1, Lemma 56], is to partition the APUS graph into regions corresponding to unit squares, and look for a grid in each region independently.
4.1 Splitting along unit squares
In an APUS family , for , denote by the subset of segments where and , and define similarly for vertical segments. Clearly the sets for partition . Also, observe that segments in and can intersect only if and . Let denote the set , and the edges of contained in that come from segments intersecting in the unit square , for segments coming from the right and top sides of this square (hence in the notation). Similarly, define , , and , as well as the corresponding edge sets. The sets for and partition the edge set of . We work on each independently with the techniques of Section 3, and show that when all have bounded twin-width, then so does . Let us start with the latter.
In general, edge partitions do not preserve bounded twin-width, but they do for ordered graphs (Theorem 9). To use this result, we define an ordering of segments.
A natural attempt is to take the lexicographic ordering of segments, i.e. if and only if , or and , and similarly for vertical segments. However this works poorly with twin-width: consider a family of segments such that intersect close to . In particular, do not intersect for . By slightly tweaking their -coordinates, any permutation of can be realised as the lexicographic ordering . Thus even for these very simple segment families, the ordered intersection graph can be an arbitrary ordered matching, which are known to have unbounded twin-width (see e.g. [3]).
The solution is to have two layers of lexicographic ordering, at local and global scales. That is, we first order the sets lexicographically by , and then inside each order the segments lexicographically as in . The same ordering applies to vertical segments. Finally, all horizontal segments are placed before all vertical ones. Crucially, in , and unlike , each set or is an interval.
For an APUS family with intersection graph , denote by the same intersection graph ordered by . Further, for and , let be the restriction to .
Lemma 22.
If for all , then for some function .
Proof.
Group the edge sets into 4 classes according to the direction , i.e. define . The sets for are a partition of the edges, hence by Theorem 9, it suffices to prove that each has bounded twin-width.
We consider ; the other cases are similar. In , vertices of are only adjacent to those of . Also, each and is an interval of . The intervals are ordered lexicographically by between themselves, and the corresponding lexicographic ordering is used for the . Finally, all come before all . This fits all the requirements of Lemma 10, proving that has twin-width at most .
4.2 APUS graphs within a unit square
Let us now focus on each , to find either bounded twin-width or a transversal pair.
Here, it must be mentioned that the graph is the complement of a circular arc graph, see Figure 4. It is thus not surprising that the techniques of Section 3 can be adapted. The results however cannot be applied as a blackbox: to construct transversal pairs when the matrix has a large grid, we may also need segments outside .
We first show that if has no -grid, its intersection graph has bounded twin-width. By symmetry, it is enough to prove the result for . The only difference with Lemma 18 is that we now care about the ordered graph, with ordering .
Lemma 23 ().
Let be a family of APUS consisting of or with . If the matrix has no -grid, then for some function .
We now show that when does contain a grid, then contains a transversal pair. As in Section 3, this requires some minimality hypothesis. We assume discrete coordinates as in Section 2.5, i.e. in an APUS family , the coordinates of segments are non-negative multiples of some . Subject to this condition, call minimized if its segments cannot be pushed towards the bottom-left while preserving the intersection graph. Formally, for a fixed , we say that is minimized if there is no other family with the same such that there is a bijection that preserves the vertical/horizontal orientation and induces an isomorphism of the intersection graphs, and such that the endpoints of are coordinate-wise no larger than that of .
Lemma 24.
In a minimized APUS family , for any horizontal , there are:
-
1.
a vertical segment or with , unless , and
-
2.
a vertical segment or with , unless ,
and similarly when flipping the roles of vertical and horizontal, and of - and -coordinates.
Proof.
If that is not the case, can be moved to the left (in case 1) or the bottom (in case 2) by without changing the intersection graph, contradicting minimality.
Lemma 25 ().
Consider a minimized APUS family , and its restriction for some and . There is a function such that if has an -grid, then contains a transversal pair .
Proof sketch.
Consider an -grid (for to be determined) in , consisting of points as described in Section 2.2. For each , contains a horizontal segment with as left endpoint or a vertical segment with as bottom endpoint.
Using Ramsey’s theorem (Lemma 4), when is chosen large enough, we can find a -subgrid in which all segments have the same orientation, and their minimality is ensured in the same manner (in the sense of cases (1) or (2) of Lemma 24). Without loss of generality, we assume that segments of are horizontal, denoted as ; with horizontal minimality ensured by line segments on the left that intersect the bottom boundary; and vertical minimality ensured by line segments on the bottom (see Figure 5).
The construction of the transversal pair is now similar to Lemma 20. Pick every other segment of for the central vertices, i.e. define . Now consider one of the topmost segments , and let be the vertical segment that forbids moving left, which is assumed to intersect the bottom boundary of the square. Then and intersect if and only if . Similarly, we pick to be the vertical segment blocking from moving down. Up to reversing some indices, this yields a transversal pair of order .
Our main theorem for APUS graphs follows from Lemmas 22, 23, and 25, along the same lines as Theorem 21, with the additional step of splitting into unit squares (Lemma 22). Since computing APUS representation of graphs is NP-hard [16], some subtleties arise regarding the complexity of FO model checking: we assume graphs to be given by their APUS representation, and use that it is easy to compute an APUS representation of transversal pairs as in Figure 5.
Theorem 26 ().
Let be a subclass of non-degenerate APUS graphs. Then has bounded twin-width if and only if it is monadically dependent. Further, when is hereditary, and assuming , these are also equivalent to FO model checking in being FPT, when graphs in are given by some APUS representation.
5 Obstructions to delineation
In this section, we construct graphs with unbounded twin-width, but for which FO model checking is FPT. We use them to show that delineation fails for 1.5D-terrain visibility graphs, and also when relaxing any of the hypotheses of Theorem 26.
Precisely, we construct a class of graphs combining half-graphs and paths of slightly more than constant length, and prove that it has unbounded twin-width, but bounded merge-width [10]. The latter implies FPT model checking and monadic dependence. The class differs significantly from the class of all subcubic graphs used as non-delineation example in [1]: any monadically stable (i.e. that does not transduce all finite linear orders) subclass of has bounded twin-width. This is a concrete counter-example to [1, Conjecture 6.6]. Another non-explicit counter-example to this conjecture was given in [6, Corollary 20.10].
Let denote the set of permutations of . Given a length , define as follows (see Figure 6). Create vertices for , with edges and for all , thus forming two disjoint half-graphs. Then, connect to by a path of length . For a function , we define the class of graphs .
When grows slowly, we show that has unbounded twin-width by transducing -subdivisions of cliques of size , known to have unbounded twin-width [2, Theorem 6.2].
Fact 27 ().
For a positive function, has unbounded twin-width.
On the other hand, when tends to infinity, the class has bounded merge-width (see full version for the definition and proof). More generally, we prove the following.
Lemma 28 ().
Let be a class with bounded merge-width, and tending to infinity. Call the class of graphs constructed as follows: take , pick any number of pairs of vertices , and for each add a new path of length more than from to , with fresh internal vertices. Then has bounded merge-width.
Fact 29.
For any function that tends to infinity, the class has bounded merge-width.
Proof.
Half-graphs (and disjoint unions thereof) have bounded clique-width, which implies bounded merge-width by [10, Theorem 7.1]. Then, is obtained from half-graphs by the process described in Lemma 28, hence has bounded merge-width.
Now pick for instance , and consider .
Corollary 30.
The class has unbounded twin-width, but it is monadically dependent, and FO model checking in is FPT.
Proof.
The class has unbounded twin-width by Fact 27, and bounded merge-width by Fact 29. The latter implies that is monadically dependent [10, Theorem 1.12], and has FPT model checking [10, Theorem 1.11].
The class (for any function with ) can be constructed as degenerate APUS, see Figure 7. Thus the “non-degenerate” assumption in Theorem 26 is necessary. Variants of the construction show that the other hypotheses are necessary too:
Theorem 31 ().
There are hereditary classes of intersection graphs that have unbounded twin-width but allow FPT FO model checking for the following objects:
-
1.
degenerate axis-parallel unit segments,
-
2.
axis-parallel segments in general position where segment lengths take only two values,
-
3.
axis-parallel segments in general position with lengths in for any ,
-
4.
unit segments in general position, even when segment slopes are restricted to “vertical”, “horizontal plus ”, and “horizontal minus ”.
Case 2 was already known from [1, Figure 8]; we give a different construction based on Figure 7. Finally, a variant of this construction can be used for terrain visibility graphs:
References
- [1] Édouard Bonnet, Dibyayan Chakraborty, Eun Jung Kim, Noleen Köhler, Raul Lopes, and Stéphan Thomassé. Twin-width VIII: Delineation and win-wins. In Holger Dell and Jesper Nederlof, editors, 17th International Symposium on Parameterized and Exact Computation (IPEC 2022), volume 249 of LIPIcs, pages 9:1–9:18, Dagstuhl, Germany, 2022. Schloss Dagstuhl. doi:10.4230/LIPIcs.IPEC.2022.9.
- [2] Édouard Bonnet, Colin Geniet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width II: small classes. Combinatorial Theory, 2(2), 2022. doi:10.5070/C62257876.
- [3] Édouard Bonnet, Ugo Giocanti, Patrice Ossona de Mendez, Pierre Simon, Stéphan Thomassé, and Szymon Toruńczyk. Twin-width IV: ordered graphs and matrices. J. ACM, 71(3), June 2024. doi:10.1145/3651151.
- [4] Édouard Bonnet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width I: Tractable FO model checking. J. ACM, 69(1):Art. 3, 46, 2022. doi:10.1145/3486655.
- [5] Flavia Bonomo-Braberman, Nick Brettell, Andrea Munaro, and Daniël Paulusma. Non-crossing -Graphs: A generalization of proper interval graphs admitting FPT algorithms. In Graph-theoretic concepts in computer science, volume 16124 of Lecture Notes in Comput. Sci., pages 121–134. Springer, Cham, [2026] ©2026. doi:10.1007/978-3-032-11835-6_9.
- [6] Samuel Braunfeld, Jaroslav Nešetřil, Patrice Ossona de Mendez, and Sebastian Siebertz. On first-order transductions of classes of graphs. Logical Methods in Computer Science, Volume 21, Issue 2, June 2025. doi:10.46298/lmcs-21(2:26)2025.
- [7] Derek G. Corneil, Hiryoung Kim, Sridhar Natarajan, Stephan Olariu, and Alan P. Sprague. Simple linear time recognition of unit interval graphs. Inform. Process. Lett., 55(2):99–104, 1995. doi:10.1016/0020-0190(95)00046-F.
- [8] Rodney G Downey, Michael R Fellows, and Udayan Taylor. The parameterized complexity of relational database queries and an improved characterization of W[1]. DMTCS, 96:194–213, 1996.
- [9] Jan Dreier, Nikolas Mählmann, and Szymon Toruńczyk. Flip-breakability: A combinatorial dichotomy for monadically dependent graph classes. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 1550–1560, New York, NY, USA, 2024. Association for Computing Machinery. doi:10.1145/3618260.3649739.
- [10] Jan Dreier and Szymon Toruńczyk. Merge-width and first-order model checking. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC ’25, pages 1944–1955, New York, NY, USA, 2025. Association for Computing Machinery. doi:10.1145/3717823.3718259.
- [11] Jakub Gajarský, Petr Hliněný, Jan Obdržálek, Daniel Lokshtanov, and M. S. Ramanujan. A new perspective on FO model checking of dense graph classes. ACM Trans. Comput. Logic, 21(4), 2020. doi:10.1145/3383206.
- [12] Colin Geniet and Stéphan Thomassé. First order logic and twin-width in tournaments and dense oriented graphs. European Journal of Combinatorics, 132:104247, 2026. doi:10.1016/j.ejc.2025.104247.
- [13] Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding first-order properties of nowhere dense graphs. J. ACM, 64(3):17:1–17:32, 2017. doi:10.1145/3051095.
- [14] Sylvain Guillemot and Daniel Marx. Finding small patterns in permutations in linear time. In Proceedings of the 2014 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 82–101, 2014. doi:10.1137/1.9781611973402.7.
- [15] Petr Hliněný and Filip Pokrývka. Twin-width and limits of tractability of FO model checking on geometric graphs, 2022. arXiv:2204.13742.
- [16] Irina Mustaţă and Martin Pergel. Unit grid intersection graphs: Recognition and properties, 2013. arXiv:1306.1855.
- [17] Detlef Seese. Linear time computable problems and first-order descriptions. Mathematical Structures in Computer Science, 6(6):505–526, 1996. doi:10.1017/S0960129500070079.
- [18] Alan Tucker. An efficient test for circular-arc graphs. SIAM Journal on Computing, 9(1):1–24, 1980. doi:10.1137/0209001.
