A note on a Ramsey-type problem for sequences

Two sequences {xi}i=1 and {yi}i=1 of distinct integers are similar if their entries are order-isomorphic. Let f(r,X) be the length of the shortest sequence Y such that any r-coloring of the entries of Y yields a monochromatic subsequence that is also similar to X. In this note we show that for any fixed non-monotone sequence X, f(r,X) = Θ(r2), otherwise, for a monotone X, f(r,X) = Θ(r).


Introduction
We consider the following Ramsey-type question.We say that two sequences {x i } t i=1 and {y i } t i=1 of distinct integers are similar if their entries are order-isomorphic, i.e., x i < x j if and only if y i < y j for all 1 i < j t.For a given sequence X and a positive integer r a sequence Y is Ramsey for X if for every r-coloring of the entries of Y there is a subsequence of Y which is both monochromatic and similar to X. Denote by f (r, X) the length of the shortest sequence Y that is Ramsey for X, i.e., where the minimum is taken over all Ramsey sequences for X.Moreover, let where the maximum is taken over all sequences X with |X| = t.
Frankl, Rödl and the author [3] asked to determine for a fixed t the order of magnitude of f (r, t) as a function of r.Here we show that f (r, t) = Θ(r 2 ).Indeed, we give a stronger result identifying the asymptotic behavior of f (r, X) for every X.
(ii) Let X be a non-monotone sequence.Then (The hidden constants depend only on X.) It is also worth mentioning that the proof shows that for each t there is a (universal) sequence Y of length O(r 2 ) which is Ramsey for every sequence X of length t and any number of colors r.Furthermore, the entries of such Y colored by the majority color contain a subsequence similar to X.

Proof of Theorem 1
For (i) it is enough to observe that (1, 2, . . ., r|X|) is Ramsey for (1, 2, . . ., |X|), and similarly, (r|X|, . . ., 2, 1) is Ramsey for (|X|, . . ., 2, 1).Now we prove (ii).First we show the lower bound.The proof is based on the Erdős-Szekeres [4] theorem which says that any sequence S of length m contains a monotone subsequence of length √ m .It is not difficult to observe (see, e.g., [1,8]) that the repetitive application of this result shows that S can be partitioned into at most 2 √ m monotone subsequences.For the sake of completeness we prove a similar result here.
Let X be any sequence of length t which is non-monotone.Assume that Y is Ramsey for X.We show that |Y | > r 2 2 .Suppose not, i.e., |Y | r 2 2 .We will repeatedly apply the Erdős-Szekeres theorem.We start with Y of length a 0 = |Y | r 2 2 and find a monotone subsequence of length √ a 0 .Then we remove it from Y obtaining a sequence of length a 1 = a 0 − √ a 0 and repeat the whole process again.After the i-th step the length of the remaining sequence is given by the recursive formula Let N be the least integer for which a N = 0. We show that N r.First observe that for each i < N , we have a i 1 and and consequently, and after at most r steps we end up with an empty sequence.Summarizing, we just found a decomposition of Y into at most r monotone subsequences.Now we color each monotone subsequence with a different color.Since X is non-monotone, there is no monochromatic subsequence similar to X, a contradiction.
Next we show the upper bound.First we need some notation.Let A and P be 0-1 matrices.We say that A contains the t × t matrix P = (p i,j ) if there exists a t × t submatrix B = (b i,j ) of A with b i,j = 1 whenever p i,j = 1.Otherwise we say that A avoids P .Notice that we can delete rows and columns of A to obtain the submatrix B but we cannot permute the remaining rows and columns.Given a permutation π of t elements its permutation matrix is the t × t matrix P π = (p i,j ) whose entries are all 0 except that in column i, the entry π(i) equals 1, i.e., the only non-zero entries are p π(i),i .
We will use the following result conjectured by Füredi and Hajnal [6] and proved by Marcus and Tardos [7].Let P be a permutation matrix.Denote by g(P, m) the maximum number of ones in a 0-1 matrix of size m × m avoiding P .Then, due to Marcus and Tardos [7], there exists a positive constant c = c(P ) such that g(P, m) cm. ( Let X be a given sequence of t different integers.(Here non-monotonicity is not required.)Without loss of generality we may assume that X is a permutation of {1, . . ., t}.Let P X be the corresponding permutation matrix and let c = c(P X ) be as in (1) yielding g(P X , m) cm. ( . Now let us arbitrarily color the elements of Y with r colors.We need to show that there is a monochromatic subsequence in Y that is similar to X. Clearly, every coloring of Y uniquely induces a coloring of the entries of A Y .Choose the most frequent color, say red, and let A = (a ij ) be the 0-1 matrix of size m × m whose entries correspond to it.That means a ij = 1 if and only if the ij-entry in A Y is colored red.The key observation is the following: if A does not avoid P X , then Y contains a monochromatic subsequence similar to X.By ( 3) and ( 2), we get that the number of ones in A is at least m 2 r > cm g(P X , m).
Hence, A does not avoid P X .This completes the proof of (ii).

Concluding remarks
It may be of some interest to study f (r, t) in more detail.Theorem 1 implies that for some positive constants c 1 = c 1 (t) and c 2 = c 2 (t).For the sake of simplicity we did not attempt to optimize theses constants.The proof gives c 1 = 1 4 and this constant can be improved to 1  2 by using a result of Brandstädt and Kratsch [2].On the other hand, c 2 is entirely based on the result of Marcus and Tardos [7] and so is exponential in t (see also a result of Fox [5]).
It would be also interesting to consider a similar question and study the growth of f (r, t) for a fixed r and large t.
For only two colors it is not difficult to see that Indeed, let X = {x i } t i=1 be any sequence.Without loss of generality we may assume that X is a permutation of {0, . . ., t − 1}.For the upper bound let us define Y = Y (1) Y (2) . . .Y (t) , where Y (i) = (tx i + x 1 , tx i + x 2 , . . ., tx i + x t ) for 1 i t.Now let us arbitrarily color the entries of Y with two colors.Since each Y (i) is similar to X, we may assume that there is no monochromatic Y (i) .Thus, there is a monochromatic subsequence (y 1 , y 2 , . . ., y t ) such that y i ∈ Y (i) for 1 i t.It is easy to see that such (y 1 , y 2 , . . ., y t ) is similar to X. Consequently, Y is Ramsey for X and f (2, X) |Y | = t 2 .
To see the lower bound of (4) consider X = 1, 2, . . ., t 2 , t, t − 1, . . ., t 2 + 1 .Let Y be any Ramsey sequence for X.Clearly, Y must contain many subsequences similar to Z = 1, 2, . . ., t 2 ).Starting with Y 0 = Y , we find a subsequence similar to Z and remove it obtaining Y 1 (of length |Y | − t 2 ).We repeatedly continue the process of removing subsequences similar to Z until we cannot longer find a subsequence similar to Z. Let m denote the number of steps and Y m be the remaining sequence.Now we color Y m blue and Y \ Y m red.Since Y m contains no subsequence similar to Z, there is no blue subsequence similar to X in Y .Therefore, there must be a red subsequence in Y which is similar to X.In particular, there is a red subsequence similar to X \ Z. Since Y \ Y m is a disjoint union of m (increasing) sequences similar to Z, each of these m subsequences can contain at most one element of the (decreasing) sequence X \ Z.Thus, m t − t 2 = t 2 and so By recursively extending the above construction one can get an upper bound for any r 2 and show that f (r, t) t r .( For example, for r = 3 and a permutation X = {x i } t i=1 of {0, . . ., t − 1} it is enough to take Y = Y (1) Y (2) . . .Y (t) , where The lower bound in (4) and the upper bound in (5) imply that for a fixed r 2 Ω(t 2 ) = f (r, t) = O(t r ).
Determining the right order of magnitude of f (r, t) as a function of t remains open. 1 Now we define a sequence Y which is a permutation of {1, . . ., m 2 }.Let Y be the following matrix of size m × m based on Y .The first m elements of Y form the first column in A Y in reverse order.The next m elements of Y form the second column in A Y in reverse order, etc.Thus, the electronic journal of combinatorics 21(3) (2014), #P3.45LetA x 1 , t 2 x i + tx 1 + x 2 , . . ., t 2 x i + tx 1 + x t , t 2 x i + tx 2 + x 1 , t 2 x i + tx 2 + x 2 , . . ., t 2 x i + tx 2 + x t , . . . . . . . . . . . .t 2 x i + tx t + x 1 , t 2 x i + tx t + x 2 , . . ., t 2 x i + tx t + x t ), for 1 i t.Observe that Y is Ramsey for X.Hence, f (3, X) |Y | = t 3 .