Bounds on parameters of minimally non-linear patterns

Let $ex(n, P)$ be the maximum possible number of ones in any 0-1 matrix of dimensions $n \times n$ that avoids $P$. Matrix $P$ is called minimally non-linear if $ex(n, P) = \omega(n)$ but $ex(n, P') = O(n)$ for every strict subpattern $P'$ of $P$. We prove that the ratio between the length and width of any minimally non-linear 0-1 matrix is at most $4$, and that a minimally non-linear 0-1 matrix with $k$ rows has at most $5k-3$ ones. We also obtain an upper bound on the number of minimally non-linear 0-1 matrices with $k$ rows. In addition, we prove corresponding bounds for minimally non-linear ordered graphs. The minimal non-linearity that we investigate for ordered graphs is for the extremal function $ex_{<}(n, G)$, which is the maximum possible number of edges in any ordered graph on $n$ vertices with no ordered subgraph isomorphic to $G$.


Introduction
A 0-1 matrix M contains a 0-1 matrix P if some submatrix of M either equals P or can be turned into P by changing some ones to zeroes. Otherwise M avoids P . The function ex(n, P ) is the maximum number of ones in any 0-1 matrix of dimensions n × n that avoids P .
The function ex(n, P ) has been used for many applications, including resolving the Stanley-Wilf conjecture [10] and bounding the maximum number of unit distances in a convex n-gon [4], the complexity of algorithms for minimizing rectilinear path distance while avoiding obstacles [11], the maximum linear 0-1 matrices contained in the class. This conjecture was confirmed in [6], without actually constructing an infinite family of minimally non-linear 0-1 matrices.
There are only seven minimally non-linear 0-1 matrices with 2 rows.
In this paper, we bound the number of minimally non-linear 0-1 matrices with k rows for k > 2. In order to obtain upper bounds for this number, we bound the ratio between the length and width of a minimally non-linear 0-1 matrix. We also investigate similar problems for sequences and ordered graphs.
In Section 2, we bound the lengths as well as the number of minimally non-linear sequences with k distinct letters. These bounds are easier to obtain than the bounds on minimally non-linear 0-1 matrices and ordered graphs, since they rely mainly on the fact that every minimally non-linear sequence not isomorphic to ababa must avoid ababa.
In Section 3, we bound the number of minimally non-linear 0-1 matrices with k rows. We also prove that the ratio between the length and width of a minimally non-linear 0-1 matrix is at most 4 and that a minimally nonlinear 0-1 matrix with k rows has at most 5k − 3 ones. In Section 4, we find corresponding bounds for extremal functions of forbidden ordered graphs.

Minimally non-linear patterns in sequences
A sequence u contains a sequence v if some subsequence of u is isomorphic to v. Otherwise u avoids v. If u has r distinct letters, then the function Ex(u, n) is the maximum possible length of any sequence that avoids u with n distinct letters in which every r consecutive letters are distinct.
Like the extremal function ex(n, P ) for forbidden 0-1 matrices, Ex(u, n) has been used for many applications in combinatorics and computational geometry. These applications include upper bounds on the complexity of lower envelopes of sets of polynomials of bounded degree [2], the complexity of faces in arrangements of arcs with a limited number of crossings [1], and the maximum possible number of edges in k-quasiplanar graphs on n vertices with no pair of edges intersecting in more than t points [3,16].
Minimal non-linearity for Ex(u, n) is defined as for ex(n, P ). Only the sequences equivalent to ababa, abcacbc, or its reversal are currently known to be minimally non-linear, but a few other minimally non-linear sequences are known to exist [15].
In order to bound the number of minimally non-linear sequences with k distinct letters, we bound the length of such sequences in terms of the extremal function Ex(ababa, k), which satisfies Ex(ababa, k) ∼ 2kα(k) [8,12].
In the next proof, we use a well-known fact about the function Ex(u, n) [8]: If u is a linear sequence and u ′ is obtained from u by inserting the letter a between two adjacent occurrences of a in u, then u ′ is linear. Lemma 1. The maximum possible length of a minimally non-linear sequence with k distinct letters is at most 2 Ex(ababa, k).
Proof. First we claim that there is no immediate repetition of letters greater than 2 in a minimally non-linear sequence. Suppose for contradiction that there is a minimally non-linear sequence u with a repetition of length at least 3.
Remove one of the letters in the repetition and get u ′ . By definition u ′ is linear, but then inserting the letter back still gives a linear sequence by the well-known fact stated before this lemma, a contradiction.
If u is not isomorphic to ababa, then the number of segments of repeated letters in u is at most Ex(ababa, k) because u avoids ababa. Thus u has length at most 2 Ex(ababa, k) since each segment has length at most 2.
Corollary 2. The number of minimally non-linear sequences with k distinct letters is at most 2k Ex(ababa,k) Proof. The number of segments of repeated letters is at most Ex(ababa, k). Each segment can be filled with one of at most k letters, with length 1 or 2, with no adjacent segments having the same letters.
Thus there are at most 2k choices for the first segment and at most 2k − 2 choices for the remaining segments. So the number of such sequences is bounded by 2k

Minimally non-linear patterns in 0-1 matrices
Although the existence of infinitely many minimally non-linear 0-1 matrices was proved in [6], only finitely many minimally non-linear 0-1 matrices have been identified. It is an open problem to identify an infinite family of minimally non-linear 0-1 matrices.
In this section, we prove an upper bound of 4k−2 i=⌈(k+2)/4⌉ (i k − (i − 1) k )k i−1 on the number of minimally non-linear 0-1 matrices with k rows. In order to obtain this bound, we first show that any minimally non-linear 0-1 matrix with k rows has at most 4k − 2 columns. Next, we bound the number of minimally non-linear 0-1 matrices with k rows and c columns. We prove this bound by showing that no column of a minimally non-linear 0-1 matrix has multiple ones after leftmost ones are removed from each row, unless the matrix is the 2 × 2 matrix of all ones, 1 0 1 0 1 1 , or its reflection over a horizontal line.
In order to bound the ratio between the length and width of any minimally non-linear 0-1 matrix, we use a few well-known lemmas about 0-1 matrix extremal functions. These facts are proved in [5,17].
1. If P has two adjacent ones x and y in the same row in columns c and d, and P ′ is obtained from P by inserting a new column between c and d with a single one between x and y and zeroes elsewhere, then ex(n, P ) ≤ ex(n, P ′ ) ≤ 2 ex(n, P ).
2. If P ′ is obtained by inserting columns or rows with all zeroes into P , then ex(n, P ′ ) = O(ex(n, P ) + n).
The next theorem shows that a minimally non-linear 0-1 matrix must not be more than four times longer than it is wide. The greatest known ratio between the length and width of a minimally non-linear 0-1 matrix is 2 for the matrix 1 0 1 0 0 1 0 1 . Proof. Since the lemma holds for 1 0 1 0 0 1 0 1 and its reflections, suppose that P is a minimally non-linear 0-1 matrix with k rows that is not equal to 1 0 1 0 0 1 0 1 or its reflections.
Let P ′ be obtained by scanning through the columns of P from left to right. The first column of P ′ has a one only in the first row where the first column of P has a one. For i > 1, the i th column of P ′ has a one only in the first row where the i th column of P has a one and where the (i − 1) st column of P ′ does not have a one, unless the i th column of P only has a single one. If the i th column of P only has a single one in row r, then the i th column of P ′ has a one only in row r.
The reduction produces a 0-1 matrix with a single one in each column. Let each of the rows 1, . . . , k of P and P ′ correspond to a letter a 1 , . . . , a k , and construct a sequence S from P ′ so that the i th letter of S is a j if and only if P ′ has a one in row j and column i.
By definition |S| equals the number of columns of the minimally nonlinear pattern P . There cannot be 3 adjacent same letters in S, because any 3 adjacent same letters implies a column in P with a single 1 and the immediate right and left neighbors of the 1-entry being 1 as well, which would imply that P is not minimally non-linear. Also S avoids abab because otherwise P contains 1 0 1 0 0 1 0 1 or its reflection, which are non-linear. So This shows that the ratio of width over height of a minimally non-linear matrix is between 0.25 and 4.
Using the bound that we obtained on the number of columns in a minimally non-linear 0-1 matrix with k rows, next we prove that the number of ones in a minimally non-linear 0-1 matrix with k rows is at most 5k − 3. Note that any minimally non-linear 0-1 matrix with k rows has at least k ones since it has no rows with all zeroes.
In order to bound the number of ones in a minimally non-linear 0-1 matrix with k rows, we first prove a more general bound on the number of ones in a minimally non-linear 0-1 matrix with k rows and c columns, assuming that it is not the 2 × 2 matrix of all ones.
Lemma 5. The number of ones in any minimally non-linear 0-1 matrix with k rows and c columns, besides the 2×2 matrix of all ones, is at most k +c−1.
Proof. The result is true for Q = 1 0 1 0 1 1 , so suppose that P is a minimally non-linear 0-1 matrix with k rows that is not equal to Q, its reflectionQ over a horizontal line, or the 2 × 2 matrix R of all ones. Then P must avoid Q, Q, and R.
If P has k rows and c columns, then remove the first one in each row to obtain a new matrix P ′ . Matrix P ′ cannot have any column with multiple ones, since otherwise P would contain Q,Q, or R. Thus P ′ has at most c − 1 ones since the first column has no ones, so P has at most k + c − 1 ones. Corollary 6. The number of ones in any minimally non-linear 0-1 matrix with k rows is at most 5k − 3.
Proof. Suppose that the minimally non-linear 0-1 matrix P has k rows and c columns. Since c ≤ 4k − 2, matrix P has at most 5k − 3 ones.
Using the bound on the number of columns in a minimally non-linear 0-1 matrix with k rows, combined with the technique that we used to bound the number of ones in a minimally non-linear 0-1 matrix with k rows, we prove an upper bound on the number of minimally non-linear 0-1 matrices with k rows.
Corollary 7. For k > 2, the number of minimally non-linear 0-1 matrices with k rows is at most In a minimally non-linear 0-1 matrix with k rows and i columns, there are at most i k − (i − 1) k possible combinations of leftmost ones that can be deleted in each row, because having all leftmost ones in the rightmost i − 1 columns implies that the first column is empty, which is impossible. After leftmost ones are deleted in each row, each column except the first has at most a single one. If a column has no one removed, then it stays non-empty with k possibilities. If a column has at least a one removed, say in the second row, then it cannot become a column with a one in the second row. In either case, every column except for the first has at most k possibilities, leaving at most k i−1 possible matrices. Moreover there are between ⌈(k + 2)/4⌉ and 4k − 2 columns in a minimally non-linear 0-1 matrix with k rows.

Minimally non-linear patterns in ordered graphs
In this section, we prove bounds on parameters of minimally non-linear ordered graphs. The definitions of avoidance, extremal functions, and minimal non-linearity for ordered graphs are analogous to the corresponding definitions for 0-1 matrices.
If H and G are any ordered graphs, then H avoids G if no subgraph of H is order isomorphic to G. The extremal function ex < (n, G) is the maximum possible number of edges in any ordered graph with n vertices that avoids G.
Past research on ex < has identified similarities with the 0 − 1 matrix extremal function ex. For example, Klazar and Marcus [9] proved that ex < (n, G) = O(n) for every ordered bipartite matching G with interval chromatic number 2. This is analogous to the result of Marcus and Tardos [10] that ex(n, P ) = O(n) for every permutation matrix P . Weidert also identified several parallels between ex < and ex [19], including linear bounds on extremal functions of forbidden tuple matchings with interval chromatic number 2. These bounds were analogous to the linear bounds for tuple permutation matrices that were proved in [6].
In order to prove results about minimally non-linear ordered graphs, we use two lemmas about ex < (n, G). The first is from [19]: If G ′ is created from G by inserting a single vertex v of degree one between two consecutive vertices that are both adjacent to v's neighbor, then ex < (n, G ′ ) ≤ 2 ex < (n, G).
The second lemma and its proof is by Gabor Tardos via private communication [18]. Lemma 9. [18] If G ′ is an ordered graph obtained from G by adding an edgeless vertex, then ex < (n, G ′ ) = O(ex < (n, G) + n).
Proof. For simplicity assume the new isolated vertex in G ′ is neither first nor last. Let H ′ be an ordered graph avoiding G ′ . Take uniform random sample R of the vertices of H ′ , then select a subset S of R deterministically by throwing away the second vertex from every pair of consecutive vertices in V (H ′ ) if both of them were selected in R. Now S is a subset of vertices without a consecutive pair, so H = H ′ [S] avoids G, since you can stick in a vertex between any two wherever you wish. Now every edge of H ′ has a minimum of 1/16 chance of being in H except the edges connecting neighboring vertices, which have no chance. Thus w(H ′ ) < 16E[w(H)] + n and we are done.
Most of the results that we prove in this section about minimal nonlinearity for the extremal function ex < are analogous to the results that we proved in the last section about minimal non-linearity for the 0-1 matrix extremal function ex. First we prove that the number of edges in any minimally non-linear ordered graph with k vertices is at most 2k − 2. Since there are no singleton vertices in a minimally non-linear ordered graph, there is a lower bound of k/2 on the number of edges.
Theorem 10. Any minimally non-linear ordered graph with k vertices has at most 2k − 2 edges.
Proof. For a 0-1 matrix P , define G o (P ) to be the family of all bipartite ordered graphs with a unique decomposition into two independent sets that form a 0-1 matrix equivalent to P when the vertices in each set are arranged in either increasing or decreasing order as columns and rows with edges corresponding to ones. Then every element of G o 1 0 1 is non-linear for ex < , since 1 0 1 0 1 1 and 1 1 1 1 are non-linear for ex and any ordered graph with interval chromatic number more than 2 is non-linear for ex < [19].
The lemma is true for every element of G o 1 0 1 0 1 1 ∪ G o 1 1 1 1 , so let G be a minimally non-linear ordered graph that is not equal to any Thus G avoids every element of G o 1 0 1 where v j is the smallest number t such that (v i , t) ∈ E(G). There are at most k − 1 such edges. The resulting graph G ′ cannot have both edges (v i , v k ) and (v j , v k ) for any node v k . Because if it does, then there are The next result is analogous to the ratio bound for 0-1 matrices in Theorem 4, except rows and columns are replaced by the parts of a bipartite ordered graph.
Theorem 11. Any minimally non-linear bipartite ordered graph with k vertices in one part has at most 4k − 2 vertices in the other part.
Proof. Given a minimally non-linear bipartite ordered graph G, without loss of generality assume that the first part U has k nodes. For each node v i in the second part V , we choose a neighbor in the first part using a process analogous to the one that we used for 0-1 matrices: if v i has only one neighbor then pick it, otherwise pick the smallest neighbor different from what we pick for v i−1 .
Now we get a sequence with k distinct elements without any repetition of length more than 2 because otherwise G is not minimally non-linear. The sequence cannot be longer than 2 Ex(abab, k) = 4k−2, or else it would contain some element in G o 1 0 1 0 0 1 0 1 , which has all elements non-linear.
Next we obtain an upper bound of k − 1 on the number of edges in minimally non-linear bipartite ordered graphs with k vertices unless the underlying graph is K 2,2 . This bound is half the upper bound for minimally non-linear ordered graphs in Theorem 10. The lemma that we use to obtain this bound is analogous to Lemma 5, which we used to bound the number of ones in minimally non-linear 0-1 matrices.
Lemma 12. The number of edges in any minimally non-linear bipartite ordered graph with w vertices in one part and h vertices in the other part, besides ordered graphs whose underlying graph is K 2,2 , is at most w + h − 1.
Proof. The result is clear if G is an element of G o 1 0 1 0 1 1 , so suppose that G is a minimally nonlinear bipartite ordered graph that is not an element For each node u ∈ U, remove the edge (u, v) ∈ E(G) with the smallest possible v ∈ V , no matter whether u > v or u < v. So we remove exactly |U| edges.
Each v k ∈ V in the resulting graph G ′ has at most one neighbor. If it has more, say (u a , v k ), (u b , v k ), then there are v i and v j , which could be identical, Corollary 13. The number of edges in any minimally non-linear bipartite ordered graph with k total vertices is at most k − 1 unless the underlying graph is K 2,2 , and the number of edges in any minimally non-linear bipartite ordered graph with k vertices in one part is at most 5k − 3.
Corollary 14. For k > 2, the number of minimally non-linear bipartite ordered graphs with k nodes in one part is at most 4k−2

Open Problems
We proved bounds for the following problems, but none of these problems are completely resolved. (b) Characterize all minimally non-linear ordered graphs with k vertices.

Acknowledgments
CrowdMath is an open program created by the MIT Program for Research in Math, Engineering, and Science (PRIMES) and Art of Problem Solving that gives high school and college students all over the world the opportunity to collaborate on a research project. The 2016 CrowdMath project is online at http://www.artofproblemsolving.com/polymath/mitprimes2016. The authors thank Gabor Tardos for proving that if G ′ is an ordered graph obtained from G by adding an edgeless vertex, then ex < (n, G ′ ) = O(ex < (n, G) + n).