Abstract 1 Introduction 2 Preliminaries 3 Delineation of circular arc graphs 4 Delineation of axis-parallel unit segment graphs 5 Obstructions to delineation References

First-Order Logic and Twin-Width for Some Geometric Graphs

Colin Geniet ORCID Discrete Mathematics Group, Institute for Basic Science (IBS), Daejeon, South Korea    Gunwoo Kim ORCID School of Computing, KAIST, Daejeon, South Korea
Discrete Mathematics Group, Institute for Basic Science (IBS), Daejeon, South Korea
   Lucas Meijer ORCID Department of Information and Computing Sciences, Utrecht University, The Netherlands
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 H-graphs when H 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, FPT
Funding:
Colin Geniet: Supported by the Institute for Basic Science (IBS-R029-C1).
Gunwoo Kim: Supported by the Institute for Basic Science (IBS-R029-C1) and the National Research Foundation, Korea (RS-2025-00563533).
Lucas Meijer: Supported by the Netherlands Organisation for Scientific Research (NWO) under project no. VI.Vidi.213.150.
Copyright and License:
[Uncaptioned image] © Colin Geniet, Gunwoo Kim, and Lucas Meijer; licensed under Creative Commons License CC-BY 4.0
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 theory
Related Version:
Full Version: https://arxiv.org/pdf/2512.21896
Acknowledgements:
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 Nayyeri

1 Introduction

The first-order model checking problem asks, given a graph G and a first-order (FO) formula ϕ, to test whether G satisfies ϕ. In general this is a difficult problem, known to be 𝖠𝖶[]-hard [8], and subsuming problems such as finding in G 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 f(|ϕ|)|G|O(1) for some (computable) function f.

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], H-graphs for any fixed forest H [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. 1.

    𝒞 is a hereditary subclass of intersection graphs of circular arcs, or

  2. 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 x-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 n vertices, plus 2n 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 G𝒞, witnessing that G 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 M, one can efficiently find either a contraction sequence for M (witnessing small twin-width), or a grid. Given the geometric representation of the graph G, we construct some auxiliary matrix MG. For instance, for circular arc graphs, we identify the circle with {1,,n} modulo n, and the matrix M has a 1 at position (i,j) whenever there is an arc clockwise from i to j. We then prove two facts:

  • First, G can be reconstructed from MG by a sequence of operations that preserve twin-width. Thus if MG has bounded twin-width, then so does G. This is efficient: a contraction sequence for G can quickly be computed from one for MG.

  • Second, if MG contains a sufficiently large grid, then G 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 {MG:G𝒞}, 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 n, we denote by [n] the interval of integers {1,,n}.

2.1 Graphs and relational structures

For a graph G=(V,E), we write V(G)=V and E(G)=E for its vertex and edge sets. The set of neighbours of vV(G) is N(v). Vertices x,y are twins if N(u){v}=N(v){u} (xy may or not be an edge). For XV, G[X] is the subgraph induced by X. When < is a linear ordering of V(G), we denote by 𝖠𝖽𝗃(G,<) the adjacency matrix with rows and columns ordered by <. Similarly, if <V and <E are orderings of V and E, then 𝖨𝗇𝖼(G,<V,<E) is the incidence matrix with rows and columns ordered by <V and <E.

More generally, a binary relational structure (or simply binary structure) (V,E1,,E) consists of a vertex set V, and relations EiV2. 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 V, one defines the adjacency matrix of each relation Ei, denoted by 𝖠𝖽𝗃(Ei,<). 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 (V,E1,,E,<). A special case is ordered graphs (V,E,<), where (V,E) is a graph and < a linear ordering of V.

2.2 Grids

The following notion of grids comes from [14]. Given a point p2, we write πx(p),πy(p) for its x- and y-coordinates. A t-grid in the plane is a family of points (pi,j)i,j[t] satisfying the following for any i,i,j,j[t]:

if i<i, then πx(pi,j)<πx(pi,j)andif j<j, then πy(pi,j)<πy(pi,j).

Observe that there are intervals X1<<Xt and Y1<<Yt of such that pi,jXi×Yj: take Xi to be the smallest interval containing πx(pi,j) for all i, and similarly with Yj.

This extends to 0–1 matrices, interpreting a one at position (i,j) in the matrix M as a point with coordinates (i,j). We say that M contains a t-grid if the point set defined by the ones in M contains a t-grid in the previous sense. Then there are partitions into intervals ={X1<<Xt} and 𝒞={Y1<<Yt} of the rows and columns as above. The ordering of rows and columns is crucial, which is why we make it explicit in 𝖠𝖽𝗃(G,<).

The Ramsey property for grids easily follows from the Ramsey theorem on bicliques:

Lemma 4 (Ramsey theorem for grids, ).

There is a function R(t,k) such that if 𝒫 is a point set containing an R(t,k)-grid, and λ:𝒫[k] is any colouring, then 𝒫 contains a t-grid consisting only of points of colour c for some c[k].

When the x- and y-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 2t-grid 𝒫 contains a t-subgrid 𝒫𝒫 such that the sets Xπx(𝒫) and Yπy(𝒫) of x- and y-coordinates satisfy either X<Y or Y<X.

The following technical lemma relates grids in incidence and adjacency matrices.

Lemma 6 ().

Let EV2 be a binary relation such that 𝖠𝖽𝗃(E,<V) has no k-grid. Let <𝗅𝖾𝗑 be the lexicographic ordering of E, i.e. (x,y)<𝗅𝖾𝗑(x,y) if either x<Vx, or x=x and y<Vy. Then 𝖨𝗇𝖼(E,<V,<𝗅𝖾𝗑) has no 4k-grid.

2.3 Twin-width

Twin-width [4] is defined by contraction sequences: a contraction sequence of width k is a witness that the twin-width 𝗍𝗐𝗐(G) is at most k. 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 𝗍𝗐𝗐(G) is well-defined when G 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 x,y are twins in G, then 𝗍𝗐𝗐(G)=𝗍𝗐𝗐(Gy).

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 f,g and an algorithm which, given (V,E,<) an ordered graph whose matrix 𝖠𝖽𝗃(E,<) has no k-grid, computes a contraction sequence witnessing that 𝗍𝗐𝗐(V,E,<)f(k) in time g(k)|V|O(1).

Ordered graphs of high twin-width have a Ramsey-like property:

Theorem 9 ([3]).

There is a function R(k,) such that if (V,E,<) is an ordered graph with E=E1E, and 𝗍𝗐𝗐(V,Ei,<)k for all i, then 𝗍𝗐𝗐(V,E,<)R(k,).

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 G=(V,E,<) be an ordered graph, with V partitioned into intervals A1<<Am<B1<<Bm, such that each edge is between Ai and Bi for some i[m], and the subgraphs (AiBi,E,<) have twin-width at most k for all i. Then 𝗍𝗐𝗐(G)2k+2.

2.4 First-order logic

A relational signature is a set Σ of relation symbols RΣ, each with an arity r. In this work, we will only use unary and binary symbols, i.e. with arity 1 or 2. A Σ-structure S consists of a vertex set V(S), and an interpretation of each symbol RΣ as a relation R(S)(V(S))r of appropriate arity. Thus a unary symbol U is interpreted as a vertex subset, and a binary symbol as a set of directed edges with loops. For instance, graphs are {E}-structures, and ordered graphs are {E,<}-structures (with E,< binary symbols).

FO formulas ϕ over a signature Σ consist of quantifiers over vertices x,ϕ, x,ϕ, boolean operators ,,¬, and predicates R(x1,,xr) testing whether (x1,,xr) is a tuple in the interpretation of R, as well as the equality predicate x=y. For example,

ϕ(x,y)=(x=y)E(x,y)z.(E(x,z)E(z,y))

is a formula over the signature {E} (for graphs) expressing that x,y 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 ϕ(x1,,xr) is a formula over Σ, S is a Σ-structure, and v1,,vrV(S) are vertices, then Sϕ(v1,,vr) denotes that ϕ is satisfied by S, with the variables x1,,xr interpreted as v1,,vr respectively.

The FPT model checking algorithm for twin-width shows the following.

Theorem 11 ([4, Theorem 1]).

Given a graph G, a contraction sequence of width k for G, and a sentence ϕ, one can test whether Gϕ in time f(k,|ϕ|)|V(G)|.

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. 1.

    for each symbol RΓ of arity r, an FO formula ϕR(x1,,xr) over Σ, and

  2. 2.

    one last FO formula ϕV(x) again over Σ.

Given a Σ-structure S, its image Φ(S) is the relational structure where the vertex set is restricted to vertices satisfying ϕV, i.e.

V(Φ(S))={xV(S):SϕV(x)},

and for each symbol RΓ, the relation set R(Φ(S)) is described by ϕR, i.e.

R(Φ(S))={(x1,,xk)(V(Φ(S)))r:SϕR(x1,,xr)}.

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 U1,,Uk be k unary symbols, disjoint from Σ. The k-colouring is the one-to-many operation which maps a Σ-structure S to all possible extensions of S as (Σ{U1,,Uk})-structures S+, meaning that V(S)=V(S+) and R(S)=R(S+) for any RΣ, while the Ui(S+) are chosen as arbitrary subsets of V(S+). An FO transduction is the composition of a k-colouring (for fixed k), 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 f such that for any binary structure S and TΦ(S), 𝗍𝗐𝗐(T)f(𝗍𝗐𝗐(S)).

Furthermore, given a contraction sequence of width k for S, and the colouring of S used to obtain T through Φ, one can compute in time g(k)|S|O(1) a contraction sequence of width f(k) for T for some function g 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 Tk consists of three sets A={ai:i[k]}, B={bi,j:i,j[k]} and C={cj:j[k]} with edges aibi,j if and only if ii, and bi,jcj if and only if jj (see Figure 1). Edges within A,B,C or between A and C are unconstrained.

Figure 1: A transversal pair T3.
Lemma 16 ().

Let 𝒞 be a graph class such that for any k, some G𝒞 contains a transversal pair Tk. Then 𝒞 is monadically independent.

2.5 Geometric graphs

Given a set family , the intersection graph G is defined with as its vertex set, and an edge between A,B if and only if AB. The family is a representation of G.

Circular arc graphs.

A circular arc graph is an intersection graph of arcs around a circle. We work with discrete representations in [n]{1,,n} modulo n: a (discrete) circular arc is an interval [i,j] modulo n; explicitly, [i,j]{k:ikj} when ij, and [i,j]{k:ki or kj} when i>j. Any circular arc representation of G can be turned into a discrete circular arcs representation as above for n=2|V(G)|, in time polynomial in the size of the encoding of . We often identify the vertices of G with the arcs of . When I=[i,j] is an arc, 𝗅𝖾𝖿𝗍(I)i and 𝗋𝗂𝗀𝗁𝗍(I)j denote its endpoints.

Theorem 17 ([18]).

Given a graph G, one can compute a circular arc representation of G 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 𝖧𝗈𝗋(x,y) the horizontal segment from (x,y) to (x+1,y), and by 𝖵𝖾𝗋(x,y) the vertical one from (x,y) to (x,y+1). An APUS graph is the intersection graph of a family of APUS. We again work with discrete representations: Any APUS graph G has a representation using coordinates that are non-negative multiples of η()=1||. 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 G being the intersection graph of an arbitrary family of APUS, ignoring intersections between horizontal (vertical) segments (i.e. G 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 [n], we define its endpoint matrix M, where rows and columns are [n], and there is a 1 at position (i,j) if and only if [i,j].

Lemma 18.

There are functions f,g such that if M has no k-grid, then one can compute a contraction sequence witnessing that 𝗍𝗐𝗐(G)f(k) in FPT time g(k)||O(1).

Proof.

In a first time, let us assume that does not contain multiple identical circular arcs.

We identify intervals [x,y] with pairs (x,y), so that describes a binary relation on [n]. Its adjacency matrix 𝖠𝖽𝗃(,<) with the natural ordering of [n] is exactly M. It has no k-grid, hence by Lemma 6, the incidence matrix 𝖨𝗇𝖼(,<,<𝗅𝖾𝗑) has no 4k-grid, where <𝗅𝖾𝗑 is the lexicographic ordering of [n]2.

Construct the following ordered graph H=(V,E,<V). The vertex set is V[n], ordered with [n] before , with the natural ordering inside [n], and the lexicographic ordering inside . In E, each interval [x,y] is connected to its two endpoints. Thus 𝖠𝖽𝗃(H,<V) consists of 𝖨𝗇𝖼(,<,<𝗅𝖾𝗑) and its transpose arranged as diagonal blocks. Since 𝖨𝗇𝖼(,<,<𝗅𝖾𝗑) has no 4k-grid, one may check that this implies that 𝖠𝖽𝗃(H,<V) has no (4k+1)-grid. Using Corollary 8, one can compute in FPT time a contraction sequence of bounded width for H.

To conclude using Theorem 13, we build an FO transduction Φ such that GΦ(H):

  1. 1.

    Firstly, add colours to V to distinguish [n] and , and also to indicate for each interval [x,y] whether or not xy (this is 3 colours in total).

  2. 2.

    Using these colours, we can write a formula ϕ(v,e) testing if v[n] belongs to the interval e. Indeed, let x,y[n] be the neighbours of e, with x<y. Then the interval e is either [x,y] or [y,x], indicated by the colour given to e at step 1. It suffices for ϕ(v,e) to check that xvy in the first case, and that vyxv in the second.

    As an extreme case, one could have e=[x,x], which is adjacent to x only. Then x is the only point contained in e. All of the above is easily expressed by a first-order formula.

  3. 3.

    Now, one can test if e,f intersect with the formula ψ(e,f)=v.ϕ(e,v)ϕ(f,v).

  4. 4.

    Finally, vertices of [n] are deleted, keeping only and the edges defined by ψ.

This is a transduction which, for the choice of colours specified at step 1, yields G from H. By Theorem 13, we obtain a contraction sequence for G from the one for H in 𝖥𝖯𝖳 time.

It remains to consider the case where has multiple identical arcs. Let be with these duplicates removed. Then M=M, and G is G with some twins removed, hence by Lemma 7 𝗍𝗐𝗐(G)=𝗍𝗐𝗐(G). We conclude using the results for .

Say a circular arc representation is minimized if its circular arcs are inclusion-wise minimal while representing G, i.e. for any I, removing either endpoint of I would cause it to no longer intersect some other arc I. 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 I=[i,j] with ij, then there exist IL,IR such that IIL={i} and IIR={j}.

Proof.

If I violates the condition, then it can be shortened by deleting either i or j.

Lemma 20.

Let k be a positive integer. Consider a minimized circular arc representation of a graph G. If M contains a (4k+2)-grid, then G contains a transversal pair Tk.

Proof.

Consider a (4k+2)-grid in M. It consists of intervals Ii,j with 𝗅𝖾𝖿𝗍(Ii,j)<𝗅𝖾𝖿𝗍(Ii,j) whenever i<i, and 𝗋𝗂𝗀𝗁𝗍(Ii,j)<𝗋𝗂𝗀𝗁𝗍(Ii,j) whenever j<j. By Lemma 5, a (2k+1)-grid can be extracted so that the x- and y-coordinates belong to disjoint intervals. Thus we assume that i,j[2k+1], and that 𝗅𝖾𝖿𝗍(Ii,j)<𝗋𝗂𝗀𝗁𝗍(Ii,j) for all i,i,j,j, the case 𝗅𝖾𝖿𝗍(Ii,j)>𝗋𝗂𝗀𝗁𝗍(Ii,j) being similar.333This does not reduce the problem to an interval graph, as we will still use arcs other than the Ii,js.

Figure 2: A circular arc representation of a transversal pair T3 with the tripartition (A,B,C). Magenta circular arcs represent vertices in A, cyan circular arcs in B, and teal circular arcs in C.

Let us start constructing the transversal pair Tk. Its central vertices bi,jI2i,2j are obtained by picking every other row and column of the grid. For the left vertices ai, we first extract auxiliary intervals xiI2i+1,2k+1 for i[k]. We claim that for all i,i,j[k]

if ii, then 𝗅𝖾𝖿𝗍(xi)bi,j, and (1)
if i<i, then bi,jxi{𝗅𝖾𝖿𝗍(xi)}. (2)

Indeed, if ii, then 2i+1>2i, which gives

𝗅𝖾𝖿𝗍(bi,j)=𝗅𝖾𝖿𝗍(I2i,2j)<𝗅𝖾𝖿𝗍(I2i+1,2k+1)=𝗅𝖾𝖿𝗍(xi). (3)

In addition, since all left endpoints are smaller than all right endpoints for intervals of the grid, we also have 𝗅𝖾𝖿𝗍(xi)<𝗋𝗂𝗀𝗁𝗍(bi,j). Thus bi,j contains 𝗅𝖾𝖿𝗍(xi), proving (1). On the other hand, if i<i, then we have 2i+1<2i and 2j<2k+1, which gives

bi,j=I2i,2jI2i+1,2k+1=xi, (4)

the inclusion being strict at both endpoints, which implies (2).

Using the minimality of and Lemma 19, there is an interval ai such that xiai={𝗅𝖾𝖿𝗍(xi)}. It follows from 1 and 2 that ai and bi,j intersect if and only if ii. Symmetrically, we define yj=I1,2j1, use Lemma 19 to find cj such that yjcj={𝗋𝗂𝗀𝗁𝗍(yj)}, and obtain that cj and bi,j intersect if and only if jj. Up to reversing the order of indices, the former description of ai,bi,j,cj gives a transversal pair.

Our main theorem for circular arc graphs directly follows from Lemmas 18 and 20.

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 G𝒞, call G the circular arc representation computed by Theorem 17, after minimizing it. Consider the endpoint matrices ={MG:G𝒞}. If matrices in have no k-grid for some k, then by Lemma 18 contraction sequences of width f(k) 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 M to a family of APUS. The columns (resp. rows) are the x- (y-) coordinates of all endpoints of segments in M, and the entry at position (x,y) is 1 if and only if 𝖧𝗈𝗋(x,y) or 𝖵𝖾𝗋(x,y). A variant of Lemma 18 shows that when M has no k-grid, then G has bounded twin-width. However, the converse fails: even with appropriate minimality conditions on , a grid in M does not imply that G 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

Figure 3: An instance being split along unit squares (drawn in gray). The cyan segments are the set s1,t, while the magenta segments are the set 𝒱s,t. Together, they form s,t,.

In an APUS family , for s,t, denote by s,t the subset of segments 𝖧𝗈𝗋(x,y) where x[s,s+1) and y[t,t+1), and define 𝒱s,t similarly for vertical segments. Clearly the sets s,t,𝒱s,t for s,t partition . Also, observe that segments in s,t and 𝒱s,t can intersect only if s{s,s+1} and t{t1,t}. Let s,t, denote the set s,t𝒱s,t, and Es,t, the edges of G contained in s,t, that come from segments intersecting in the unit square [s,s+1)×[t,t+1), for segments coming from the right and top sides of this square (hence in the notation). Similarly, define s,t,=s1,t𝒱s,t, s,t,=s,t𝒱s,t1, and s,t,=s1,t𝒱s,t1, as well as Es,t,,Es,t,,Es,t, the corresponding edge sets. The sets Es,t,d for s,t and d{,,,} partition the edge set of G. We work on each Es,t,d independently with the techniques of Section 3, and show that when all have bounded twin-width, then so does G. 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. 𝖧𝗈𝗋(x,y)<𝗅𝖾𝗑𝖧𝗈𝗋(x,y) if and only if x<x, or x=x and y<y, and similarly for vertical segments. However this works poorly with twin-width: consider a family of segments ={h1,,hn,v1,,vn} such that hi,vi intersect close to (0,2i). In particular, hi,vj do not intersect for ij. By slightly tweaking their x-coordinates, any permutation of v1,,vn can be realised as the lexicographic ordering <𝗅𝖾𝗑. Thus even for these very simple segment families, the ordered intersection graph (,E,<𝗅𝖾𝗑) 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 s,t lexicographically by (s,t), and then inside each s,t order the segments 𝖧𝗈𝗋(x,y) 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 s,t or 𝒱s,t is an interval.

For an APUS family with intersection graph G, denote by G𝗌𝖾𝗀(,E,<𝗌𝖾𝗀) the same intersection graph ordered by <𝗌𝖾𝗀. Further, for s,t and d{,,,}, let Gs,t,d𝗌𝖾𝗀=(s,t,d,Es,t,d,<𝗌𝖾𝗀) be the restriction to s,t,d.

Lemma 22.

If 𝗍𝗐𝗐(Gs,t,d𝗌𝖾𝗀)k for all s,t,d, then 𝗍𝗐𝗐(G𝗌𝖾𝗀)f(k) for some function f.

Proof.

Group the edge sets Es,t,d into 4 classes according to the direction d, i.e. define ds,tEs,t,d. The sets d for d{,,,} are a partition of the edges, hence by Theorem 9, it suffices to prove that each (,d,<𝗌𝖾𝗀) has bounded twin-width.

We consider ; the other cases are similar. In , vertices of s,t are only adjacent to those of 𝒱s,t. Also, each s,t and 𝒱s,t is an interval of <𝗌𝖾𝗀. The intervals s,t are ordered lexicographically by (s,t) between themselves, and the corresponding lexicographic ordering is used for the 𝒱s,t. Finally, all s,t come before all 𝒱s,t. This fits all the requirements of Lemma 10, proving that (,d,<𝗌𝖾𝗀) has twin-width at most 2k+2.

4.2 APUS graphs within a unit square

Let us now focus on each Gs,t,d𝗌𝖾𝗀, to find either bounded twin-width or a transversal pair.

Here, it must be mentioned that the graph Gs,t,d𝗌𝖾𝗀 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 Ms,t,d has a large grid, we may also need segments outside s,t,d.

Figure 4: Constructing G0,0, as the complement of a circular arc graph: map the segment 𝖧𝗈𝗋(x,y) to the arc (1+y,x), and 𝖵𝖾𝗋(x,y) to (x,1+y) (where the arcs are in [0,2) modulo 2).

We first show that if Ms,t,d has no k-grid, its intersection graph has bounded twin-width. By symmetry, it is enough to prove the result for 0,0,. 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 𝖧𝗈𝗋(x,y) or 𝖵𝖾𝗋(x,y) with x,y[0,1). If the matrix M has no k-grid, then 𝗍𝗐𝗐(G𝗌𝖾𝗀)f(k) for some function f.

We now show that when Ms,t,d does contain a grid, then G 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 η()>0. 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 ϕ(s) are coordinate-wise no larger than that of s.

Lemma 24.

In a minimized APUS family , for any horizontal 𝖧𝗈𝗋(x,y), there are:

  1. 1.

    a vertical segment 𝖵𝖾𝗋(xη,y) or 𝖵𝖾𝗋(x+1,y) with yyy+1, unless x=0, and

  2. 2.

    a vertical segment 𝖵𝖾𝗋(x,y1η) or 𝖵𝖾𝗋(x,y) with xxx+1, unless y=0,

and similarly when flipping the roles of vertical and horizontal, and of x- and y-coordinates.

Proof.

If that is not the case, 𝖧𝗈𝗋(x,y) 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 s,t,d for some s,t and d{,,,}. There is a function f: such that if Ms,t,d has an f(k)-grid, then G contains a transversal pair Tk.

Proof sketch.

Consider an f(k)-grid 𝒫 (for f to be determined) in Ms,t,d, consisting of points (pi,j)i,j[f(k)] as described in Section 2.2. For each i,j[f(k)], contains a horizontal segment with pi,j as left endpoint or a vertical segment with pi,j as bottom endpoint.

Using Ramsey’s theorem (Lemma 4), when f(k) is chosen large enough, we can find a 2k-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 (hi,j)i,j[2k]; 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).

Figure 5: Transversal pair T4 as APUS graph. The magenta lines are part of an 8-grid. Some of them (solid lines) are picked as B. The others (dotted) are used to define A,C: the cyan (resp. teal) lines forming A (resp. C) ensure horizontal (resp. vertical) minimality of said dotted lines.

The construction of the transversal pair Tk is now similar to Lemma 20. Pick every other segment of 𝒫 for the central vertices, i.e. define bi,j=h2i1,2j1. Now consider one of the topmost segments h2i,2k, and let ai be the vertical segment that forbids moving h2i,2k left, which is assumed to intersect the bottom boundary of the square. Then ai and bi,j intersect if and only if ii. Similarly, we pick cj to be the vertical segment blocking h2k,2j from moving down. Up to reversing some indices, this yields a transversal pair of order k.

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 𝔖m denote the set of permutations of [m]. Given σ𝔖m a length >0, define Hσ as follows (see Figure 6). Create vertices ai,bi,ci,di for i[m], with edges aibj and cidj for all ij, thus forming two disjoint half-graphs. Then, connect bi to cσ(i) by a path of length . For a function f:, we define the class of graphs f{Hσf(m):m,σ𝔖m}.

Figure 6: The graph Hσ5 for the permutation σ=147258369.

When f grows slowly, we show that f has unbounded twin-width by transducing f(m)-subdivisions of cliques of size m, known to have unbounded twin-width [2, Theorem 6.2].

Fact 27 ().

For f(m)=o(logm) a positive function, f has unbounded twin-width.

On the other hand, when f tends to infinity, the class f 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 f: tending to infinity. Call 𝒞 the class of graphs constructed as follows: take G𝒞, pick any number of pairs of vertices (x1,y1),,(xt,yt), and for each add a new path of length more than f(|V(G)|) from xi to yi, with fresh internal vertices. Then 𝒞 has bounded merge-width.

Fact 29.

For any function f that tends to infinity, the class f 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, f is obtained from half-graphs by the process described in Lemma 28, hence has bounded merge-width.

Now pick for instance f(m)loglogm, and consider f.

Corollary 30.

The class f has unbounded twin-width, but it is monadically dependent, and FO model checking in f 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].

Figure 7: A degenerate APUS whose intersection graph is Hσ5 for σ=147258369.

The class f (for any function f with f(m)3) 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. 1.

    degenerate axis-parallel unit segments,

  2. 2.

    axis-parallel segments in general position where segment lengths take only two values,

  3. 3.

    axis-parallel segments in general position with lengths in [1,1+ϵ] for any ϵ>0,

  4. 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:

Figure 8: Construction of non-delineated terrain visibility graphs. Dotted lines represent the “horizon” for each bi, which can be controlled by moving bi up or down. This allows the half-graph between the bis and cjs to represent any permutation of the bis, here 369258147.

See 2 The proof uses one-sided variants of the graphs Hσ, consisting of a long path a1,,an, vertices b1,,bm spaced evenly along this path, and a half-graph between b1,,bm and some c1,,cm, such that the ordering of b1,,bm from the half-graph can be permuted arbitrarily relative to the path ordering, see Figure 8.

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 h-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.