Twin-width IV: ordered graphs and matrices
?douard Bonnet, Ugo Giocanti, Patrice Ossona de Mendez, Stéphan Thomassé
TTWIN-WIDTH IV: LOW COMPLEXITY MATRICES
ÉDOUARD BONNET, UGO GIOCANTI, PATRICE OSSONA DE MENDEZ,AND STÉPHAN THOMASSÉ
Abstract.
We establish a list of characterizations of bounded twin-width for hereditary, totally ordered binary structures. This has sev-eral consequences. First, it allows us to show that a (hereditary) classof matrices on a finite alphabet either contains at least n ! matrices ofsize n × n , or at most c n for some constant c . This generalizes thecelebrated Stanley-Wilf conjecture/Marcus-Tardos theorem from per-mutation classes to any matrix class on a finite alphabet, answers oursmall conjecture [SODA ’21] in the case of ordered graphs, and withmore work, settles a question first asked by Balogh, Bollobás, and Mor-ris [Eur. J. Comb. ’06] on the growth of hereditary classes of orderedgraphs. Second, it gives a fixed-parameter approximation algorithmfor twin-width on ordered graphs. Third, it yields a full classificationof fixed-parameter tractable first-order model checking on hereditaryclasses of ordered binary structures. Fourth, it provides an alterna-tive proof to a model-theoretic characterization of classes with boundedtwin-width announced by Simon and Toruńczyk. Introduction
Matrices constitute a very common representation of a set of numbers,from linear algebra and graph theory to computer graphics and econom-ics. Matrices can be considered in three different ways, that we will callunordered, symmetrically-reorderable, and ordered, where the row and col-umn orders are increasingly critical.In linear algebra, when representing linear transformations from a vectorspace F n to another vector space F m , the order of the rows and columnsis usually irrelevant, the matrix being defined up to a change of basis inthe domain and the image vector spaces. Similarly when solving linearequations and inequalities, the exact order of the constraints and the namingof the variables, subject to row and column permutations, obviously do notchange the set of solutions. The rank is a central complexity measure inthat context.It may happen instead that only the order of the basis can be changed,as it is the case when a matrix encodes an endomorphism, the adjacencyrelation of a graph or a relational structure, or is the table of a binaryoperation in an algebraic structure. It is then legitimate to require that therow and the column orderings are chosen consistently, so that the diagonalcorresponds to pairs of the same element.Finally, in some other contexts, the order of the rows and columns shouldnot be touched, for example to get a well-defined matrix multiplication,because the considered basis comes with a natural total order (e.g., thebasis ( X k ) k ∈ N of polynomials), because the matrix encodes some geometric a r X i v : . [ m a t h . C O ] F e b É. BONNET, U. GIOCANTI, P. OSSONA DE MENDEZ, AND S. THOMASSÉ object (e.g., in image representation), or because one is interested in theexistence of patterns (e.g., the study of pattern-avoiding permutations).Twin-width is a recently introduced invariant that measures how well abinary structure may be approximated by iterated lexicographic products(or replications) of basic pieces [6, 5]. In the first paper of the series [6],twin-width was defined on graphs and extended to the first two “kinds”of matrices. On unordered (possibly rectangular) matrices, it matches thetwin-width of bipartite graphs where two unary relations fix the two sidesof the bipartition. On symmetrically-reorderable square matrices, this cor-responds to the twin-width of directed graphs (or undirected graphs, if thematrix is itself symmetric). The starting point of the current paper is tobring twin-width to ordered matrices. Equivalently we consider bipartitegraphs where both sides of the bipartition is totally ordered, or orderedgraphs (in the symmetric setting).A second important aspect is the definition of the set (or structure) towhich the entries belong. It can be a field F (linear algebra), a set (relationalstructures), or an index set, when rows, columns, and entries refer to thesame indexed set (algebraic structures). Here it will be convenient to con-sider that the entries belong to a finite field (as it allows to define a notionof rank), and the presentation will focus on the special case when F = F .Even though we consider this special case, and a related representation bymeans of graphs, the results readily extend to general finite fields (or finitesets).We now give a bit of vocabulary so that we can state, at least informally,our results. Some concepts, mainly twin-width and first-order transductions,are lengthier to explain and we will therefore postpone their definitions tothe next section.A matrix M will be indexed by two totally ordered sets, say, I R and I C . Throughout the paper, we often observe a correspondence between0 , M = ( m i,j ) i,j and ordered bipartite graphs ( I R , I C , E ), where i ∈ I R is adjacent to j ∈ I C whenever m i,j = 1. (If entries can takemore than two values, we may either consider a binary relational structure( I R , I C , E , . . . , E s ) or an edge coloring of ( I R , I C , E ).) An F -matrix has allits entries in F , and M all denotes the set of all F -matrices. Many notionsrelated to twin-width (such as grid and mixed minor [6], and in the currentpaper, grid rank and rich division ) involve divisions of matrices. A division D of M is a pair ( D R , D C ) of partitions of I R and I C into intervals. A divisioninduces a representation of M as a block matrix M = ( B i,j ) (cid:54) i (cid:54) |D R | , (cid:54) j (cid:54) |D C | ,where the blocks B i,j are referred to as the zones or cells of the division.A k -division is a division D such that |D R | = |D C | = k . A k -division inwhich every zone has rank at least k is called a rank- k division . The growth (or speed ) of a class of matrices M is the function n
7→ |M n | which counts We postpone the exact definition of twin-width to the next section. Admittedly, twin-width was already defined for binary structures in general (so forordered matrices in particular), but we will see how a total order relation drastically helpsour understanding of bounded twin-width classes. Henceforth, ordered matrices will simply be called matrices . WIN-WIDTH IV: LOW COMPLEXITY MATRICES 3 the number of n × n matrices of M . We may call M n the n -slice of class M .An upper bound in twin-width, by say d , is given by so-called d -sequences ,iteratively identifying elements not differing too much on the relations ofthe binary structure. A first-order ( FO ) transduction of a class M is anyclass M that can be built by non-deterministically augmenting M with aconstant number of unary relations and reinterpreting the relations of M with first-order formulas involving these new unary relations and the oldrelations of M . An FO -interpretation is a transduction that does not useany extra unary relation. FO matrix model checking, or equivalently, FO -model checking for totally ordered binary structures, consists of determiningif a given sentence is satisfied in a given binary structure, a binary relationof which being interpreted as a total order. These concepts will be properlydefined in due time.We show the following list of equivalences. Theorem 1.1 (informal) . Given a class M of matrices, the following areequivalent: ( i ) M has bounded twin-width. ( ii ) (linear algebra) No matrix of M has a rank- k division, for some k . ( iii ) (Ramsey theory) M does not include any of a list of families, all n -slices of which injectively map to the set of all n -permutations. ( iv ) (model theory) M all is not a first-order interpretation of M . ( v ) (model theory) M all is not a first-order transduction of M . ( vi ) (enumerative combinatorics) M has growth smaller than n ! . ( vii ) (enumerative combinatorics) M has growth O ( n ) . ( viii ) (computational complexity) FO matrix model checking is polynomial-time solvable for matrices restricted to M and sentences of constantsize. As a consequence or by-product of Theorem 1.1, we settle a handful ofquestions in combinatorics and algorithmic graph theory. The main by-product is an approximation algorithm for twin-width in totally orderedbinary structures.
Theorem 1.2.
There is a fixed-parameter algorithm that, given a totallyordered binary structure of twin-width k , outputs a O ( k ) -sequence. We now detail the consequences of Theorem 1.1.1.1.
Speed gap on hereditary classes of ordered graphs.
About fif-teen years ago, Balogh, Bollobás, and Morris [3, 2] analyzed the growth ofordered structures, and more specifically, ordered graphs. They conjectured[3, Conjecture 2] that a hereditary class of (totally) ordered graphs has, up toisomorphism, either at most O (1) n n -vertex members or at least n n/ o ( n ) ,and proved it for weakly sparse graph classes, that is, without arbitrarilylarge bicliques (as subgraphs). In a concurrent work, Klazar [25] repeatedthat question, and more recently, Gunby and Pálvölgyi [21] observe that The fact that this item implies the previous items is only conditional on the widelybelieved complexity-theoretic assumption
FPT = AW [ ∗ ]. É. BONNET, U. GIOCANTI, P. OSSONA DE MENDEZ, AND S. THOMASSÉ the first superexponential jump in the growth of hereditary ordered graphclasses is still open.The implication Item vi ⇒ Item vii of Theorem 1.1 settles that one-and-a-half-decade-old question. Let C be any hereditary ordered graph class withgrowth larger than c n , for every c . We define the matrix class M as all thesubmatrices of the adjacency matrices of the graphs in C along the totalorder. We observe that for every c , there is an n such that |M n | > c n . Thisis because every (full) adjacency matrix of a distinct (up to isomorphism)ordered graph of C counts for a distinct matrix of M . Indeed, the onlyautomorphism of an ordered graph is the identity, due to the total order.Thus, by Theorem 1.1, M has growth at least n !, asymptotically. Recallthat the growth of a matrix class only accounts for its square matrices.We now exhibit a mapping from M n to S n (cid:54) i (cid:54) n C i , where every elementin the image has relatively few preimages. Let M be in M n , and let G M bea smallest graph of C responsible for the membership M ∈ M . The rows of M are then indexed by A ⊆ V ( G M ), and its columns, by B ⊆ V ( G M ), with V ( G M ) = A ∪ B , and A ∩ B potentially non-empty. G M is a graph on atleast n vertices, and at most 2 n . Let Adj( G M ) be its adjacency matrix whererows and columns are ordered by the total order on its vertex set. Adj( G M )contains at most (cid:0) nn (cid:1) · (cid:0) nn (cid:1) (cid:54) n submatrices in M n . Therefore the samegraph G M can occur for at most 16 n matrices of M n . So | S n (cid:54) i (cid:54) n C i | (cid:62) n !16 n ,and |C n | (cid:62) n ! · (4 n n ) − = n n/ o ( n ) .We will actually show the sharper bound |C n | (cid:62) P b n/ c k =0 (cid:0) n k (cid:1) k !, as conjec-tured by Balogh et al.1.2. Approximation of the twin-width of matrices.
In the first andthird paper of the series [6, 4], efficient algorithms are presented on graphclasses of bounded twin-width. However these algorithms require a wit-ness of bounded twin-width called d -sequences (see Section 2 for a defi-nition). If the first two papers [6, 5] show how to find in polynomial time O (1)-sequences for a variety of bounded twin-width classes, including properminor-closed classes, bounded rank-width classes, posets of bounded width,and long subdivisions, such an algorithm is still missing in the general caseof all the graphs with twin-width at most a given threshold. As a by-productof Theorem 1.1, we obtain in Section 3 the desired missing link for orderedgraphs (or matrices), that is, a fixed-parameter algorithm which either con-cludes that the twin-width is at least k or reports an f ( k )-sequence, for somecomputable function f . This is interesting on its own and gives some hopefor the unordered case.1.3. Fixed-parameter tractable first-order model checking.
In thefirst-order ( FO ) model checking problem, one is given a structure G on afinite universe U , a sentence ϕ of quantifier-depth ‘ , and is asked to decideif G | = ϕ holds. The brute-force algorithm takes time | U | O ( ‘ ) , by exploringthe full game tree. The question is whether a uniformly polynomial-timealgorithm exists, that is, with running time f ( ‘ ) | U | O (1) . In the language of provably more efficient than what is possible on general graphs, under standardcomplexity-theoretic assumptions WIN-WIDTH IV: LOW COMPLEXITY MATRICES 5 parameterized complexity, a parameterized problem is called fixed-parametertractable ( FPT ) if there exists an algorithm A (called a fixed-parameter algo-rithm ), a computable function f : N → N , and a constant c such that, givenan input of size n and parameter k , the algorithm A correctly decides if theinputs has the desired property in time bounded by f ( k ) n c . The complexityclass containing all fixed-parameter tractable problems is called FPT . (Werefer the interested to [8] for more details on parameterized algorithms.)When the input structures range over the set of all finite graphs, FO -modelchecking is known to be AW [ ∗ ]-complete [10], thus not FPT unless the widely-believed complexity-theoretic assumption
FPT = AW [ ∗ ] fails.There is an ongoing program aiming to classify all the hereditary graphclasses on which FO -model checking is FPT . Currently such an algorithmis known for nowhere dense classes [20], for structurally bounded-degreeclasses [16] (and more generally for perturbations of degenerate nowheredense classes [17]), for map graphs [12], for some families of intersection andvisibility graphs [22], for transductions of bounded expansion classes whena depth-2 low shrub-depth cover of the graph is given [18], and for classes with bounded twin-width [6]. It is believed that every class which is, inthat context, “essentially different” from the class of all graphs admitsa fixed-parameter tractable FO -model checking. Settling this conjecturemight require to get a unified understanding of bounded twin-width andstructurally nowhere dense classes.Much effort [15, 13, 11, 26, 31] has also been made in graph classes aug-mented by an order or a successor relation. We refer the interested reader tothe joint journal version [14], subsuming all five previous references. Thereare two different settings: the general ordered case (with no restriction),and the order invariant case (where the queried formulas may use the newrelation but must not depend on the particular ordering). In the order-invariant setting, the model checking is shown fixed-parameter tractable onclasses of bounded expansion and colored posets of bounded width [14]. Inthe general ordered case, the same authors observe that FO [ < ]-model check-ing is AW [ ∗ ]-complete when the underlying graph class is as simple as partialmatchings [14, Theorem 1]. By considering the edge and order relations asa whole unit, fixed-parameter tractable algorithms do exist in a relativelybroad scenario, namely, when the resulting binary structures have boundedtwin-width. The equivalence between Item i and Item viii, and the fact that O (1)-sequences can be efficiently computed (see Section 1.2), completelyresolves this version of the general ordered case.1.4. Bounded twin-width classes are exactly those than can betotally ordered and remain monadically NIP.
We refer the readerto Section 2.3 for the relevant background. Simon and Toruńczyk [30]recently announced the following characterization of bounded twin-widthclasses: A class C of binary structures over a signature σ has bounded twin-width if and only if there exists a monadically dependent (i.e., monadicallyNIP) class D over σ ∪ { < } , where < is interpreted as a total order, such With the caveat that a witness of low twin-width is needed (see Section 1.2). precisely, every class without an FO-transduction which is the class of all graphs (seeSection 2 for the relevant definitions) É. BONNET, U. GIOCANTI, P. OSSONA DE MENDEZ, AND S. THOMASSÉ that C = Reduct σ ( D ), where Reduct σ ( · ) simply forgets the relation < . Theforward implication can be readily derived from known results [6]. For anybinary structure, there is a total order on its vertices which, added to thestructure, does not change its twin-width. This is by definition (see Sec-tion 2.1). Now every class of bounded twin-width is monadically NIP. Thisis because FO-transductions preserve bounded twin-width. The implica-tion Item v ⇒ Item i yields the backward direction, since a rephrasing ofItem v is that the class is monadically NIP. Thus we also obtain Simon andToruńczyk’s characterization.1.5.
Small conjecture.
Classes of bounded twin-width are small [5], thatis, they contain at most n ! c n distinct labeled n -vertex structures, for someconstant c . In the same paper, the converse is conjectured for hereditaryclasses. In the context of classes of totally ordered structures, it is simplerto drop the labeling and to count up to isomorphism. Indeed every struc-ture has no non-trivial automorphism. Then a class is said small if, up toisomorphism, it contains at most c n distinct n -vertex structure. With thatin mind, the equivalence between Item i and Item vii resolves the conjecturein the particular case of ordered graphs (or matrices).2. Preliminaries
Everything which is relevant to the rest of the paper will now be properlydefined. We may denote by [ i, j ] the set of integers that are at least i andat most j , and [ i ] is a short-hand for [1 , i ]. We start with the definition oftwin-width.2.1. Twin-width.
In the first paper of the series [6], we define twin-widthfor general binary structures. The twin-width of (ordered) matrices canbe defined by encoding the total orders on the rows and on the columnswith two binary relations. However we will give an equivalent definition,tailored to ordered structures. This slight shift is already a first step inunderstanding these structures better, with respect to twin-width.Let M be a n × m matrix with entries ranging in a fixed finite set. Wedenote by R := { r , . . . , r n } its set of rows and by C := { c , . . . , c m } its setof columns. Let S be a non-empty subset of columns, c a be the column of S with minimum index a , and c b , the column of S with maximum index b .The span of S is the set of columns { c a , c a +1 , . . . , c b − , c b } . We say thata subset S ⊆ C is in conflict with another subset S ⊆ C if their spansintersect. A partition P of C is a k -overlapping partition if every part of P is in conflict with at most k other parts of P . The definitions of span , conflict , and k -overlapping partition similarly apply to sets of rows. Withthat terminology, a division is a 0-overlapping partition.A partition P is a contraction of a partition P (defined on the sameset) if it is obtained by merging two parts of P . A contraction sequence of M is a sequence of partitions P , . . . , P n + m − of the set R ∪ C such that P is the partition into n + m singletons, P i +1 is a contraction of P i for all i ∈ [ n + m − P n + m − = { R, C } . In other words, we merge atevery step two column parts (made exclusively or columns) or two row parts(made exclusively or rows), and terminate when all rows and all columns WIN-WIDTH IV: LOW COMPLEXITY MATRICES 7 both form a single part. We denote by P Ri the partition of R induced by P i and by P Ci the partition of C induced by P i . A contraction sequence is k -overlapping if all partitions P Ri and P Ci are k -overlapping partitions.Note that a 0-overlapping sequence is a sequence of divisions.If S R is a subset of R , and S C is a subset of C , we denote by S R ∩ S C thesubmatrix at the intersection of the rows of S R and of the columns of S C .Given some column part C a of P Ci , the error value of C a is the number ofrow parts R b of P Ri for which the submatrix C a ∩ R b of M is not constant.The error value is defined similarly for rows, by switching the role of columnsand rows. The error value of P i is the maximum error value of some partin P Ri or in P Ci . A contraction sequence is a ( k, e ) -sequence if all partitions P Ri and P Ci are k -overlapping partitions with error value at most e . Strictlyspeaking, to be consistent with the definitions in the first paper [6], the twin-width of a matrix M , denoted by tww( M ), is the minimum k + e such that M has a ( k, e )-sequence. This matches, setting d := k + e , what we called a d -sequence for the binary structure encoding M . We will however not worryabout the exact value of twin-width. Thus for the sake of simplicity, weoften consider the minimum integer k such that M has a ( k, k )-sequence.This integer is indeed sandwiched between tww( M ) / M ).The twin-width of a matrix class M , denoted by tww( M ), is simplydefined as the supremum of { tww( M ) | M ∈ M} . We say that M has bounded twin-width if tww( M ) < ∞ , or equivalently, if there is a finiteinteger k such that every matrix M ∈ M has twin-width at most k . A class (cid:67) of ordered graphs has bounded twin-width if all the adjacency matrices ofgraphs G ∈ (cid:67) along their vertex ordering, or equivalently their submatrixclosure, form a set/class with bounded twin-width.2.2. Rank division and rich division.
We will now require that the ma-trix entries are elements of a finite field F . We recall that a division D of a matrix M is a pair ( D R , D C ), where D R (resp. D C ) is a partition ofthe rows (resp. columns) of M into (contiguous) intervals, or equivalently, a0-overlapping partition. A d -division is a division satisfying | D R | = | D C | = d . For every pair R i ∈ D R , C j ∈ D C , the submatrix R i ∩ C j may becalled zone (or cell ) of D since it is, by definition, a contiguous submatrixof M . We observe that a d -division has d zones.A rank- k d -division of M is a d -division D such that for every R i ∈ D R and C j ∈ D C the zone R i ∩ C j has rank at least k (over F ). A rank- k division is simply a short-hand for a rank- k k -division. The grid rank of amatrix M , denoted by gr( M ), is the largest integer k such that M admitsa rank- k division. The grid rank of a matrix class M , denoted by gr( M ),is defined as sup { tww( M ) | M ∈ M} . A class M has bounded grid rank ifgr( M ) < ∞ , or equivalently, if there exists an integer k such that for everymatrix M ∈ M , and for every k -division D of M , there is a zone of D withrank less than k .Closely related to rank divisions, a k -rich division is a division D of amatrix M on rows and columns R ∪ C such that: • for every part R a of D R and for every subset Y of at most k parts in D C , the submatrix R a ∩ ( C \ ∪ Y ) has at least k distinct row vectors,and symmetrically É. BONNET, U. GIOCANTI, P. OSSONA DE MENDEZ, AND S. THOMASSÉ • for every part C b of D C and for every subset X of at most k partsin D R , the submatrix ( R \ ∪ X ) ∩ C b has at least k distinct columnvectors.Informally, in a large rich division (that is, a k -rich division for some largevalue of k ), the diversity in the column vectors within a column part cannotdrop too much by removing a controlled number of row parts. And the sameapplies to the diversity in the row vectors.We now move on to describe the relevant concepts in finite model theory.2.3. Model Theory.
A relational signature σ is a set of relation symbols R i with associated arities r i . A σ -structure A is defined by a finite set A (the do-main of A ) together with a subset R A i of A r i for each relation symbol R i ∈ σ with arity r i . The first-order language FO( σ ) associated to σ -structures de-fines, for each relation symbol R i with arity r i the predicate R i such that A | = R i ( v , . . . , v r i ) if ( v , . . . , v r i ) ∈ R A i .Let ϕ ( x, y ) be a first-order formula in FO( σ ) and let (cid:67) be a class of σ -structures. The formula ϕ is independent over (cid:67) if, for every integer k ∈ N there exist a σ -structure A ∈ (cid:67) , k tuples u , . . . , u k ∈ A | x | , and 2 k tuples v ∅ , . . . , v [ k ] ∈ A | y | with A | = ϕ ( u i , v I ) ⇐⇒ i ∈ I. The class (cid:67) is independent if there is a formula ϕ ( x, y ) ∈ FO( σ ) that isindependent over (cid:67) . Otherwise, the class (cid:67) is dependent (or NIP , for Notthe Independence Property).A theory T is a consistent set of first-order sentences. We will frequentlyconsider classes of structures satisfying some theory. For instance, a (simpleundirected) graph is a structure on the signature σ graph with unique binaryrelation symbol E satisfying the theory T graph consisting of the two sentences ∀ x ¬ E ( x, x ) (which asserts that a graph has no loops) and ∀ x ∀ y ( E ( x, y ) ↔ E ( y, x )) (which asserts that the adjacency relation of a graph is symmetric).We now define the signatures and theories corresponding to 0 , linear order is a σ < -structure satisfying the theory T < , where σ < consists of the binary relation < , and T < consists of thefollowing sentences, which express that < is a linear order. ∀ x ¬ ( x < x ); ∀ x ∀ y ( x = y ) ∨ ( x < y ) ∨ ( y < x ); ∀ x ∀ y ∀ z (( x < y ) ∧ ( y < z )) → ( x < z ) . A 0 , -matrix is a σ matrix -structure satisfying the theory T matrix , where σ matrix consists of a unary relational symbol R (interpreted as the indicator of rowindices), a binary relation < (interpreted as a linear order), and a binaryrelation M (interpreted as the matrix entries), and the theory T matrix isobtained by adding to T < the sentences ∀ x ∀ y ( R ( x ) ∧ ¬ R ( y )) → ( x < y ) , ∀ x ∀ y M ( x, y ) → ( R ( x ) ∧ ¬ R ( y )) . The first sentence asserts that all the row indices are before (along < ) allthe column indices. The second sentence asserts that the first variable of M is a row index, while the second variable of M is a column index. WIN-WIDTH IV: LOW COMPLEXITY MATRICES 9 An ordered graph is a σ ograph -structure satisfying the theory T ograph , where σ ograph consists of the binary relations < and E , and where T ograph consistsof the union of T graph and T < .Let σ , σ be signatures and let T , T be theories, in FO( σ ) and FO( σ ),respectively. A simple interpretation of σ -structures in σ -structures is atuple I = ( ν, ρ , . . . , ρ k ) of formulas in FO( σ ), where ν ( x ) as a single freevariable and, for each relation symbol R i ∈ σ with arity r i the formula ρ i has r i free variables. If A is a σ -structure, the σ -structure I ( A ) hasdomain ν ( A ) = { v ∈ A : A | = ν ( v ) } and relation R I ( A ) i = ρ i ( A ) ∩ ν ( A ) r i ,that is: R I ( A ) i = { ( v , . . . , v r i ) ∈ ν ( A ) r i : A | = ρ i ( v , . . . , v k ) } . An important property of (simple) interpretations is that, for every formula ϕ ( x , . . . , x k ) ∈ FO( σ ) there is a formula I ∗ ( ϕ )( x , . . . , x k ) such that forevery σ -structure A and every v , . . . , v k ∈ ν ( A ) we have I ( A ) | = ϕ ( v , . . . , v k ) ⇐⇒ A | = I ∗ ( ϕ )( v , . . . , v k ) . We say that I is a simple interpretation of σ -structures satisfying T in σ -structures satisfying T if, for every θ ∈ T we have T ‘ I ∗ ( θ ). Then, forevery σ -structure A we have A | = T ⇒ I ( A ) | = T . By extension we say, for instance, that I is a simple interpretation of orderedgraphs in 0 , σ ograph -structuressatisfying T ograph in σ matrix -structures satisfying T matrix .Let σ ⊂ σ be relational signatures. The σ -reduct (or σ -shadow ) ofa σ -structure A is the structure obtained from A by “forgetting” all therelations not in σ . This interpretation of σ -structures in σ -structures isdenoted by Reduct σ or simply Reduct , when σ is clear from context.A monadic lift of a class (cid:67) of σ -structures is a class (cid:67) + of σ + -structures,where σ + is the union of σ and a set of unary relation symbols, and (cid:67) = { Reduct σ ( A ) : A ∈ (cid:67) + } . A class (cid:67) of σ -structures is monadically depen-dent (or monadically NIP) if every monadic lift of (cid:67) is dependent (or NIP).A transduction T from σ -structures to σ -structures is defined by an in-terpretation I T of σ -structures in σ +1 -structures, where σ +1 is the union of σ +1 and a set of unary relation symbols. For a class (cid:67) of σ -structures, wedefine T ( (cid:67) ) as the class I T ( (cid:67) + ) where (cid:67) + is the set of all σ +2 -structures A + with Reduct σ ( A + ) ∈ (cid:67) . A class (cid:68) of σ -structures is a T -transduction of a class (cid:67) of σ -structures if (cid:68) ⊆ T ( (cid:67) ). More generally, a class (cid:68) of σ -structures is a transduction of a class (cid:67) of σ -structures if there exists atransduction T from σ -structures to σ structures with (cid:68) ⊆ T ( (cid:67) ). Notethat the composition of two transductions is also a transduction.The following theorem witnesses that transductions are particularly fit-ting to the study of monadic dependence: Theorem 2.1 (Baldwin and Shelah [1]) . A class (cid:67) of σ -structures is monad-ically dependent if and only if for every monadic lift (cid:67) + of (cid:67) (in σ + -structures), every formula ϕ ( x, y ) ∈ FO( σ + ) with | x | = | y | = 1 is dependentover (cid:67) + . Consequently, (cid:67) is monadically dependent if and only if the class (cid:71) ofall finite graphs is not a transduction of (cid:67) . Corollary 2.2. If (cid:68) is a transduction of a class (cid:67) and (cid:67) is monadicallydependent then (cid:68) is monadically dependent.Proof. Otherwise, the class (cid:71) of all finite graphs is a transduction of (cid:68) and,by composition, a transduction of (cid:67) , contradicting the monadic dependenceof (cid:67) . (cid:3) Enumerative Combinatorics.
In the context of unordered struc-tures, a graph class C is said small if there is a constant c , such that itsnumber of n -vertex graphs bijectively labeled by [ n ] is at most n ! c n . Whenconsidering totally ordered structures, for which the identity is the uniqueautomorphism, one can advantageously drop the labeling and the n ! factor.Indeed, on these structures, counting up to isomorphism or up to equalityis the same. Thus a matrix class M is said small if there exists a realnumber c such that the total number of m × n matrices in M is at most c max( m,n ) . Analogously to permutation classes which are by default sup-posed closed under taking subpermutations (or patterns), we will define a class of matrices as a set of matrices closed under taking submatrices. The submatrix closure of a matrix M is the set of all submatrices of M (including M itself). Thus our matrix classes include the submatrix closure of everymatrix they contain. On the contrary, classes of (ordered) graphs are onlyassumed to be closed under isomorphism. A hereditary class of (ordered)graphs (resp. binary structures) is one that is closed under taking inducedsubgraphs (resp. induced substructures).Marcus and Tardos [27] showed the following central result, henceforth re-ferred to as Marcus-Tardos theorem , which by an argument due to Klazar [24]was known to imply the Stanley-Wilf conjecture, that permutation classesavoiding any fixed pattern are small.
Theorem 2.3.
There exists a function mt : N → N such that every n × m matrix M with at least mt( k ) max( n, m ) nonzero entries has a k -division inwhich every zone contains a non-zero entry. We call mt( · ) the Marcus-Tardos bound . The current best bound ismt( k ) = ( k + 1) k = 2 O ( k ) [7]. Among other things, The Marcus-Tardostheorem is a crucial tool in the development of the theory around twin-width. In the second paper of the series [5], we generalize the Stanley-Wilfconjecture/Marcus-Tardos theorem to classes with bounded twin-width. Weshow that every graph class with bounded twin-width is small (while propersubclasses of permutation graphs have bounded twin-width [6]). This canbe readily extended to every bounded twin-width class of binary structures.We conjectured that the converse holds for hereditary classes: Every heredi-tary small class of binary structures has bounded twin-width. We will showthis conjecture, in the current paper, for the special case of totally orderedbinary structures.We denote by M n , the n -slice of a matrix class M , that is the set of all n × n matrices of M . The growth (or speed ) of a matrix class is the function n ∈ N
7→ |M n | . A class M has subfactorial growth if there is a finite integer WIN-WIDTH IV: LOW COMPLEXITY MATRICES 11 beyond which the growth of M is strictly less than n !; more formally, ifthere is n such that for every n (cid:62) n , |M n | < n !. Similarly, (cid:67) being aclass of ordered graphs, the n -slice of (cid:67) , (cid:67) n , is the set of n -vertex orderedgraphs in (cid:67) . And the growth (or speed ) of a class (cid:67) of ordered graphs isthe function n ∈ N
7→ | (cid:67) n | .2.5. Computational Complexity.
We recall that first-order ( FO ) matrixmodel checking asks, given a matrix M (or a totally ordered binary struc-ture S ) and a first-order sentence φ (i.e., a formula without any free vari-able), if M | = φ holds. The atomic formulas in φ are of the kinds describedin Section 2.3.We then say that a matrix class M is tractable if FO -model checking isfixed-parameter tractable ( FPT ) when parameterized by the sentence sizeand the input matrices are drawn from M . That is, M is tractable ifthere exists a constant c and a computable function f , such that M | = φ can be decided in time f ( ‘ ) ( m + n ) c , for every n × m -matrix M ∈ M and FO sentence φ of quantifier depth ‘ . We may denote the size of M , n + m , by | M | , and the quantifier depth (i.e., the maximum number ofnested quantifiers) of φ by | φ | . Similarly a class (cid:67) of binary structures issaid tractable if FO -model checking is FPT on (cid:67) . FO -model checking of general (unordered) graphs is AW [ ∗ ]-complete [10],and thus very unlikely to be FPT . Indeed
FPT = AW [ ∗ ] is a much weakerassumption than the already widely-believed Exponential Time Hypothe-sis [23], and if false, would in particular imply the existence of a subex-ponential algorithm solving . In the first paper of the series [6], weshow that FO -model checking of general binary structures of bounded twin-width given with an O (1)-sequence can even be solved in linear FPT time f ( | φ | ) | U | , where U is the universe of the structure. In other words, boundedtwin-width classes admitting a g (OPT)-approximation for the contractionsequences are tractable. It is known for (unordered) graph classes that theconverse does not hold. For instance, the class of all subcubic graphs (i.e.,graphs with degree at most 3) is tractable [29] but has unbounded twin-width [5]. Theorem 1.2 will show that, on every class of ordered graphs, afixed-parameter approximation algorithm for the contraction sequence ex-ists. Thus every bounded twin-width class of ordered graphs is tractable.We will also see that the converse holds for hereditary classes of orderedgraphs.2.6. Ramsey Theory.
The order type of a pair ( x, y ) of elements of alinearly ordered set is the integer ot( x, y ) defined byot( x, y ) = − x > y x = y x < y. A class M is pattern-avoiding if it does not include any of the matrix classesof the set P := {F η | η : {− , } × {− , } → { , }} of 16 classes, where F η is the hereditary closure of { F η ( σ ) | σ ∈ S n , n (cid:62) } .For a fixed function η : {− , } × {− , } → { , } , the matrix F η ( σ ) = ( f i,j ) (cid:54) i,j (cid:54) n corresponds to an encoding of the permutation matrix M σ of σ ∈ S n , where f i,j only depends on the order types between i and σ − ( j ),and between j and σ ( i ) in a way prescribed by η . In other words, f i,j isfully determined by asking whether ( i, j ) is, in M σ , below or above the 1 ofits column and whether it is to the left or the right of the 1 of its row.We now give the formal definition of F η ( σ ) = ( f i,j ) (cid:54) i,j (cid:54) n , but we willrecall it and provide some visual intuition in due time. For every i, j ∈ [ n ]: f i,j := (cid:26) η (ot( σ − ( j ) , i ) , ot( j, σ ( i ))) if σ ( i ) = j − η (1 ,
1) if σ ( i ) = j We give a similar definition in Section 7 for ordered graphs: a hereditaryclass (cid:67) of ordered graphs is matching-avoiding if it does not include anyordered graph class (cid:77) η,λ,ρ of a set of 256 classes (corresponding this time toencodings of ordered matchings). The precise definition is more technical,and not that important at this stage, hence our decision of postponing itto Section 7.2.7.
Our results.
We can now restate the list of equivalences announcedin the introduction, with the vocabulary of this section.
Theorem 1.1.
Given a class M of matrices, the following are equivalent. ( i ) M has bounded twin-width. ( ii ) M has bounded grid rank. ( iii ) M is pattern-avoiding. ( iv ) M is dependent. ( v ) M is monadically dependent. ( vi ) M has subfactorial growth. ( vii ) M is small. ( viii ) M is tractable. (The implication from Item viii holds if FPT = AW [ ∗ ] .) For the reader to get familiar with the definitions and notations, we givea compact version of Theorem 1.1. We also introduce a technical condition,Item ix, which will be a key intermediate step in proving that Item ii impliesItem i, as well as in getting an approximation algorithm for the twin-widthof a matrix.
Theorem 1.1 (compact reminder of the definitions and notations + Item ix) . Given a class M of matrices, the following are equivalent. ( i ) tww( M ) < ∞ . ( ii ) gr( M ) < ∞ . ( iii ) For every F η ∈ P , ∃ M ∈ F η , M / ∈ M . ( iv ) For every FO -interpretation I , I ( M ) = M all . ( v ) For every FO -transduction T , T ( M ) = M all . ( vi ) ∃ n ∈ N , |M n | (cid:54) n ! , ∀ n (cid:62) n . ( vii ) ∃ c ∈ N , |M n | < c n , ∀ n ∈ N . ( viii ) Given ( M ∈ M , φ ∈ FO[ τ ]) , M | = φ can be decided in time f ( | φ | ) | M | . ( ix ) ∃ q ∈ N , no M ∈ M admits a q -rich division. We transpose these results for hereditary classes of ordered graphs. Wealso refine the model-theoretic (Items 3 and 4) and growth (Item 7) charac-terizations.
WIN-WIDTH IV: LOW COMPLEXITY MATRICES 13 ( i ) bounded twin-width( ix ) no rich division ( ii ) bounded grid rank( vii ) small( vi ) subfactorial growth( v ) monadically NIP ( iv ) NIP( iii ) pattern-avoiding( viii ) tractable[6, Sec. 8] def[6, Sec. 7]Theorem 1.2 Theorem 7.14if FPT = AW [ ∗ ]Lemma 6.4Theorem 7.7Theorem 6.6def[5, Sec. 3]Section 3 Section 4 Figure 1.
A bird’s eye view of the paper. In green, the im-plications that were already known for general binary struc-tures. In red, the new implications for matrices on finitealphabets, or ordered binary structures. The effective impli-cation Item i ⇒ Item ix is useful for Theorem 1.2. See Fig-ure 2 for a more detailed proof diagram, distinguishing whatis done in the language of matrices and what is done in thelanguage of ordered graphs.
Theorem 2.4.
Let (cid:67) be a hereditary class of ordered graphs. The followingare equivalent. (1) (cid:67) has bounded twin-width. (2) (cid:67) is monadically dependent. (3) (cid:67) is dependent. (4)
No simple interpretation in (cid:67) is the class of all ordered graphs. (5) (cid:67) is small. (6) (cid:67) contains O ( n ) ordered n -vertex graphs. (7) (cid:67) contains less than P b n/ c k =0 (cid:0) n k (cid:1) k ! ordered n -vertex graphs, for some n . (8) (cid:67) does not include one of 256 hereditary ordered graph classes (cid:77) η,λ,ρ with unbounded twin-width. (9) There exists a permutation σ such that (cid:67) does not include any of 256ordered graphs defined from σ . (10) FO -model checking is fixed-parameter tractable on (cid:67) .(This implies the other items only if FPT = AW [ ∗ ] .) The previous theorem holds more generally for hereditary ordered classesof binary structures. In an informal nutshell, the high points of the paperread: For hereditary ordered binary structures, bounded twin-width, small,subfactorial growth, and tractability of FO -model checking are all equiva-lent. We conclude by giving a more detailed statement of the approximationalgorithm. Theorem 1.2 (more precise statement) . There is a fixed-parameter algo-rithm, which, given an ordered binary structure G and a parameter k , eitheroutputs • a O ( k ) -sequence of G , implying that tww( G ) = 2 O ( k ) , or • a k ( k + 1) -rich division of M ( G ) , implying that tww( G ) > k . Outline.
Bounded twin-width is already known to imply interestingproperties:
FPT FO -model checking if the O (1)-sequences are part of theinput [6], monadic dependence [6], smallness [5] (see the green and orangearrows in Figures 1 and 2). For a characterization of some sort in theparticular case of ordered structures, the challenge is to find interestingproperties implying bounded twin-width. A central characterization in thefirst paper of the series [6] goes as follows. Let us call ausual 0,1-adjacency matrix where the 0 entries (non-edges) are replaced, fora purely technical reason, by 2. A graph class (cid:67) has bounded twin-widthif and only if there is a constant d (cid:67) such that every graph in (cid:67) admits a d (cid:67) -division. A reformulation of thelatter condition is that there is an ordering of the vertex set such that theadjacency matrix has some property (no large division where every cell hasrank at least 2). The backward direction is effective: From such an ordering,we obtain an O (1)-sequence in polynomial time.Now that we consider ordered matrices (and our graphs come with atotal order) it is tempting to try this order to get a witness of low twin-width. Things are not that simple. Consider the checkerboard matrix (with1 entries at positions ( i, j ) such that i + j is even, and 0 otherwise). Itadmits a (1 , C o ,the second and fourth columns into C e , then C o and the fifth into C o , C e and the sixth into C e , and so on. This creates a sequence of 1-overlappingpartitions since only two column parts, C o and C e , ever get in conflict. Themaximum error value remains 0 since all columns of odd (resp. even) indexare equal. Then we proceed in the same way on the row parts. Again itmakes for a “partial” (1 , d -divisions for arbitrarily large d (by dividing after ev-ery even-indexed row and column). Now a good reordering would put all theodd-indexed columns together, followed by all the even-indexed columns.Reordered in this way, a matrix encoding both the initial matrix and theoriginal order would have only small rank-2 d -divisions.Can we find such reorderings automatically? Eventually we can but a cru-cial opening step is precisely to nullify the importance of the reordering. Weshow that matrices have bounded twin-width exactly when they do not ad-mit rank- k k -divisions for arbitrary k . This natural strengthening on thecondition that cells should satisfy ( rank at least k instead of rank at least k division already for k = 3, for the good reasonthat it has rank 2.An important intermediate step is provided by the concept of rich divi-sions. We first prove that a greedy strategy to find a potential O (1)-sequencecan only be stopped by the presence of a large rich division; thus, unboundedtwin-width implies the existence of arbitrarily large rich divisions. Thisbrings a theme developed in [6] to the ordered world. In turn we show that WIN-WIDTH IV: LOW COMPLEXITY MATRICES 15 huge rich divisions contain large rank divisions. As often in the series, thisleverages Marcus-Tardos theorem and is entirely summarized by Figure 4.By a series of Ramsey-like arguments, we find in large rank divisionsmore and more structured submatrices encoding universal permutations.Eventually we find at least one of sixteen encodings of all permutations(i.e., F η for one of the sixteen “ η ”). More precisely, the encoding of each n -permutation is contained in ( F η ) n , the n × n matrices of F η .This chain of implications shows that hereditary classes with unboundedtwin-width have growth at least n !. Conversely it was known that labeledclasses with growth n ! · ω ( n ) have unbounded twin-width [5], thus (unlabeled)ordered classes with growth 2 ω ( n ) also have unbounded twin-width. Thatestablishes the announced speed gap for ordered hereditary classes of binarystructures.Finally we translate the permutation encodings in the language of or-dered graphs. This allows us to refine the growth gap specifically for or-dered graphs. We also prove that including a family F η or its ordered-graphequivalent is an obstruction to being NIP. This follows from the fact thatthe class of all permutation graphs is independent. As we get an effec-tively constructible transduction to the set of all structures (matrices or or-dered graphs), we conclude that FO -model checking is not FPT on hereditaryclasses of unbounded twin-width. This is the end of the road. The remain-ing implications to establish the equivalences of Theorems 1.1 and 2.4 comefrom [6, Sections 7 and 8], [5, Section 3], and Theorem 1.2 (see Figure 2). large rich divisionsunbounded twin-widthlarge rank divisionslarge rank Latin divisions |M n | (cid:62) n ! ∃ η F η ⊆ M unbounded twin-width ∃ η, ρ, λ M η,λ,ρ ⊆ C not NIPnot monadically NIPnot small ∀ n | C n | (cid:62) (cid:80) n/ k =0 (cid:0) n k (cid:1) k !not small Theorem 3.2Theorem 4.1Lemma 5.2Corollary 6.7
Hereditary class C of orderedgraphsMatrix class M First-Ordermodel checkingnot
FPT [6, Sec. 7][6, Sec. 8] [5, Sec. 3][5, Sec. 3] Theorem 7.13Corollary 7.8 Theorem 7.7,if
FPT (cid:54) = AW [ ∗ ] not NIPnot monadically NIP Corollary 7.10[6, Sec. 8]
Figure 2.
A more detailed proof diagram.
Organization.
The rest of the paper is organized as follows. In Sec-tion 3, we show that Item i and Item ix are equivalent. As a by-product,we obtain a fixed-parameter f (OPT)-approximation algorithm for the twin-width of ordered matrices. In Section 4, we prove the implication Item ii ⇒ Item ix. In Section 5, we introduce the rank Latin divisions and showthat large rank divisions contain large rank Latin divisions. In Section 6,we further clean the rank Latin divisions in order to show that Item iii ⇒ Item ii and Item vi ⇒ Item ii. Finally in Section 7, we show that Item viii ⇒ Item iii and Item iv ⇒ Item iii transposed to the language of ordered graphs.We also refine the lower bound on the growth of ordered graph classes withunbounded twin-width, to completely settle Balogh et al.’s conjecture [3].See Figure 2 for a visual outline.3.
Approximating the matrix twin-width is
FPT
In this section we show the equivalence between Item i and Item ix. Asa by-product, we obtain an f (OPT)-approximation algorithm for the twin-width of matrices, or ordered graphs. We first show that a large rich divisionimplies large twin-width. This direction is crucial for the algorithm but not for the main circuit of implications. Lemma 3.1. If M has a k ( k + 1) -rich division D , then tww( M ) > k .Proof. We prove the contrapositive. Let M be a matrix of twin-width atmost k . In particular, M admits a ( k, k )-sequence P , . . . , P n + m − . Let D be any division of M . We want to show that D is not k ( k + 1)-rich.Let t be the smallest index such that either a part R i of P Rt intersects threeparts of D R , or a part C j of P Ct intersects three parts of D C . Without lossof generality we can assume that C j ∈ P Ct intersects three parts C a , C b , C c of D C , with a < b < c where the parts C , . . . , C d of the division D areordered from left to right. Since P Ct is a k -overlapping partition, the subset S , consisting of the parts of P Ct intersecting C b , has size at most k + 1.Indeed, S contains C j plus at most k parts which C j is in conflict with.Here a part R s of D R is said red if there exist a part R i of P Rt intersecting R s and a part C z in S such that the submatrix R i ∩ C z is not constant(see Figure 3). We then say that C z is a witness of R s being red. Let N ⊆ R be the subset of rows not in a red part of D R . Note that for everypart C z ∈ S , the submatrix N ∩ C z consists of the same column vectorrepeated | C z | times. Therefore N ∩ C b has at most k + 1 distinct columnvectors.Besides, the number of red parts witnessed by C z ∈ S is at most 2 k . Thisis because the number of non-constant submatrices R i ∩ C z , with R i ∈ P Rt ,is at most k (since P , . . . , P n + m − is a ( k, k )-sequence) and because every R i intersects at most two parts of D R (by definition of t ). Hence the totalnumber of red parts is at most 2 k | S | , thus at most 2 k ( k + 1). Consequently,there is a subset X of at most 2 k ( k + 1) parts of D R , namely the red parts,and a part C b of D C such that ( R \ ∪ X ) ∩ C b = N ∩ C b consists of at most k + 1 distinct column vectors. Thus D is not a 2 k ( k + 1)-rich-division. (cid:3) WIN-WIDTH IV: LOW COMPLEXITY MATRICES 17 C z C j R i C a C b C c R s NC Figure 3.
The division D in black. The column part C j ∈P Ct , first to intersect three division parts, in orange. Two rowparts of D turn red because of the non-constant submatrix C z ∩ R i , with C z ∈ S and R i ∈ D R . After removal of theat most 2 k | S | red parts, | S | (cid:54) k + 1 bounds the number ofdistinct columns.Our main algorithmic result is that approximating the twin-width of ma-trices (or ordered graphs) is FPT . Let us observe that this remains a chal-lenging open problem for (unordered) graphs.
Theorem 1.2.
Given as input an n × m matrix M over a finite field F , andan integer k , there is an O ( k k ) ( n + m ) O (1) time algorithm which returns • either a k ( k + 1) -rich division of M , certifying that tww( M ) > k , • or an ( | F | O ( k ) , | F | O ( k ) ) -sequence, certifying that tww( M ) = | F | O ( k ) .Proof. We try to construct a division sequence D , . . . , D n + m − of M suchthat every D i satisfies the following properties (cid:80) R and (cid:80) C . • (cid:80) R : For every part R a of D Ri , there is a set Y of at most 4 k ( k +1)+1parts of D Ci , such that the submatrix R a ∩ ( C \ ∪ Y ) has at most4 k ( k + 1) distinct row vectors. • (cid:80) C : For every part C b of D Ci , there is a set X of at most 4 k ( k +1)+1parts of D Ri , such that the submatrix ( R \ ∪ X ) ∩ C b has at most4 k ( k + 1) distinct column vectors.The algorithm is greedy: Whenever we can merge two consecutive row partsor two consecutive column parts in D i so that the above properties arepreserved, we do so, and obtain D i +1 . We first need to show that checkingproperties (cid:80) R and (cid:80) C are FPT . Lemma 3.2.
Deciding if (cid:80) R holds, or similarly if (cid:80) C holds, can be donein time O ( k k ) ( n + m ) O (1) . Proof.
We show the lemma with (cid:80) R , since the case of (cid:80) C is symmetric. Forevery R a ∈ D Ri , we denote by (cid:80) R ( R a ) the fact that R a satisfies the condition (cid:80) R starting at "there is a set Y ." If one can check (cid:80) R ( R a ) in time T , onecan thus check (cid:80) R and (cid:80) C in time ( |D Ri | + |D Ci | ) f ( k ) (cid:54) ( n + m ) T .To decide (cid:80) R ( R a ), we initialize the set Y with all the column parts C b ∈ D Ci such that the zone R a ∩ C b contains more than 4 k ( k + 1) distinctrows. Indeed these parts have to be in Y . At this point, if R a ∩ ( C \ ∪ Y ) hasmore than (4 k ( k + 1)) k ( k +1)+2 distinct rows, then (cid:80) R ( R a ) is false. Indeed,each further removal of a column part divides the number of distinct rowsin R a by at most 4 k ( k + 1). Thus after the at most 4 k ( k + 1) + 1 furtherremovals, more than 4 k ( k + 1) would remain.Let us suppose instead that R a ∩ ( C \∪ Y ) has at most (4 k ( k +1)) k ( k +1)+2 distinct rows. We keep one representative for each distinct row. For every C b ∈ D Ci \ Y , the number of distinct columns in zone R a ∩ C b is at most2 k ( k +1) . In each of these zones, we keep only one representative for everyoccurring column vector. Now every zone of R a has dimension at most(4 k ( k + 1)) k ( k +1)+2 × k ( k +1) . Therefore the maximum number of distinctzones is exp(exp( O ( k log k ))).If a same zone Z is repeated in R a more than 4 k ( k + 1) + 1 times,at least one occurrence of the zone will not be included in Y . In thatcase, putting copies of Z in Y is pointless: it eventually does not de-crease the number of distinct rows. Thus if that happens, we keep ex-actly 4 k ( k + 1) + 2 copies of Z . Now R a has at most (4 k ( k + 1) + 2) · exp(exp( O ( k log k ))) = exp(exp( O ( k log k ))) zones. We can try out allexp(exp( O ( k log k ))) k ( k +1)+1 = exp(exp( O ( k log k ))) possibilities for theset Y , and conclude if at least one works. (cid:3) Two cases can arise.
Case 1.
The algorithm terminates on some division D i and no merge ispossible. Let us assume that D Ri := { R , . . . , R s } and D Ci := { C , . . . , C t } ,where the parts are ordered by increasing vector indices.We consider the division D of M obtained by merging in D i the pairs { R a − , R a } and { C b − , C b } , for every 1 (cid:54) a (cid:54) b s/ c and 1 (cid:54) b (cid:54) b t/ c .Let C j be any column part of D C . Since the algorithm has stopped, forevery set X of at most 2 k ( k + 1) parts of D R , the matrix ( R \ ∪ X ) ∩ C j hasat least 4 k ( k + 1) + 1 distinct vectors. This is because 2 k ( k + 1) parts of D R corresponds to at most 4 k ( k + 1) parts of D Ri . The same applies to the rowparts, so we deduce that D is 2 k ( k + 1)-rich. Therefore, by Lemma 3.1, M has twin-width greater than k . Case 2.
The algorithm terminates with a full sequence D , . . . , D n + m − .Given a division D i with D Ri := { R , . . . , R s } and D Ci := { C , . . . , C t } , wenow define a partition P i that refines D i and has small error value. To doso, we fix a, say, column part C j and show how to partition it further in P i .By assumption on D i , there exists a subset X of at most r := 4 k ( k +1)+1parts of D Ri such that ( R \ ∪ X ) ∩ C j has less than r distinct column vectors.We now denote by F the set of parts R a of D Ri such that the zone R a ∩ C j has at least r distinct rows and r distinct columns. Such a zone is said full .Observe that F ⊆ X . Moreover, for every R a in X \ F , the total number of WIN-WIDTH IV: LOW COMPLEXITY MATRICES 19 distinct column vectors in R a ∩ C j is at most max( r, α r − ) = α r − , where α (cid:62) F . Indeed, if the number of distinct columns in R a ∩ C j is at least r , then the number of distinct rows is at most r − R \ ∪ F ) ∩ C j is at most w := r ( α r − ) r ; a multiplicative factor of α r − for each of the atmost r zones R a ∈ X \ F , and a multiplicative factor of r for ( R \ ∪ X ) ∩ C j .We partition the columns of C j accordingly to their subvector in ( R \∪ F ) ∩ C j (by grouping columns with equal subvectors together). The partition P i isobtained by refining, as described for C j , all column parts and all row partsof D i .By construction, P i is a refinement of P i +1 since every full zone of D i re-mains full in D i +1 . Hence if two columns belong to the same part of P i , theycontinue belonging to the same part of P i +1 . Besides, P i is a w -overlappingpartition of M , and its error value is at most r · w since non-constant zonescan only occur in full zones (at most r per part of D i ), which are furtherpartitioned at most w times in P i . To finally get a contraction sequence, wegreedily merge parts to fill the intermediate partitions between P i and P i +1 .Note that all intermediate refinements of P i +1 are w -overlapping partitions.Moreover the error value of a column part does not exceed r · w . Finally theerror value of a row part can increase during the intermediate steps by atmost 2 w . All in all, we get a ( w, ( r + 2) · w )-sequence. This implies that M has twin-width at most ( r + 2) · w = α O ( k ) .The running time of the overall algorithm follows from Lemma 3.2. (cid:3) The approximation ratio, of 2 O (OPT ) , can be analyzed more carefully byobserving that bounded twin-width implies bounded VC dimension. Thenthe threshold α r − can be replaced by r d , where d upperbounds the VCdimension.As a direct corollary of our algorithm, if the matrix M does not admitany large rich division, the only possible outcome is a contraction sequence.Considering the size of the field F as an absolute constant, we thus obtainthe following. Theorem 3.3. If M has no q -rich division, then tww( M ) = 2 O ( q ) . This is the direction which is important for the circuit of implications.The algorithm of Theorem 1.2 further implies that Theorem 3.3 is effective.4.
Large rich divisions imply large rank divisions
We remind the reader that a rank- k division is a k -division for whichevery zone has rank at least k . A ( k + 1)-rank division is a k -rich divisionsince the deletion of k zones in a column of the division leaves a zone withrank at least k , hence with at least k distinct row vectors. The goal of thissection is to provide a weak converse of this statement. We recall that mtis the Marcus-Tardos bound of Theorem 2.3. For simplicity, we show thefollowing theorem in the case F = F , but the proof readily extends to anyfinite field by setting K to | F | | F | k mt( k | F | k ) . Theorem 4.1.
Let K be k mt( k k ) . Every , -matrix M with a K -richdivision D has a rank- k division. Proof.
Without loss of generality, we can assume that D C has size at leastthe size of D R . We color red every zone of D which has rank at least k .We now color blue a zone R i ∩ C j of D if it contains a row vector r (oflength | C j | ) which does not appear in any non-red zone R i ∩ C j with i < i .We call r a blue witness of R i ∩ C j .Let us now denote by U j the subset of D R such that every zone R i ∩ C j with R i ∈ U j is uncolored , i.e., neither red nor blue. Since the division D is K -rich, if the number of colored (i.e., red or blue) zones R i ∩ C j is lessthan K , the matrix ( ∪ U j ) ∩ C j has at least K distinct column vectors. So( ∪ U j ) ∩ C j has at least 2 k mt( k k ) = log K distinct row vectors. By design,every row vector appearing in some uncolored zone R i ∩ C j must appear insome blue zone R i ∩ C j with i < i . Therefore at least 2 k mt( k k ) distinctrow vectors must appear in some blue zones within column part C j . Sincea blue zone contains less than 2 k distinct row vectors (its rank being lessthan k ), there are, in that case, at least 2 k mt( k k ) / k = mt( k k ) blue zoneswithin C j . Therefore in any case, the number of colored zones R i ∩ C j is atleast mt( k k ) per C j .Thus, by Theorem 2.3, we can find D a k k × k k division of M , coars-ening D , with at least one colored zone of D in each cell of D . Now weconsider D the k × k subdivision of M , coarsening D , where each supercell of D corresponds a 2 k × k square block of cells of D (see Figure 4). Ourgoal is to show that every supercell Z of D has rank at least k . This isclearly the case if Z contains a red zone of D . If this does not hold, each ofthe 2 k × k cells of D within the supercell Z contains at least one blue zoneof D . Let Z i,j be the cell in the i -th row block and j -th column block ofhypercell Z , for every i, j ∈ [2 k ]. Consider the diagonal cells Z i,i ( i ∈ [2 k ])of D within the supercell Z . In each of them, there is at least one bluezone witnessed by a row vector, say, ˜ r i . Let r i be the prolongation of ˜ r i upuntil the two vertical limits of Z . We claim that every r i (with i ∈ [2 k ])is distinct. Indeed by definition of a blue witness, if i < j , ˜ r j is differentfrom all the row vectors below it, in particular from r i restricted to thesecolumns. So Z has 2 k distinct vectors, and thus has rank at least k . (cid:3) Rank Latin divisions
In this section, we show a Ramsey-like result which establishes that ev-ery (hereditary) matrix class with unbounded grid rank can encode all the n -permutations with some of its 2 n × n matrices. In particular and in lightof the previous sections, this proves the small conjecture for ordered graphs.We recall that a rank- k d -division of a matrix M is a d -by- d division of M whose every zone has rank at least k , and rank- k division is a short-hand for rank- k k -division . Then a matrix class M has bounded grid rank if there isan integer k such that no matrix of M admits a rank- k division.Let I k be the k × k identity matrix, and k , k , U k , and L k be the k × k WIN-WIDTH IV: LOW COMPLEXITY MATRICES 21
Figure 4.
In black (purple, and yellow), the rich division D .In purple (and yellow), the Marcus-Tardos division D withat least one colored zone of D per cell. In yellow, the rank- k division D . Each supercell of D has large rank, eitherbecause it contains a red zone (light red) or because it has adiagonal of cells of D with a blue zone (light blue).respectively. Let A M be the vertical mirror of matrix A , that is, its reflec-tion about a vertical line separating the matrix in two equal parts. Thefollowing Ramsey-like result states that every 0 , Theorem 5.1.
There is a function T : N + → N + such that for every natural k , every matrix with rank at least T ( k ) contains as a submatrix one of thefollowing k × k matrices: I k , k − I k , U k , L k , I Mk , ( k − I k ) M , U Mk , L Mk . The previous theorem is a folklore result. For instance, it can be readilyderived from Gravier et al. [19] or from [9, Corollary 2.4.] combined withthe Erdős-Szekeres theorem. i.e., column d n/ e if A has n columns and n is odd, and a vertical line between column n/ n/ n is even Let N k be the set of the eight matrices of Theorem 5.1. The first four ma-trices are said diagonal , and the last four (those defined by vertical mirror)are said anti-diagonal . By Theorem 5.1, if a matrix class M has unboundedgrid rank, then one can find in M arbitrarily large divisions with a matrixof N k as submatrix in each zone of the division, for arbitrarily large k . Wewant to acquire more control on the horizontal-vertical interactions betweenthese submatrices of N k . We will prove that in large rank divisions, one canfind so-called rank Latin divisions .An embedded submatrix M of a matrix M is the matrix M togetherwith the implicit information on the position of M in M . In particular, wewill denote by rows( M ), respectively cols( M ) the rows of M , respectivelycolumns of M , intersecting precisely at M . When we use rows( · ) or cols( · ),the argument is implicitly cast in an embedded submatrix of the ambientmatrix M . For instance, rows( M ) denotes the set of rows of M (seen as asubmatrix of itself).A contiguous (embedded) submatrix is defined by a zone , that is, a setof consecutive rows and a set of consecutive columns. The ( i, j ) -cell of a d -division D , for any i, j ∈ [ d ], is the zone formed by the i -th row block andthe j -th column block of D . A canonical name for that zone is D i,j .A rank- k Latin d -division of a matrix M is a d -division D of M such thatfor every i, j ∈ [ d ] there is a contiguous embedded submatrix M i,j ∈ N k inthe ( i, j )-cell of D satisfying: • { rows( M i,j ) } i,j partitions rows( M ), and { cols( M i,j ) } i,j , cols( M ). • rows( M i,j ) ∩ cols( M i ,j ) equals k or k , whenever ( i, j ) = ( i , j ).Note that since the submatrices M i,j are supposed contiguous, the partitionis necessarily a 0-overlapping partition, hence a division. A rank- k pre-Latin d -division is the same, except that the second item need not be satisfied.We can now state our technical lemma. Lemma 5.2.
For every positive integer k , there is an integer K such thatevery , -matrix M with a rank- K division has a submatrix with a rank- k Latin division.Proof.
We start by showing the following claim, a first step in the globalcleaning process of Lemma 5.2. We recall that T ( · ) is the function of Theo-rem 5.1. Claim . Let M be a 0 , T ( κ ) d -division D . There isa κd × κd submatrix ˜ M of M with a rank- κ d -division D , coarsening D ,such that the ( i, j )-cell of D contains M i,j ∈ N κ as a contiguous submatrix, { rows( M i,j ) } i,j ∈ [ d ] partitions rows( ˜ M ), and { cols( M i,j ) } i,j ∈ [ d ] , cols( ˜ M ). Proof of the claim.
Let D R be ( R , . . . , R d ) and, D C be ( C , . . . , C d ). Let D be the coarsening of D defined by D R := ( S i ∈ [ d ] R i , S i ∈ [ d +1 , d ] R i , . . . , S i ∈ [( d − d +1 ,d ] R i ) and D C := ( S i ∈ [ d ] C j , . . . , S i ∈ [( d − d +1 ,d ] C j ). By Theo-rem 5.1, each cell of D contains a submatrix in N κ . Thus there are d suchsubmatrices in each cell of D . For every i, j ∈ [ d ], we keep in ˜ M the κ rows and κ columns of a single submatrix of N κ in the ( i, j )-cell of D , andmore precisely, one M i,j in the ( j + ( i − d, i + ( j − d )-cell of D . In otherwords, we keep in the ( i, j )-cell of D , a submatrix of N κ in the ( j, i )-cell of WIN-WIDTH IV: LOW COMPLEXITY MATRICES 23
Figure 5.
A 18 ×
18 0 , M i,j is highlighted in red. D restricted to D . The submatrices M i,j are contiguous in ˜ M . The set { rows( M i,j ) } i,j ∈ [ d ] partitions rows( ˜ M ) since j + ( i − d describes [ d ] when i × j describes [ d ] × [ d ]. Similarly { cols( M i,j ) } i,j ∈ [ d ] partitions cols( ˜ M ). (cid:3) We denote by b( k, k ) the minimum integer b such that every 2-edge col-oring of K b,b contains a monochromatic K k,k . We set b (1) ( k, k ) := b( k, k ),and for every integer s (cid:62)
2, we denote by b ( s ) ( k, k ), the minimum integer b such that every 2-edge coloring of K b,b contains a monochromatic K q,q with q = b ( s − ( k, k ). We set κ := b ( k − k ) ( k, k ) and K := max( T ( κ ) , k ) = T ( κ ),so that applying Claim 5.3 on a rank- K division (hence in particular arank- T ( κ ) k -division) gives a rank- κ pre-Latin k -division, with the k sub-matrices of N κ denoted by M i,j for i, j ∈ [ k ].At this point the zones rows( M i,j ) ∩ cols( M i ,j ), with ( i, j ) = ( i , j ), arearbitrary. We now gradually extract a subset of k rows and the k correspond-ing columns (i.e., the columns crossing at the diagonal if M i,j is diagonal,or at the anti-diagonal if M i,j is anti-diagonal) within each M i,j , to turnthe rank pre-Latin division into a rank Latin division. To keep our notationsimple, we still denote by M i,j the initial submatrix M i,j after one or severalextractions.For every (ordered) pair ( M i,j , M i ,j ) with ( i, j ) = ( i , j ), we perform thefollowing extraction (in any order of these (cid:0) k (cid:1) pairs). Let s be such that all Or for readers familiar with the game ultimate tic-tac-toe, at positions of moves forcingthe next move in the symmetric cell about the diagonal. the M a,b have size b ( s ) ( k, k ). We find two subsets of size b ( s − ( k, k ), one inrows( M i,j ) and one in cols( M i ,j ), intersecting at a constant b ( s − ( k, k ) × b ( s − ( k, k ) submatrix. In M i,j we keep only those rows and the correspond-ing columns, while in M i ,j we keep only those columns and the correspond-ing rows. In every other M a,b , we keep only the first b ( s − ( k, k ) rows andcorresponding columns.After this extraction performed on the k − k zones rows( M i,j ) ∩ cols( M i ,j )(with ( i, j ) = ( i , j )), we obtain the desired rank- k Latin division (on a sub-matrix of M ). (cid:3) A simple consequence of Lemma 5.2 is that every class M with unboundedgrid rank satisfies |M n | (cid:62) ( n )!. Indeed there is a simple injection from n -permutations to 2 n × n submatrices of any rank-2 Latin n-division. Thisis enough to show that classes of unbounded grid rank are not small. Wewill need some more work to establish the sharper lower bound of n !.6. Classes with unbounded grid rank have growth at least n !Here we provide some tools to improve the previous lower bound |M n | (cid:62) ( n )! to |M n | (cid:62) n ! (when M has unbounded grid rank). We will refine evenmore the cleaning of rank Latin divisions.6.1. Ramsey’s extractions.
We recall Ramsey’s theorem.
Theorem 6.1 (Ramsey’s theorem [28]) . There exists a map R ( · ) : N × N → N such that for every k (cid:62) , t (cid:62) the complete graph K R t ( k ) with edgescolored with t distinct colors contains a monochromatic clique on k vertices,i.e., a clique whose edges all have the same color. In what follows, for every p (cid:62) ( p ) t ( · ) the map R t ( · )iterated p times. The core of our proof relies on the following Ramsey-likelemma. Lemma 6.2.
Let K N be the complete graph with vertex set [ N ] and c : E ( K N ) → [4] be a -coloring its edges. For every k (cid:62) , we let n := R ( k ) and q := (cid:0) n (cid:1) . Then if N (cid:62) R ( q +1)16 ( k ) , there are two subsets R ∈ (cid:0) [ N ] k (cid:1) and C ∈ (cid:0) [ N ] k (cid:1) such that for every i < i ∈ R , i < i ∈ R , j < j ∈ C , j < j ∈ C : c (( i , j )( i , j )) = c (( i , j )( i , j )) , and c (( i , j )( i , j )) = c (( i , j )( i , j )) . Proof.
For every pair of rows i < i ∈ [ N ], we define the 16-coloring over thepairs of columns c i,i : (cid:0) [ N ]2 (cid:1) → [4] by c i,i ( (cid:8) j, j (cid:9) ) := (cid:0) c (( i, j )( i , j )) , c (( i, j )( i , j )) (cid:1) for every j, j ∈ [ N ].We first let R := [ n ] and gradually extract C ∈ (cid:0) [ N ] n (cid:1) such that for every i < i ∈ R , we have c i,i ( { j , j } ) = c i,i ( { j , j } ). We denote by C the set ofcurrently available columns from which we do the next extraction. Initiallywe set C := [ N ]. For every pair { i, i } ∈ (cid:0) R (cid:1) , with i < i , we shrink C so that {{ j, j } | j = j ∈ C } becomes monochromatic with respect to c i,i .More precisely, we iteratively apply Ramsey’s theorem q times. At the start WIN-WIDTH IV: LOW COMPLEXITY MATRICES 25 of iteration s (for the pair, say, i < i ), C has size at least R ( q +2 − s )16 ( k ), so wefind by Theorem 6.1 a monochromatic set of size at least R ( q +1 − s )16 ( k ) in K C colored by the 16-edge-coloring c i,i . We update C to that monochromaticset and go to the next iteration. After iteration q , C has size at leastR ( k ) = n . We then define C by picking any n columns in C .Now we perform a last extraction to get R and C from R and C : Wetake C to be any set in (cid:0) C k (cid:1) and consider the 16-coloring c of the edgesof K R given by c ( { i, i } ) := c i,i ( { j, j } ) for every i < i ∈ R . Note that,because of the previous extractions, the choice of j, j does not matter, so c is well-defined. We take R as a subset of R given by Ramsey’s theorem. (cid:3) Finding k ! different k × k matrices when the grid rank is un-bounded. We recall that the order type ot( x, y ) of a pair ( x, y ) of elementsin a totally ordered set is equal to − x > y , 0 if x = y , and 1 if x < y .We also recall the definition of the matrices playing a central role in whatfollows. Definition 6.3.
Let k (cid:62) η : {− , } × {− , } → { , } .For every σ ∈ S k we define the k × k matrix F η ( σ ) = ( f i,j ) (cid:54) i,j (cid:54) k by settingfor every i, j ∈ [ k ]: f i,j := (cid:26) η (ot( σ − ( j ) , i ) , ot( j, σ ( i ))) if σ ( i ) = j − η (1 ,
1) if σ ( i ) = j Finally F η is the submatrix closure of { F η ( σ ) , σ ∈ S n , n (cid:62) } . These matrices generalize reorderings of matrices in N k . For example, wefind exactly the permutation matrices (reorderings of I k ) when η is constantequal to 0 and their complement when η is constant equal to 1. See Figure 6for more interesting examples of such matrices. Figure 6.
Left: 9 × M σ . Center:The matrix F η ( σ ) with η (1 ,
1) := 0 and η ( − , −
1) = η ( − ,
1) = η (1 , −
1) := 1. Right: The matrix F η ( σ ) with η (1 ,
1) = η ( − , −
1) := 1 and η ( − ,
1) = η (1 , −
1) := 0.With the next lemma, we get even cleaner universal patterns out of largerank Latin division.
Lemma 6.4.
Let k (cid:62) be an integer. Let M be a matrix with a rank- k Latin N -division with N := R ( q +1)16 ( k ) , q := (cid:0) n (cid:1) , and n := R ( k ) . Thenthere exists η : {− , } × {− , } → { , } such that the submatrix closureof M contains the set { F η ( σ ) | σ ∈ S k } . Proof.
Let ( R , C ) be the rank- k Latin N -division, with R := { R , . . . , R N } and C := { C , . . . , C N } , so that every row of R i (resp. column of C i ) issmaller than every row of R j (resp. column of C j ) whenever i < j . Let M i,j be the chosen contiguous submatrix of N k in R i ∩ C j for every i, j ∈ [ N ]. Werecall that, by definition of a rank Latin division, { rows( M i,j ) } i,j ∈ [ N ] parti-tions rows( M ) (resp. { cols( M i,j ) } i,j ∈ [ N ] partitions cols( M )) into intervals.We now consider the complete graph K N on vertex set [ N ] , and colorits edges with the function c : E ( K N ) → { , } defined as follows. Forevery ( i, j ) = ( i , j ) ∈ [ N ] (and say, i < i ), let a ∈ { , } be the constantentries in rows( M i,j ) ∩ cols( M i ,j ), and b ∈ { , } , the constant entries inrows( M i ,j ) ∩ cols( M i,j ). Then we define c (( i, j )( i , j )) := ( a, b ).We use Lemma 6.2 to find two sets R, C ∈ (cid:0) [ N ] k (cid:1) such that: (cid:12)(cid:12)(cid:8)(cid:0) c (( i, j )( i , j )) , c (( i, j )( i , j )) (cid:1) | i < i ∈ R, j < j ∈ C (cid:9)(cid:12)(cid:12) = 1 . Let η : {− , } × {− , } → { , } be such that ( η ( − , − , η (1 , ,η ( − , , η (1 , − ∈ { , } is the unique element of this set. (Note thatLemma 6.2 disregards the edges of E ( K N ) that are between vertices witha common coordinate.) In terms of the rank Latin division, it means thatfor every i < i ∈ R and j < j ∈ C , • cols( M i,j ) ∩ rows( M i ,j ) has constant value η ( − , − • rows( M i,j ) ∩ cols( M i ,j ) has constant value η (1 , • cols( M i ,j ) ∩ rows( M i,j ) has constant value η ( − , • rows( M i ,j ) ∩ cols( M i,j ) has constant value η (1 , − M i,j M i,j M i ,j M i ,j η ( − , − η (1 , η ( − , η (1 , − Figure 7.
How zones are determined by η , ot( i, i ), and ot( j, j ).In other words, rows( M i,j ) ∩ cols( M i ,j ) is entirely determined by η ,ot( i, i ), and ot( j, j ) (see Figure 7).Let σ ∈ S k . We now show how to find F η ( σ ) = ( f i,j ) (cid:54) i,j (cid:54) k as a submatrixof M . For every i ∈ [ k ], we choose a row r i ∈ rows( M i,σ ( i ) ) and a column c σ ( i ) ∈ cols( M i,σ ( i ) ) such that the entry of M at the intersection of r i and c σ ( i ) has value f i,σ ( i ) . This is possible since the submatrices M i,j are in N k and have disjoint row and column supports. We consider the k × k submatrix M of M with rows { r i | i ∈ [ k ] } and columns { c i | i ∈ [ k ] } .By design M = F η ( σ ) holds. Let us write M := ( m i,j ) (cid:54) i,j (cid:54) k and showfor example that if ot( σ − ( j ) , i ) = − j, σ ( i )) = 1 for some i, j ∈ [ k ],then we have m i,j = η ( − ,
1) = f i,j . The other cases are obtained in asimilar way. Let i := σ − ( j ) > i and j := σ ( i ) > j . In M , m i,j isobtained by taking the entry of M associated to the row r i of the matrix WIN-WIDTH IV: LOW COMPLEXITY MATRICES 27 M i,σ ( i ) = M i,j and the column c j of M σ − ( j ) ,j = M i ,j . The entry m i,j liedin M in the zone rows( M i,j ) ∩ cols( M i ,j ) with constant value η ( − , (cid:3) We now check that σ ∈ S k F η ( σ ) is indeed injective. Lemma 6.5.
For every k (cid:62) and η : {− , } × {− , } → { , } : |{ F η ( σ ) | σ ∈ S k }| = k ! Proof.
We let k (cid:62) η : {− , } × {− , } → { , } . The inequal-ity |{ F η ( σ ) | σ ∈ S k }| (cid:54) k ! simply holds. We thus focus on the converseinequality.When we read out the first row (bottom one) of F η ( σ ) = ( f i,j ) (cid:54) i,j (cid:54) k by increasing column indices (left to right), we get a possibly empty listof values η ( − , − η (1 ,
1) at position (1 , σ (1)), and apossibly empty list of values η (1 , j such that f ,j = f ,j +1 ,or j = k if no such index exists, thus corresponds to σ (1). We remove thefirst row and the j -th column and iterate the process on the rest of thematrix. (cid:3) We obtain that classes with subfactorial growth have bounded grid rankby piecing Lemmas 5.2, 6.4 and 6.5 together.
Theorem 6.6.
Every matrix class M satisfying |M k | < k ! , for some inte-ger k , has bounded grid rank.Proof. We show the contrapositive. Let M be a class of matrices withunbounded grid rank. We fix k (cid:62) , n := R ( k ) , N := R ( ( n ) +1)16 ( k ) . Now we let K := K ( N ) be the integer of Lemma 5.2 sufficient to get arank- N Latin division. As M has unbounded grid rank, it contains a ma-trix M with grid rank at least K . By Lemma 5.2, a submatrix ˜ M ∈ M of M admits a rank- N Latin division, from which we can extract a rank- k Latin N -division (since k (cid:54) N ). By Lemma 6.4 applied to ˜ M , there ex-ists η such that { F η ( σ ) | σ ∈ S k } ⊆ M k . By Lemma 6.5, this implies that |M k | (cid:62) k !. (cid:3) We just showed that for every matrix class of unbounded grid rank, forevery integer k , there is an η ( k ) : {− , } × {− , } → { , } such that n F η ( k ) ( σ ) | σ ∈ S k o ⊆ M k ⊆ M . As there are only 16 possible functions η ,the sequence η (1) , η (2) , . . . contains at least one function η infinitely often.Besides for every k < k , { F η ( σ ) | σ ∈ S k } is included in the submatrixclosure of { F η ( σ ) | σ ∈ S k } . Thus we showed the following more preciseresult. Corollary 6.7.
Let M be a matrix class with unbounded grid rank. Thenthere exists η : {− , } × {− , } → { , } such that: F η ⊆ M . Matchings in classes of ordered graphs with unboundedtwin-width
We now move to the world of hereditary classes of ordered graphs. In thislanguage, we will refine the lower bound on the slices of unbounded twin-width classes, in order to match the conjecture of Balogh, Bollobás, andMorris [3]. We will also establish that bounded twin-width, NIP, monadi-cally NIP, and tractable (provided that
FPT = AW [ ∗ ]) are all equivalent.7.1. NIP classes of ordered graphs have bounded twin-width.
Thefollowing lemma shows how to find encodings of matchings in classes of or-dered graphs with unbounded twin-width from the encodings of permutationmatrices described in section 6.2.A crossing function is a mapping η : {− , } × {− , } ∪ { (0 , } → { , } with η (1 , = η (0 , η be a crossing function, let n be an integer, andlet σ ∈ S n be a permutation. We say that an ordered graph G is an ( η, σ ) -matching if G has vertices u < · · · < u n < v < · · · < v n with u i v j ∈ E ( G )if and only if η (ot( σ − ( j ) , i ) , ot( j, σ ( i ))) = 1. The vertices u , . . . , u n and v , . . . , v n are respectively the left and the right vertices of G .Let λ, ρ : {− , } → { , } be two mappings. We define (cid:77) η,λ,ρ as thehereditary closure of the class of all ( η, σ )-matchings G with left vertices u < · · · < u n and right vertices v < · · · < v n , such that for every 1 (cid:54) i 0) = 1 and η ( x, y ) = 0 if ( x, y ) = (0 , λ and ρ defined by λ ( x ) = ρ ( x ) = 0. Lemma 7.1. Let (cid:67) be a hereditary class of ordered graphs with unboundedtwin-width. Then there exists a crossing function η , such that for everyinteger n and every permutation σ ∈ S n , the class (cid:67) contains an ( η, σ ) -matching.Proof. Let M be the submatrix closure of the set of adjacency matrices ofgraphs in (cid:67) , along their respective orders. M has unbounded twin-width(see last paragraph of Section 2.1), and hence unbounded grid rank. ByCorollary 6.7, there exists some function η : {− , } × {− , } → { , } suchthat F η ⊆ M . We may extend the domain of η to {− , }×{− , }∪{ (0 , } such that it has the desired property.Let σ ∈ S n be a permutation. Consider its associated matching permu-tation e σ ∈ S n defined by e σ ( i ) := ( σ ( i ) + n if i (cid:54) nσ − ( i − n ) if n + 1 (cid:54) i (cid:54) n. In other words M e σ consists of the two blocs M σ and M σ − on its anti-diagonal. We have F η ( e σ ) ∈ M , so there exists a graph H ∈ C such that WIN-WIDTH IV: LOW COMPLEXITY MATRICES 29 σ − ( j ) i j σ ( i ) λ (1) ρ (1) η (0 , η (0 , η (1 , η ( − , − i σ − ( j ) j σ ( i ) λ ( − ρ ( − η ( − , η (1 , − η (0 , η (0 , Figure 8. In red, the edges iσ ( i ) of the matching associatedto σ ∈ S n . On the top drawing, they are crossing, whereason the bottom one, they are non-crossing. In orange theother edges/non-edges encoded by functions λ, η, ρ . An edgeexists in the ordered graph if and only if its label equals 1. F η ( e σ ) is a submatrix of its adjacency matrix. Denote by U , U the (disjoint)ordered sets of vertices corresponding to the rows indexed respectively by { , . . . , n } and { n + 1 , . . . , n } , such that max( U ) < min( U ). Take simi-larly V , V associated to the columns indices. If max( U ) < min( V ) we let A = U and B = V ; otherwise, min( U ) > max( U ) (cid:62) min( V ) > max( V )and we let A = V and B = U . Then, if u < · · · < u n are the ele-ments of A and v < · · · < v n are the elements of B , we have u n < v and u i v j ∈ E ( H ) if and only if η (ot( σ − ( j ) , i ) , ot( j, σ ( i )) = 1. Hence we can let G = H [ A ∪ B ]. (cid:3) Let n be a positive integer, and let σ ∈ S n be a permutation. A coatingpermutation of σ is a permutation $ ∈ S m + n such that m (cid:62) • $ (1) < · · · < $ ( m ) = n + m , • the pattern of $ induced by [ m + 1 , m + n ] is σ , i.e., for every1 (cid:54) i < j (cid:54) n we have $ ( i + m ) < $ ( j + m ) if and only if σ ( i ) < σ ( j ).The m first vertices are the left coating vertices and their image by $ arethe right markers . Lemma 7.2. Let η be a crossing function, σ ∈ S n , a permutation, $ ∈ S n + m , a coating permutation of σ , and G , an ( η, $ ) -matching.Then the sets of left coating vertices, left vertices, right markers, rightvertices, and the matching involution between left coating vertices and rightmarkers are all first-order definable. Proof. Without loss of generality we assume η (0 , 0) = 1, for otherwise we canconsider 1 − η and the complement of G . In particular, we have η (1 , 1) = 0.Let u < · · · < u n + m (resp. v < · · · < v n + m ) be the left (resp. right)vertices of G . Let 1 (cid:54) i (cid:54) m . By assumption, if 1 < i < i then $ ( i ) < $ ( i ).Thus (contrapositive, with j = $ ( i )) if j > $ ( i ) then $ − ( j ) > i . As η (1 , 1) = 0, we deduce that no vertex v j with j > $ ( i ) is adjacent to u i . As η (0 , 0) = 1, the vertices u i and v $ ( i ) are adjacent. Hence v $ ( i ) is definable asthe maximum vertex adjacent to u i . Thus we deduce that (for 1 (cid:54) i (cid:54) m ): • the vertex u m is the minimum vertex adjacent to v n + m = max( V ( G ))(as $ ( n ) = n + m ); • the left vertices are the vertices that are less or equal to u m ; • the vertex v $ ( i ) matched to a left vertex u i is the maximum vertexadjacent to u i ; • a vertex v j is a right marker if and only if it is matched to a leftvertex, which is then the minimum vertex adjacent to v j ; • a vertex is a left vertex if it is smaller than v , and a right vertex,otherwise. (cid:3) Lemma 7.3. Let η be a crossing function with η (0 , 0) = η (1 , − 1) = 1 .There exists a simple interpretation I with the following property : If σ ∈ S n is a permutation, $ ∈ S n +1 is the coating permutation of σ defined by $ ( i ) := ( i − 1) + 1 if i (cid:54) n + 12 σ ( i − ( n + 1)) if i > n + 1 ,and G is an ( η, $ ) -matching, then I ( G ) is the ordered matching defined by σ .Proof. The set of left non-coating vertices and the set of right non-markervertices are definable according to Lemma 7.2. For a left non-coating vertex u n +1+ i , the matching vertex v σ ( i ) is the only right non-marker vertex suchthat the (right marker) vertex just before is non-adjacent to u n +1+ i and the(right marker) vertex just after is adjacent to u n +1+ i . (cid:3) Lemma 7.4. Let η be a crossing function with η (0 , 0) = η ( − , 1) = 1 .There exists a simple interpretation I with the following property : If σ ∈ S n is a permutation, $ ∈ S n +1 is the coating permutation of σ defined by $ ( i ) := ( i − 1) + 1 if i (cid:54) n + 12 σ ( i − ( n + 1)) if i > n + 1 ,and G is an ( η, $ − ) -matching, then I ( G ) is the ordered matching definedby σ .Proof. By interpretation we reverse the ordering of G . This way we get theordered graph G ∗ , which is an ( η ∗ , $ )-matching, where η ∗ ( x, y ) := η ( y, x ).We then apply the interpretation defined in Lemma 7.3. (cid:3) Lemma 7.5. Let η be the crossing function with η (0 , 0) = η ( − , − 1) = 1 ,and η ( x, y ) = 0 , otherwise.There exists a simple interpretation I with the following property : WIN-WIDTH IV: LOW COMPLEXITY MATRICES 31 If σ ∈ S n is a permutation, $ ∈ S n +2 is the only coating permutationof σ (with m = 2 ), and G is an ( η, $ ) -matching, then I ( G ) is the orderedmatching defined by σ .Proof. By Lemma 7.4, the non-coating left vertices and right non-markervertices are definable. Let u be a left non-coating vertex and let v be a rightnon-marker vertex. If v is to the left of the vertex v matched with v by σ then u and v are not adjacent as η (1 , 1) = η ( − , 1) = 0. Thus v is theminimum right non-marker vertex adjacent to u . (cid:3) Lemma 7.6. Let η be a crossing function and let (cid:67) be a class of orderedgraphs containing an ( η, σ ) -matching for every σ ∈ S n . Then there exists asimple interpretation T from (cid:67) onto (cid:77) . Moreover, every n -edge matchingis the interpretation of an ordered graph in (cid:67) with at most n + 2 vertices.Proof. This is a direct consequence of the preceding lemmas. (cid:3) We deduce: Theorem 7.7. There exists an interpretation I , such that for every heredi-tary class (cid:67) of ordered graphs with unbounded twin-width every graph is an I -interpretation of a graph in (cid:67) .Proof. As the class (cid:67) is hereditary, there exists a crossing function η suchthat for every permutation σ the class (cid:67) contains an ( η, σ )-matching. Thuswe can apply Lemma 7.6 to obtain, by interpretation, a superclass of (cid:77) .Before describing the interpretation of graphs in ordered matchings, weshow how the ordered matching M G corresponding to an ordered graph G is constructed.Let G be an ordered graph with vertices v < · · · < v n and edges e , . . . , e m . For i ∈ [ n ] and 1 (cid:54) j (cid:54) d( v i ) we define (cid:15) i,j as the index ofthe j th edge incident to v i . The left vertices of M G will be (in order) v , . . . , v n , x, e − , e , e , . . . , e m − , e m , e m + , and y . The right vertices of M G will be (in order) x , (cid:15) n, , . . . , (cid:15) n, d( v n ) , v n , . . . , (cid:15) , , . . . , (cid:15) , d( v n ) , v , y, e m , . . . , e .The matching M G matches v i and v i , x and x , y and y , e i and e i , and fi-nally (cid:15) i,j either with e (cid:15) i,j − or e (cid:15) i,j + , depending on whether v i is the smallestor biggest incidence of e (cid:15) i,j (see Figure 9).We now prove that there is a simple interpretation G , which reconstructs G from M G . First note that x is definable as the minimum vertex adjacentto a smaller vertex, and y is definable as the maximum vertex adjacent toa bigger vertex. Also, x is definable from x and y is definable from y . Nowwe can define v , . . . , v n to be the vertices smaller than x , ordered with theorder of M G . Two vertices v i < v j < x are adjacent in the interpretationif there exists an element e k > y adjacent to a vertex e k preceded in theorder by an element e k − and followed in the order by an element e k + withthe following properties: e k − is adjacent to a vertex z − strictly between theneighbor v i of v i and the neighbor of the successor of v i in the order and,similarly, e k + is adjacent to a vertex z + strictly between the neighbor v j of v j and the neighbor of the successor of v j in the order. (cid:3) Corollary 7.8. Every class (cid:67) of ordered graphs with unbounded twin-widthis independent. v v v v v e e e e e e e e e e e e yv v v v v x x (cid:48) y (cid:48) e (cid:48) e (cid:48) e (cid:48) e (cid:48) e (cid:48) e (cid:48) v (cid:48) v (cid:48) v (cid:48) v (cid:48) v (cid:48) Figure 9. Encoding of a graph in a matching. Theorem 7.9. There exists an interpretation I , such that for every (hered-itary) class M of , -matrices with unbounded twin-width every graph is an I -interpretation of a , -matrix in M .Proof. Assume M has unbounded twin-width. Then there exists a crossingfunction η such that F η ⊆ M .Let (cid:67) = (cid:77) η,λ,ρ where λ and ρ are constant functions equal to 0. Itfollows from Theorem 7.7 that there is an interpretation I such that everygraph is an I -interpretation of some graph in (cid:67) .Let P be the interpretation from 0 , E ( x, y ) as M ( x, y ). It is clear that (cid:67) = P ( F η ). Thus every graph is an I ◦ P -interpretation of a 0 , M . (cid:3) Corollary 7.10. Every class M of , -matrices with unbounded twin-widthis independent. Speed jump for classes of ordered graphs. As is, Lemma 7.1 isnot powerful enough to obtain the precise value of the speed jump betweenclasses of ordered graphs with bounded and unbounded twin-width, as wehave no information about edges in each part of the partition. The followinglemma fixes this issue. Lemma 7.11. Let (cid:67) be a hereditary class of ordered graphs. Assume thatfor every n (cid:62) and every induced matching M on n edges, there exists anordered graph G ∈ (cid:67) and a bipartition A, B of V ( G ) such that max A < min B , | A | = | B | = n , and G [ A, B ] is isomorphic to M .Then there is such a graph G further satisfying that adjacencies within A and B are determined by whether the incident edges of M cross or not. WIN-WIDTH IV: LOW COMPLEXITY MATRICES 33 Proof. Let n be an non-negative integer. We define n = R ( n ) , n = R n ( n ) , and n = R n ( n ) . We set A := [ n ] × [ n ] and B := [ n ] × [ n ], where for every integer k , k denotes a distinct copy of integer k . We consider the perfect matching( i, j ) − ( j, i ) between the sets A and B , and an ordered graph G ∈ (cid:67) containing it as a semi-induced subgraph.For 1 (cid:54) i < j (cid:54) n , we color the edge ij of K n by the isomorphismclass of graph G [ I i , I j ], where I i = { i } × [ n ] ⊆ A . Thus we have at most2 n colors. By Ramsey’s theorem, one can therefore find a monochromaticclique Z of size n in this colored K n . We denote by A the set S i ∈ Z I i ,and restrict B to the subset B of elements matched with A . Up to amonotone renaming, we get the perfect matching ( i, j ) − ( j, i ) between thesets A = [ n ] × [ n ] and B = [ n ] × [ n ]. We let J i = [ n ] × (cid:8) i (cid:9) ⊆ B andsimilarly find in B a union B of n sets J i such that for every J i , J j ∈ B , G [ J i , J j ] is in the same isomorphism class. Again we let A be the subset of A matched to B in M . Without loss of generality we end with a matching( i, j ) − ( j, i ) between two copies of [ n ] × [ n ].We now define a 4-coloring c A of the pairs j j ∈ (cid:0) [ n ]2 (cid:1) for 1 (cid:54) j < j (cid:54) n as follows: for every i < i ∈ [ n ] we let c A := ( ( i ,j )( i ,j ) ∈ E ( G ) , ( i ,j )( i ,j ) ∈ E ( G ) ) . By our previous extraction in A , this coloring is well defined (it does notdepend on the choice of i < i ). By Ramsey’s theorem, there is a subset I of [ n ] inducing a monochromatic clique of size n in K n . We restrict ourattention to A (3) := I × [ n ] ⊆ A and the set B (3) ⊆ B to which A (3) is matched. We perform the same extraction in B (3) and obtain B (4) suchthat for every i < i , j < j the adjacencies in G between ( i , j ) and( i , j ), and between ( i , j ) and ( i , j ) do not depend on the exact valuesof i , i , j , j . In turn we define A (4) as the subset of A (3) matched to B (4) .We thus extracted a matching ( i, j ) − ( j, i ) between two copies of [ n ] × [ n ].Then, given an arbitrary n − n matching M , we keep exactly one point ineach I i of A (4) and one matched point in each J j of B (4) , such that the pointsrealize M . More precisely if θ ∈ S n is the permutation associated to M ,we select in A (4) every vertex ( i, θ ( i )) and in B (4) every ( θ ( i ) , i ). Now theadjacencies within the left points and within the right points only dependon the fact that the two incident edges of the matching M cross. (cid:3) For the general case we introduce the coding function Code η associatedto a function η : {− , } × {− , } ∪ { (0 , } → { , } with η (1 , = η (0 , G be an ordered graph with vertex bipartition ( A, B ),max A < min B , | A | = | B | = n , and G [ A, B ] be the matching associatedto the permutation σ ∈ S n . We denote by u < · · · < u n the elements of A and by v < · · · < v n the elements of B . Then Code η ( G ) is the orderedgraph with vertex set A ∪ B , same linear order as G , same adjacencies as G within A and within B , and where u i ∈ A is adjacent to v j ∈ B if η (ot( σ − ( j ) , i ) , ot( j, σ ( i ))) = 1. It directly follows from Section 6.2 that thecoding function Code η is injective for all admissible η . Moreover, the nextproperty is immediate from the definition: Let G be an ordered graph as above, let A ⊆ A and B ⊆ B , where A is matched with B in G . ThenCode η ( G )[ A ∪ B ] = Code η ( G [ A ∪ B ]). Lemma 7.12. Let (cid:67) be a hereditary class of ordered graphs, and η be acrossing function. Assume that for every n (cid:62) and every induced matching M on n edges, there exists an ordered graph H with vertex bipartition ( A, B ) such that max A < min B , | A | = | B | = n , H [ A, B ] is isomorphic to M , and Code η ( H ) ∈ (cid:67) .Then we can further require that the adjacencies in H within A and B are determined by whether or not the incident edges of M cross.Proof. Let (cid:68) be the hereditary closure of the class of such ordered graphs H , when considering all possible matchings M . By Lemma 7.11, for everymatching M , we can find an ordered graph H ∈ (cid:68) and two subsets A and B of vertices with max A < min B , and H [ A , B ] isomorphic to M ,with the property that the adjacencies within A and B only depend onthe crossing/non-crossing property of the incident edges of M . As A ismatched with B , we have Code η ( H )[ A ∪ B ] = Code η ( H [ A ∪ B ]) thus, as (cid:67) is hereditary, Code η ( H [ A ∪ B ]) ∈ (cid:67) . As the adjacencies within A and B are not changed by Code η they only depend on the crossing/non-crossingproperty of the matching hidden by the coding function. (cid:3) As an immediate consequence we obtain the following: Theorem 7.13. There exist 256 hereditary classes of ordered graphs, namelythe (cid:77) η,λ,ρ , such that every hereditary class of ordered graphs with unboundedtwin-width includes at least one of these classes.Proof. Let (cid:67) be a hereditary class of ordered graphs with unbounded twin-width. Lemmas 7.1, 7.11 and 7.12 imply that there exist some crossingfunction η and some mappings λ, ρ : {− , } → { , } such that (cid:77) η,λ,ρ ⊆ (cid:67) .Observe that there are (at most) 256 classes (cid:77) η,λ,ρ ; one for each triple η, λ, ρ . (cid:3) We first draw some algorithmic consequence. Theorem 7.14. Assuming FPT = AW [ ∗ ] , FO -model checking is FPT on ahereditary class (cid:67) of ordered graphs if and only if (cid:67) has bounded twin-width.Proof. Assume (cid:67) has unbounded twin-width. We want to show that theexistence of a fixed-parameter algorithm A for first-order model checking on (cid:67) would imply the existence of such an algorithm on general (unordered)graphs. If AW [ ∗ ] = FPT then first-order model checking is not FPT forgeneral graphs, thus it is not FPT on (cid:67) .As (cid:67) has unbounded twin-width, there is a triple of mappings η ∗ , λ ∗ , ρ ∗ such that (cid:77) η ∗ ,λ ∗ ,ρ ∗ ⊆ (cid:67) . As we do not know η ∗ , λ ∗ , ρ ∗ , we define 256 algo-rithms A η,λ,ρ each of them using A as a subroutine. One of these algorithms(even if we cannot tell a priori which one) solves the general model checkingin fixed-parameter time.Let I be the interpretation of general graphs in (cid:77) and let J η,λ,ρ be theinterpretation of (cid:77) in (cid:77) η,λ,ρ , for every η, λ, ρ . Let G be any graph on n vertices. We can construct the ordered matching M ∈ (cid:77) such that I ( M ) = G in time O ( n ). Also in time O ( n ), we can build the 256 ordered graphs WIN-WIDTH IV: LOW COMPLEXITY MATRICES 35 H η,λ,ρ ∈ (cid:77) η,λ,ρ such that J η,λ,ρ ( H η,λ,ρ ) = M , hence G = I ◦ J η,λ,ρ ( H η,λ,ρ ).Moreover, | V ( H η,λ,ρ ) | = O ( n ).Say, we want to check G | = ϕ for some sentence ϕ in the language ofgraphs. There are 256 sentences ( I ◦ J η,λ,ρ ) ∗ ( ϕ ) such that G | = ϕ ⇔ H η,λ,ρ | =( I ◦ J η,λ,ρ ) ∗ ( ϕ ), for every λ, η, ρ . For each of the 256 triples η, λ, ρ , we define A η,λ,ρ as the algorithm which builds H η,λ,ρ and then runs A on the query H η,λ,ρ | = ( I ◦ J η,λ,ρ ) ∗ ( ϕ ).Among these 256 algorithms is A η ∗ ,λ ∗ ,ρ ∗ which runs in fixed-parametertime, and correctly solves first-order model checking for general graphs.Indeed if A runs in time f ( | φ | ) n c for some computable function f , then A η ∗ ,λ ∗ ,ρ ∗ runs in time O ( n + g ( | φ | ) n c ) for some computable function g .Now assume that (cid:67) has twin-width at most k . Let G ∈ (cid:67) . Usingthe fixed-parameter approximation algorithm of Theorem 1.2, we constructa 2 O ( k ) -sequence for G and then apply the FO -model checking algorithmpresented in [6]. (cid:3) Lowerbounding | ( (cid:77) η,λ,ρ ) n | . There is still a bit of work to get theexact value of P b n/ c k =0 (cid:0) n k (cid:1) k ! conjectured in [3] as a lower bound of the growth.We show how to derive this bound in each case of η, λ, ρ .We first observe some symmetries to reduce the actual number of cases. Lemma 7.15. For every η, λ, ρ , | ( (cid:77) η,λ,ρ ) n | = | ( (cid:77) − η, − λ, − ρ ) n | .Proof. We simply observe that (cid:77) − η, − λ, − ρ is the set of (ordered) comple-ments of graphs of (cid:77) η,λ,ρ . (cid:3) Lemma 7.16. For every η, λ, ρ , | ( (cid:77) η,λ,ρ ) n | = | ( (cid:77) − η,λ,ρ ) n | .Proof. We observe that (cid:77) − η,λ,ρ is the set of (ordered) bipartite comple-ments (that is, where one only flips the edges of the bipartition) of graphsof (cid:77) η,λ,ρ . (cid:3) Lemma 7.17. Let η be a crossing function. We define e η by e η ( x, y ) = η ( y, x ) .Then | ( (cid:77) η,λ,ρ ) n | = | ( (cid:77) e η,ρ,λ ) n | .Proof. The ordered graph corresponding to a permutation σ with the firstencoding is obtained from the graph corresponding to σ − in the secondencoding by reversing the linear order. (cid:3) Lemma 7.18. For every integer n (cid:62) , every σ ∈ S n and every mappings η, λ, ρ , (cid:77) η,λ,ρ contains both the encoding of σ by η, λ, ρ , and the same graphwhere all (non-)adjacencies between u i and the associated v σ ( i ) are flipped.Proof. Let σ + ∈ S n be the permutation defined as follows: For every i ∈ [ n ], σ + (2 i ) = 2 σ ( i ) and σ + (2 i − 1) = 2 σ ( i ) − 1. We encode σ + with η, λ, ρ and keep only the vertices corresponding to even indices on the left,and to odd vertices on the right. The ordered graph we obtain is the sameas the original encoding of σ , except that we flipped the adjacencies betweenthe matched vertices. As this new encoding of σ also is in (cid:77) η,λ,ρ , we canconclude. (cid:3) We observe that the graphs described in the previous lemma constitute avariant of encodings where η (0 , 0) is allowed to be equal to η (1 , Recall that the class (cid:77) of ordered matchings is defined as the one (cid:77) η,λ,ρ with λ = ρ = 0, and η ( x, y ) = 0 except η (0 , 0) = 1. We denote by (cid:77) theclass of ordered anti-matchings , that is the (cid:77) η,λ,ρ with λ = ρ = 1, and η ( x, y ) = 1 except η (0 , 0) = 0. For the classes of ordered matchings andanti-matchings, the bound we want to derive is actually tight. Lemma 7.19. | (cid:77) n | = | (cid:77) n | = P b n/ c k =0 (cid:0) n k (cid:1) k ! .Proof. We only show | (cid:77) n | = P b n/ c k =0 (cid:0) n k (cid:1) k !, as Lemma 7.15 implies that | (cid:77) n | = | (cid:77) n | . The (cid:0) n k (cid:1) factor accounts for the number of ways to positionthe 2 k matched vertices along n linearly-ordered vertices. The k ! countsthe number of ways to match, among the 2 k chosen vertices, the k leftmostones to the k rightmost ones. Every choice of matched vertices and partialmatching gives a distinct ordered graph. (cid:3) We now deal with λ or ρ not being constant. Lemma 7.20. If λ or ρ is not constant then | ( (cid:77) η,λ,ρ ) n | (cid:62) n ! (cid:62) P b n/ c k =0 (cid:0) n k (cid:1) k ! .Proof. Assume, without loss of generality, that λ is not constant. Let σ ∈ S n be any permutation. The permutation σ is encoded as an ordered graph G σ ∈ (cid:77) η,λ,ρ with vertex set [2 n ] using η, λ , and ρ . Let H σ ∈ (cid:77) η,λ,ρ be therestriction of G σ to [ n ]. As λ (1) = λ ( − 1) we can retrieve all the inversions of σ in [ n ] from the ordered graph H σ , thus we can retrieve σ as well. It followsthat σ H σ is an injection from S n into ( (cid:77) η,λ,ρ ) n hence | ( (cid:77) η,λ,ρ ) n | (cid:62) n !. (cid:3) Now we deal with the remaining cases. Lemma 7.21. For every encoding mappings η, λ, ρ such that λ and ρ areconstant, and either λ = ρ or λ takes value η (1 , , we have for every integer n (cid:62) , | ( (cid:77) η,λ,ρ ) n | (cid:62) b n c X k =0 n k ! k ! . Proof. We fix n (cid:62) η, λ, ρ . By Lemma 7.15, wemay assume that λ is constant with value 1.For every k ∈ [ n ], σ ∈ S k , and X ∈ (cid:0) [ n ]2 k (cid:1) , we partition X = A ] B into theset A = { a < · · · < a k } of its k smallest elements and B = { b < · · · < b k } the set of its k largest elements. We observe that b (cid:62) k + 1 since a , . . . , a k are k distinct integers in [ n ] all smaller than b . Our goal is to construct apermutation σ ( A,B ) ∈ S n − k , encoding that σ is applied precisely between A and B . We will partition [ n ] into two intervals: the vertices of index at most b − b . The permutation σ ( A,B ) matches A and B according to σ , and the rest of the vertices with “ancillary vertices”in a way that helps identifying the position of the “primary vertices” (thatis, vertices of A ] B ).We now detail the construction. For every i ∈ [ b − u i .These b − u < u < · · · < u b − , and form a setdenoted by U . For every i ∈ [ b , n ], we have a vertex v i . These n − b + 1vertices are ordered v b < v b +1 < · · · < v n , and form a set denoted by V . WIN-WIDTH IV: LOW COMPLEXITY MATRICES 37 We add, for every i ∈ [ b , n ] \ B , a vertex u i . These n − b + 1 − k verticesare ordered by increasing indices, and form a set called U . Finally we add,for every i ∈ [ b − \ A , a vertex v i . These b − − k vertices are orderedby increasing indices, and form a set called V . U := U ] U , V := V ] V with the total orders inherited from the ones on U, U , V, V and the relations max( U ) < min( U ) and max( V ) < min( V ).Moreover we order the set U ] V with the relation max( U ) < min( V ). Notethat all the vertices of U are “to the left” of all the vertices of V and thatboth these sets have n − k elements. The disjoint sets U and V may beidentified as a bipartition set [ n ]. In turn A and B may be identified as k -subsets of U and V , respectively. The sets U and V are extra verticesnecessary to match the vertices of V \ B and U \ A . Now we define thematching permutation σ ( A,B ) between U and V as follows: σ ( A,B ) ( u ) := v b σ ( j ) if u = u i with i = a j ∈ Av i if u = u i with i / ∈ Av i if u = u i . Intuitively this matching encodes σ between the copies of A and B in U and V , and matches U \ A to V , and U to V \ B , in an order-preservingfashion.Now we show that this encoding is injective, i.e., that for every k, k (cid:62) σ ∈ S k , σ ∈ S k σ , X = A ] B ∈ (cid:0) [ n ]2 k (cid:1) and X = A ] B ∈ (cid:0) [ n ]2 k (cid:1) , if M, M denote respectively the encodings under η, λ, ρ of σ ( A,B ) and σ ( A ,B ) , then M [ U ∪ V ] ≈ M [ U ∪ V ] ⇒ k = k , σ = σ , and ( A, B ) = ( A , B ) , where H ≈ H means that (ordered) graph H is isomorphic to (ordered)graph H . (Note that, as we presently deal with totally ordered graphs, theisomorphism is imposed by the linear orders and straightforward to find.)We consider M [ U ∪ V ] for an encoding M of σ ( A,B ) , and show that wecan deduce the values of k , σ , A and B from it. First we show that we canfind the maximum u b − of U by the assumptions made on the mappings η, λ, ρ . If λ is constant to η (1 , 1) = 1, then η (0 , 0) = 0 and u b − is thelargest vertex u of M [ U ∪ V ] which is adjacent with all the vertices w < u .If λ and ρ are constant with different values, then ρ = 0, and u b − is simplythe only vertex of M [ U ∪ V ] non-adjacent to its successor but adjacent toits predecessor, except in the very special case where max( A ) = b − a k is matched with min( B ) = b (i.e. σ ( k ) = 1).We now deal with this special case. If η ( − , 1) = 0, then u b − is themaximum vertex of U ] V forming a clique with all the vertices “to its left.”If η (1 , − 1) = 1, then u b − is the maximum vertex of U ] V not formingan independent set with the vertex “to its right.” The other cases reduce tothese two by Lemma 7.17.Hence we can identify u b − from the restriction M [ U ∪ V ] ∈ (cid:77) η,λ,ρ . If b − / ∈ A , then there is an edge between u b − and the vertices v i ∈ V whenever η (1 , 1) = 1, by construction of σ ( A,B ) . Otherwise if b − ∈ A ,then there is an edge between u b − and its image by σ , namely v b σ ( k ) ,whenever η (0 , 0) = 1 (hence η (1 , 1) = 0). Hence we can determine whetheror not b − A . Moreover when b − ∈ A , since u b − is the maximum of U , the adjacencies between u b − and every vertex v j with j < b σ ( k ) areall the same, determined by η (1 , v σ ( k ) . If we removeonly u b − in the first case, or u b − together with v b σ ( k ) in the second case,then we can iteratively determine all the sets A and B and uniquely buildthe permutation σ between them. Hence we proved the injectivity of ourencoding.This implies that there are P b n/ c k =0 (cid:0) n k (cid:1) k ! distinct such ordered graphs M [ U ∪ V ], which all belong to ( (cid:77) η,λ,ρ ) n , hence we get the desired result. (cid:3) We finally slightly tune the previous proof to cover the rest of the cases. Lemma 7.22. For every encoding mappings η, λ, ρ such that λ and ρ areconstant and equal, if η ( x, y ) = λ (1) for some x, y ∈ {− , } , then we havefor every n (cid:62) : | ( (cid:77) η,λ,ρ ) n | (cid:62) b n c X k =0 n k ! k ! . Proof. By Lemma 7.15, we may assume that λ = ρ = 1. If η (1 , 1) = 1, thenwe are done by Lemma 7.21. Thus we may safely assume that η (1 , 1) = 0.By Lemma 7.18, we will only consider ordered graphs obtained by removingthe possible edges at matched pairs from the encoding of η, λ, ρ .Now further assume that η (1 , − 1) = 1. We repeat the construction ofLemma 7.21 for every k (cid:62) σ ∈ S k and every pair ( A, B ), but this timewe “cut” earlier between the “left” and “right” vertices. We now want a k asthe maximum of U (and the minimum of V may not be in B ). Moreover,this time we place V to the left of V , that is, we let max( V ) < min( V ).Following the previous proof, we get the injectivity this time by “reading thematching from right to left.” Indeed if we consider v := max( V ), then either v / ∈ B and we detect it as it is adjacent to every other vertex, or v ∈ B andwe detect it as it is non-adjacent to some previous vertex. Moreover, thevertex it is matched to is the maximum vertex not adjacent to v . Hence wemay proceed as before.By Lemma 7.17 we are also done when η ( − , 1) = 1.Finally we assume that η ( − , − 1) = 1. We do the same construction asin Lemma 7.21 (cut between b − b ), and this time we place U tothe right of U and V to the left of V , i.e., we impose max( U ) < min( U )and max( V ) < min( V ). Similar arguments apply again, and we obtain theinjectivity by reading the vertices “from left to right.” (cid:3) We can now conclude. Theorem 7.23. For every η, λ, ρ and every n (cid:62) : | ( (cid:77) η,λ,ρ ) n | (cid:62) b n c X k =0 n k ! k ! Proof. By Lemmas 7.20 to 7.22, we are done unless λ and ρ are constant andequal, and η is constant on {− , } × {− , } with the opposite value to λ and ρ . By Lemma 7.15, we thus can assume that λ = ρ = 0, and η ( x, y ) = 1for every x, y ∈ {− , } . Now we apply the reduction of Lemma 7.16 andobtain the triple of mappings η, λ, ρ with λ = ρ = 0, and η ( x, y ) = 0 for every WIN-WIDTH IV: LOW COMPLEXITY MATRICES 39 x, y ∈ {− , } (thus η (1 , 1) = 0). This is the class of ordered matchings, sowe conclude by Lemma 7.19. (cid:3) We leave as an open question to exhibit a Ramsey-minimal family ofordered graph classes with unbounded twin-width. Acknowledgments. We thank Eunjung Kim, Jarik Nešetřil, SebastianSiebertz, and Rémi Watrigant for fruitful discussions. References [1] John T. Baldwin and Saharon Shelah. Second-order quantifiers and the complexityof theories. Notre Dame Journal of Formal Logic , 26(3):229–303, 1985.[2] József Balogh, Béla Bollobás, and Robert Morris. Hereditary properties of orderedgraphs. In Topics in discrete mathematics , pages 179–213. Springer, 2006.[3] József Balogh, Béla Bollobás, and Robert Morris. Hereditary properties of partitions,ordered graphs and ordered hypergraphs. Eur. J. Comb. , 27(8):1263–1281, 2006.[4] Édouard Bonnet, Colin Geniet, Eun Jung Kim, Stéphan Thomassé, and Rémi Wa-trigant. Twin-width III: Max Independent Set and Coloring. CoRR , abs/2007.14161,2020.[5] Édouard Bonnet, Colin Geniet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watri-gant. Twin-width II: small classes. In Proceedings of the 2021 ACM-SIAM Symposiumon Discrete Algorithms (SODA) , pages 1977–1996, 2021.[6] Édouard Bonnet, Eun Jung Kim, Stéphan Thomassé, and Rémi Watrigant. Twin-width I: tractable FO model checking. In ,pages 601–612. IEEE, 2020.[7] Josef Cibulka and Jan Kyncl. Füredi-hajnal limits are typically subexponential. CoRR , abs/1607.07491, 2016.[8] Marek Cygan, Fedor V Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx,Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms ,volume 4. Springer, 2015.[9] Guoli Ding, Bogdan Oporowski, James G. Oxley, and Dirk Vertigan. Unavoidableminors of large 3-connected binary matroids. J. Comb. Theory, Ser. B , 66(2):334–360, 1996.[10] Rodney G. Downey, Michael R. Fellows, and Udayan Taylor. The parameterized com-plexity of relational database queries and an improved characterization of W[1]. InDouglas S. Bridges, Cristian S. Calude, Jeremy Gibbons, Steve Reeves, and Ian H.Witten, editors, First Conference of the Centre for Discrete Mathematics and The-oretical Computer Science, DMTCS 1996, Auckland, New Zealand, December, 9-13,1996 , pages 194–213. Springer-Verlag, Singapore, 1996.[11] Kord Eickmeyer and Ken-ichi Kawarabayashi. Successor-invariant first-order logicon graphs with excluded topological subgraphs. In Jean-Marc Talbot and LaurentRegnier, editors, , volume 62 of LIPIcs , pages18:1–18:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2016.[12] Kord Eickmeyer and Ken-ichi Kawarabayashi. FO model checking on map graphs. In International Symposium on Fundamentals of Computation Theory , pages 204–216.Springer, 2017.[13] Kord Eickmeyer, Ken-ichi Kawarabayashi, and Stephan Kreutzer. Model checkingfor successor-invariant first-order logic on minor-closed graph classes. In , pages 134–142. IEEE Computer Society, 2013.[14] Kord Eickmeyer, Jan van den Heuvel, Ken-ichi Kawarabayashi, Stephan Kreutzer,Patrice Ossona de Mendez, Michal Pilipczuk, Daniel A. Quiroz, Roman Rabinovich,and Sebastian Siebertz. Model-checking on ordered structures. ACM Trans. Comput.Log. , 21(2):11:1–11:28, 2020. [15] Viktor Engelmann, Stephan Kreutzer, and Sebastian Siebertz. First-order andmonadic second-order model-checking on ordered structures. In Proceedings of the27th Annual IEEE Symposium on Logic in Computer Science, LICS 2012, Dubrovnik,Croatia, June 25-28, 2012 , pages 275–284. IEEE Computer Society, 2012.[16] Jakub Gajarský, Petr Hlinený, Jan Obdrzálek, Daniel Lokshtanov, and M. S. Ra-manujan. A new perspective on FO model checking of dense graph classes. In Pro-ceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science,LICS ’16, New York, NY, USA, July 5-8, 2016 , pages 176–184, 2016.[17] Jakub Gajarský and Daniel Kráľ. Recovering sparse graphs. In . SchlossDagstuhl–Leibniz-Zentrum für Informatik, 2018.[18] Jakub Gajarský, Stephan Kreutzer, Jaroslav Nesetril, Patrice Ossona de Mendez,Michal Pilipczuk, Sebastian Siebertz, and Szymon Toru’nczyk. First-order interpre-tations of bounded expansion classes. In ,pages 126:1–126:14, 2018.[19] Sylvain Gravier, Frédéric Maffray, Jérôme Renault, and Nicolas Trotignon. Ramsey-type results on singletons, co-singletons and monotone sequences in large collectionsof sets. Eur. J. Comb. , 25(5):719–734, 2004.[20] Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding first-order prop-erties of nowhere dense graphs. J. ACM , 64(3):17:1–17:32, 2017.[21] Benjamin Gunby and Dömötör Pálvölgyi. Asymptotics of pattern avoidance in theklazar set partition and permutation-tuple settings. Eur. J. Comb. , 82, 2019.[22] Petr Hliněn`y, Filip Pokr`yvka, and Bodhayan Roy. FO model checking on geometricgraphs. Computational Geometry , 78:1–19, 2019.[23] Russell Impagliazzo and Ramamohan Paturi. On the Complexity of k-SAT. J. Com-put. Syst. Sci. , 62(2):367–375, 2001.[24] Martin Klazar. The Füredi-Hajnal conjecture implies the Stanley-Wilf conjecture. In Formal power series and algebraic combinatorics , pages 250–255. Springer, 2000.[25] Martin Klazar. On growth rates of permutations, set partitions, ordered graphs andother objects. Electron. J. Comb. , 15(1), 2008.[26] Stephan Kreutzer, Michal Pilipczuk, Roman Rabinovich, and Sebastian Siebertz.The generalised colouring numbers on classes of bounded expansion. In Piotr Fal-iszewski, Anca Muscholl, and Rolf Niedermeier, editors, , volume 58 of LIPIcs , pages 85:1–85:13. Schloss Dagstuhl -Leibniz-Zentrum für Informatik, 2016.[27] Adam Marcus and Gábor Tardos. Excluded permutation matrices and the Stanley-Wilf conjecture. J. Comb. Theory, Ser. A , 107(1):153–160, 2004.[28] Frank P. Ramsey. On a problem of formal logic. In Proc. London Math. Soc. series2 , volume 30 of , 1930.[29] Detlef Seese. Linear time computable problems and first-order descriptions. Mathe-matical Structures in Computer Science , 6(6):505–526, 1996.[30] Pierre Simon and Szymon Toruńczyk. personal communication. 2020.[31] Jan van den Heuvel, Stephan Kreutzer, Michal Pilipczuk, Daniel A. Quiroz, RomanRabinovich, and Sebastian Siebertz. Model-checking for successor-invariant first-orderformulas on graph classes of bounded expansion. In32nd Annual ACM/IEEE Sym-posium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23,2017