On the Staircases of Gyárfás

In a 2011 paper, Gyárfás investigated a geometric Ramsey problem on convex, separated, balanced, geometric K n,n. This led to appealing extremal problem on square 0-1 matrices. Gyárfás conjectured that any 0-1 matrix of size n × n has a staircase of size n − 1. We introduce the non-symmetric version of Gyárfás' problem. We give upper bounds and in certain range matching lower bound on the corresponding extremal function. In the square/balanced case we improve the (45+)n lower bound of Cai, Gyárfás et al. to 5n6 − 712. We settle the problem when instead of considering maximum staircases we deal with the sum of the size of the longest 0-and 1-staircases.


Introduction
It is well-known (an early remark of Erdős and Rado, nowadays a standard introductory exercise in graph theory courses) that in any red/blue edge coloring of the complete graph a monochromatic spanning tree is guaranteed.It was in 1998 when Károlyi, Pach and Tóth [4] proved the geometric version of this fact: We take n independent points on the plane, connect all the pairs with a line segment, and color them arbitrarily with red and blue colors.Then a non-crossing monochromatic spanning tree is guaranteed.
the electronic journal of combinatorics 23(2) (2016), #P2.17 The bipartite case of the original graph theoretical question is easy: If we red/blue color the edges of K n,n (the balanced complete bipartite graph) then the largest monochromatic tree has at least n vertices if n is even and n + 1 if n is odd.Furthermore this bound is optimal, certain coloring doesn't contain a larger monochromatic tree.
The beautiful theorem from [4] led Gyárfás [3] to consider the geometric problem when the underlying graph is a complete bipartite graph: Take any 2n points in convex position on the plane.Assume that a line separates them into two groups of n points.Connect all crossing pairs with a line segment and color them arbitrarily with red/blue colors.What is the size (i.e. the number of vertices) of the largest non-crossing monochromatic tree that you can guarantee?It is conjectured in [2] that the answer is n, if n > 1.
The above/graph version of the basic question can be easily transformed to a matrix version as it was done in [2].
Let M be a 0-1 matrix.A 0-staircase is a sequence {s i } i=1 of zeroes in M such that s i+1 is either to the right of s i in the same row, or it is below s i in the same column (i = 1, 2, . . ., − 1).(We emphasize that s i and s i+1 do not have to be neighbouring elements in M .)A 1-staircase is defined similarly on ones of M .M is a homogeneous staircase in M iff it is either a 0-or a 1-staircase.The length of a homogeneous staircase S is the number of elements in it, we denote it as S .S can be viewed as S − 1 steps, where the steps can be right steps or down steps, formed by the consecutive elements of S.An element of S is a turning point, if it is involved in two steps with different directions.turn(S) denotes the number of turns in S. For example turn(S) = 0 iff S includes identical elements from a row, or from a column.turn(S) = 1 iff the steps of S are some horizontal (staying in the same row) steps followed by some vertical steps or vice versa.In the first case we say that S is a ⌝-staircase.The first elements forming the horizontal steps will be referred as the horizontal hand of our ⌝-staircase.The last block of elements that form the vertical steps will be referred as the vertical hand of our ⌝-staircase.In the second case we say that S is a ⌞-staircase.We can use the notation of horizontal/vertical hands in this case too.
It turns out that the above-mentioned conjecture is equivalent to the following: Conjecture 1 (Gyárfás' Conjecture).Any 0-1 matrix of size n×n contains a homogeneous staircase of size n − 1.
Let st(M ) be the maximum among the lengths of the homogeneous staircases of M .Let st 0 (M ) (resp.st 1 (M )) be the maximum among the lengths of the homogeneous 0-staircases (resp.1-staircases) of M .Hence st(M ) = max{st 0 (M ), st 1 (M )}.
We define a symmetric and an asymmetric version of the original Ramsey-type question.
In the asymmetric case it is obvious that st(n, N ) = st(N, n).We always assume that N ≥ n.
The Gyárfás' conjecture states that st(n) ≥ n − 1.Since [2] contains an easy example that shows st(n) ≤ n − 1 (assuming n > 1) we can state Gyárfás' conjecture as st It is natural to introduce Cai, Grindstaff, Gyárfás and Shull stated a conjecture concerning the function st Σ (n) (see [1]), that turned out to be false (see the final remark in [2], the journal version of [1]).In section 2 we determine the exact value of st Σ (n, N ).In section 3 we deal with st(n, N ).We present two constructions (hence we give upper bounds on st(n, N )).We conjecture that our matrices gives the right value of st(n, N ).Our conjecture is consistent with Gyárfás' conjecture.We will be able to prove our conjecture in certain range.Unfortunately the case of square and "near-square" matrices is still unsolved.
In the final section we give a significant improvement of the 4 5 n bound in [3] (as opposed to the one in [2]).We are going to prove the following theorem.
2 The exact value of st Σ (n, N ) We start with an easy construction.
Construction 3. Let P (n,N ) ∈ {0, 1} n×N be the matrix, where we have The following two examples help to understand the formalism: Note that the 0's form two triangular regions in our matrix (in the upper left and the lower right corners).Because of our convention (n ≤ N ) there is no 0-staircase that contains 0's from both triangular regions.Hence the following fact is easy: and so We are going to prove a matching lower bound on st Σ (M ) for any M ∈ {0, 1} n×N .
Theorem 5.For any n ≤ N , Proof.Let M ∈ {0, 1} n×N arbitrary.Take the elements of the first column, that give the majority of this column.We can assume that they have the common value 1.Let a be the position of the lowest 1 in the first column.The number of 1's at and above a is at least ⌈ n 2 ⌉.Let S 1 the ⌞-staircase centered at a. Let S 2 the staircase formed by the 0's in the row of a.It is easy to see that This observation proves the theorem.

An upper bound for asymmetric matrices
In this section we give an upper bound on st(n, N ).We will easily see that our bound is the truth for "wide" enough matrices.(The sharpness of the bound has been validated by computer for a few additional dimensions, too, but only for small n and N values.) We exhibit two constructions.They correspond to two different ranges of shapes.
The ⌈n 2⌉-th column, i.e. the column of the rightmost 1 in the upper left corner, precedes the column of the first 1 of the last row.(This can be seen by verifying that ) This means that every 1-staircase that starts from the upper left triangle, can only leave this triangle with a right step; which implies that if we translate this triangle of 1's to the right without overlapping any other 1's, the maximal length of 1-staircases does not decrease.We can translate this triangle to the right by ⌊ ⌈n 2⌉+N −1 2 ⌋ positions (the width of the upper parallelogram of 0's) without overlapping.It is easy to check that in the obtained matrix Q, all the 1's lies in the region Since in a staircase each step increases i + j, the sum of the "coordinates" of the actual position, it is obvious that there is no 1-staircase in Q with length greater than ⌈ ⌈n 2⌉+N −1  Construction 9.For n < N < ⌊ 5 2 n⌋ − 1, we define the matrix R (n,N ) as follows: Let R (n,N ) i,j = 1 iff one of the following three possibilities holds: 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 The reader should check that ⌉ is always equal to N , and the conditions imply that ⌋, as the above example suggests.After doing this and reading the proof of Claim 7, it should be straightforward to verify the following: 4 Improved lower bound, the proof of Theorem 2 Let M be an arbitrary 0-1 matrix of size n × n.Let a 1 be the last element of the first row.
Without loss of generality we can assume that a 1 = 1.Let a 2 be the last 0 in the first row.Let a 3 be the top 0 (the 0 with the least first/row index) in the last column.Let a 4 denote the element/position in the intersection of the column of a 2 and the row of a 3 .It is possible that a 2 is not well defined (the first row does not contain any 0).Since in this case Gyárfás' conjecture is obviously true we assume that a 2 (and a 3 as well) is well defined.
The summary of our notations, with some references to future parameters.
Observation 12.If a 4 = 0 then Gyárfás' conjecture is true for our matrix.
Proof.We consider two staircases: (1) The one that is formed by the 1's in the first row and the 1's in the last column.
(2) The one that is formed by the 0's of the first row, a 4 , the 0's above and on its right side of a 4 , and the 0's of the last column.The staircase described in ( 1) is a 1-staircase, and (2) defines a 0-staircase.
The highlighted elements just show the shape of the staircase.For the staircase we must consider only the elements with the same value as the turning points have.
It is easy to check that the sum of the length of the above two staircases is at least 2n.Hence the longer one proves the conjecture.
In the rest of the proof we assume that a 4 = 1.Let S i denote the ⌝-staircase centered at a i (i = 1, 2, 3, 4).Let s i = S i .
where x 1 denotes the number of 1's in the first row before a 2 , y 0 denotes the number of 0's in the column of a 2 between a 2 and a 4 , z 0 denotes the number of 0's in the row of a 3 between a 4 and a 3 , and w 1 denotes the number of 1's in the last column under a 3 .
Proof.s 1 , the number of 0's in the horizontal hands of S 2 , and the number of 0's in the vertical hands of S 3 add up to 2n − 1. s 4 , the number the number of 0's before a 4 , and the number of 0's under a 4 (these 0's are counted in s 2 and s 3 ) add up to the number of the shaded positions in the figure of S 4 .The second s 1 term counts the 1's in last block of 1's of the first row and the 1's in the top block of 1's of the last column.The considered contribution of the sum of length give us 2n − 2.
It is easy to see that the not counted contribution of the staircases gives us the last four terms on the right hand side.
We can repeat the same argument with exchanging the role of rows and columns.Then the role of a 1 will be played by the last element of the first column (i.e. the first element of the last row).Let a be the value of this element.a denotes 1 − a.
x ′ a many a's ⋯ the electronic journal of combinatorics 23(2) (2016), #P2.17 All previous notations can be introduced in this setting (we use the same letters and a ′ to distinguish from the originals).Our previous observation leads to The order of magnitude of Gyárfás' original bound is already proven by our observations.We see some additional terms too, but the usage of them requires a case analysis.Case 1: s 1 + s ′ a ≥ 2n − 2. In this case the longer of S 1 and S 1 ′ proves Gyárfás' conjecture and we are done.Case 2: S 1 is a ⌝-staircase, s 1 is its size.Let s − 1 denote the size of the horizontal hand of S 1 , and let s 1 denote the size of its vertical hand.We introduce similar notation for its symmetric pair, the staircase, broken at the left bottom element of M (its size is denoted by s a ′ ). Since Without loss of generality we can assume, that s It is obvious that we are guaranteed to have a column in our matrix that has a 0 in the first/top position, a 5 and has an a at the last/bottom position, a 6 .In the next picture we shaded this column and extended it to a staircase shape with further shaded positions (we are talking about staircase SHAPE, not about staircase!): We define two staircases among the shaded elements.We distinguish two subcases: Subcase 1: 0 = a.Let S 5 be the sequence of shaded 0's and let S 6 be the 1's of the shaded column.Subcase 2: 0 = a.Let S 5 be a ⌝-staircase centered at a 5 , and Let S 6 be a ⌞-staircase centered at a 6 .
We investigated 10 staircases.A weighted average of their length is at least 1 12(10n−7) = 5n 6 − 7 12.So the longest staircase in our proof proves the theorem.
the electronic journal of combinatorics 23(2) (2016), #P2.17 Remark 14.Before we started the main streamline of the proof we excluded a 4 = 0 (and later we also excluded a 4 ′ = a).There, we used staircases S such that turn(S) = 3.All the other staircases in our proof have turning points at most 2.So our theorem can be stated in a stronger form: Any M ∈ {0, 1} n×n contains a staircase that has length at least 5n 6 − 7 12, and it has at most 3 turning points.
Gyárfás exhibited an example that shows that his 4n 5 cannot be improved if we use only staircases with at most 1 turning point.
We do not know any bound for the case when we are allowed to use only staircases with at most 2 turning points.
1's.The last ⌊n 2⌋ rows are defined analogously: the triangle in the lower right corner has leg length ⌊n 2⌋, and the parallelogram of 1's has the same width as the parallelogram of 0's above.