A Relationship between Generalized Davenport-schinzel Sequences and Interval Chains

Let an (r, s)-formation be a concatenation of s permutations of r distinct letters, and let a block of a sequence be a subsequence of consecutive distinct letters. A k-chain on [1, m] is a sequence of k consecutive, disjoint, nonempty intervals of the form [a 0 , a 1 ][a 1 + 1, a 2 ]. .. [a k−1 + 1, a k ] for integers 1 a 0 a 1 <. .. < a k m, and an s-tuple is a set of s distinct integers. An s-tuple stabs an interval chain if each element of the s-tuple is in a different interval of the chain. Alon et al. (2008) observed similarities between bounds for interval chains and Davenport-Schinzel sequences, but did not identify the cause. We show for all r 1 and 1 s k m that the maximum number of distinct letters in any sequence S on m + 1 blocks avoiding every (r, s + 1)-formation such that every letter in S occurs at least k + 1 times is the same as the maximum size of a collection X of (not necessarily distinct) k-chains on [1, m] so that there do not exist r elements of X all stabbed by the same s-tuple. Let D s,k (m) be the maximum number of distinct letters in any sequence which can be partitioned into m blocks, has at least k occurrences of every letter, and has no subsequence forming an alternation of length s. Nivasch (2010) proved that D 5,2d+1 (m) = Θ(mα d (m)) for all fixed d 2. We show that D s+1,s (m) = m−− s 2 s 2 for all s 2. We also prove new lower bounds which imply that D 5,6 (m) = Θ(m log log m) and D 5,2d+2 (m) = Θ(mα d (m)) for all fixed d 3.


Introduction
for even s 4 with t = s−2 2 . Pettie [12] proved that λ 5 (n) = Θ(nα(n)2 α(n) ) and that λ s (n) = n2 1 t! α(n) t ±O(α(n) t−1 ) for odd s 7 with t = s−3 2 . In [10], similar bounds were also derived for a different sequence extremal function. Let an (r, s)-formation be a concatenation of s permutations of r distinct letters. For example abcddcbaadbc is a (4, 3)-formation. Define F r,s (n) to be the maximum length of any r-sparse sequence with n distinct letters which avoids all (r, s)-formations.
Nivasch's bounds on λ s (n) were derived using an extremal function which maximizes number of distinct letters instead of length. Let D s,k (m) be the maximum number of distinct letters in any sequence on m blocks avoiding alternations of length s such that every letter occurs at least k times. Clearly D s,k (m) = 0 if m < k and D s,k (m) = ∞ if k < s−1 and k m. Nivasch proved that Ψ s (m, n) k(D s,k (m)+n) [10], where Ψ s (m, n) denotes the maximum possible length of any sequence on m blocks with n distinct letters that avoids alternations of length s.
Nivasch also proved that D 5,2d+1 (m) = Θ(mα d (m)) for each fixed d 2 (but noted that the bounds on D 5,k (m) were not tight for even k). Sundar [15]  in terms of m on functions related to the Deque conjecture.
Let F r,s,k (m) be the maximum number of distinct letters in any sequence on m blocks avoiding every (r, s)-formation such that every letter occurs at least k times. Clearly F r,s,k (m) = 0 if m < k and F r,s,k (m) = ∞ if k < s and k m. Every (r, s)-formation contains an alternation of length s + 1 for every r 2, so D s+1,k (m) F r,s,k (m) for every r 2. Nivasch proved that Ψ r,s (m, n) k(F r,s,k (m) + n) [10], where Ψ r,s (m, n) denotes the maximum possible length of any sequence on m blocks with n distinct letters that avoids every (r, s)-formation.
Similar bounds were also derived on an extremal function related to interval chains. A k-chain on [1, m] is a sequence of k consecutive, disjoint, nonempty intervals of the form [a 0 , a 1 ][a 1 + 1, a 2 ] . . . [a k−1 + 1, a k ] for integers 1 a 0 a 1 < . . . < a k m. An s-tuple is a set of s distinct integers. An s-tuple stabs an interval chain if each element of the s-tuple is in a different interval of the chain.
Let ζ s,k (m) denote the minimum size of a collection of s-tuples such that every k-chain on [1, m] is stabbed by an s-tuple in the collection. Clearly ζ s,k (m) = 0 if m < k and ζ s,k (m) is undefined if k < s and k m.
Let η r,s,k (m) denote the maximum size of a collection X of not necessarily distinct k-chains on [1, m] so that there do not exist r elements of X all stabbed by the same s-tuple. Clearly η r,s,k (m) = 0 if m < k and η r,s,k (m) = ∞ if k < s and k m.
In Section 2 we show that η r,s,k (m) = F r,s+1,k+1 (m+1) for all r 1 and 1 s k m. Proof. Let X be a collection of k-chains on [1, m] so that there do not exist 2 elements of X that are stabbed by the same s-tuple. Then by the pigeonhole principle, |X| is the minimum possible size of a collection Y of s-tuples such that every k-chain in X is stabbed by an s-tuple in Y .
The last lemma and the equality in Section 2 imply that D s+2,k+1 (m + 1) ζ s,k (m) for all 1 s k m. This implies that D s+1,s (m) m− s In Section 3 we construct alternation-avoiding sequences to prove lower bounds on D s,k (m). We prove that D s+1,s (m) = m− s  2 Proof that F r,s+1,k+1 (m + 1) = η r,s,k (m) We show that F r,s+1,k+1 (m + 1) = η r,s,k (m) for all r 1 and 1 s k m using maps like those between matrices and sequences in [4] and [11].
Proof. Let P be a sequence with F r,s+1,k+1 (m + 1) distinct letters and m + 1 blocks 1, . . . , m + 1 such that no subsequence is a concatenation of s + 1 permutations of r different letters and every letter in P occurs at least k + 1 times. Construct a collection of k-chains on [1, m] by converting each letter in P to a k-chain: if the first k + 1 occurrences of letter a are in blocks a 0 , . . . , a k , then let a * be the k- Suppose for contradiction that there exist r distinct letters q 1 , . . . , q r in P such that q * 1 , . . . , q * r are stabbed by the same s-tuple 1 j 1 < . . . < j s m. Let j 0 = 0 and j s+1 = m + 1. Then for each 1 i s + 1, q n occurs in some block b n,i such that b n,i ∈ [j i−1 + 1, j i ] for every 1 n r. Hence the letters q 1 , . . . , q r make an (r, s + 1)formation in P , a contradiction.
The bounds on ζ s,k (m) in [3] imply the next corollary.
To prove that F r,s+1,k+1 (m + 1) η r,s,k (m) for all r 1 and 1 s k m, we convert collections of k-chains into sequences with a letter corresponding to each k-chain.
Proof. Let X be a maximal collection of k-chains on [1, m] so that there do not exist r elements of X all stabbed by the same s-tuple. To change X into a sequence P create a letter a for every k-chain a * in X, and put a in every block i such that either a * has an interval with least element i or a * has an interval with greatest element i − 1.
Order the letters in blocks starting with the first block and moving to the last. Let L i be the letters in block i which also occur in some block j < i and let R i be the letters which have first occurrence in block i.
All of the letters in L i occur before all of the letters in R i . If a and b are in L i , then a appears before b in block i if the last occurrence of a before block i is after the last occurrence of b before block i. The letters in R i may appear in any order.
P is a sequence on m + 1 blocks in which each letter occurs k + 1 times. Suppose for contradiction that there exist r letters q 1 , . . . , q r which form an (r, s + 1)-formation in P . List all (r, s + 1)-formations on the letters q 1 , . . . , q r in P lexicographically, so that formation f appears before formation g if there exists some i 1 such that the first i − 1 elements of f and g are the same, but the i th element of f appears before the i th element of g in P .
the electronic journal of combinatorics 22 (3) (2015), #P3.19 Let f 0 be the first (r, s + 1)-formation on the list and let π i (respectively ρ i ) be the number of the block which contains the last (respectively first) element of the i th permutation in f 0 for 1 i s + 1. We claim that π i < ρ i+1 for every 1 i s. Suppose for contradiction that for some 1 i s, π i = ρ i+1 . Let a be the last letter of the i th permutation and let b be the first letter of the (i + 1) st permutation.
Then a occurs before b in block π i and the b in π i is not the first occurrence of b in P , so the a in π i is not the first occurrence of a in P . Otherwise a would appear after b in π i . Since the a and b in π i are not the first occurrences of a and b in P , then the last occurrence of a before π i must be after the last occurrence of b before π i . Let f 1 be the subsequence obtained by deleting the a in π i from f 0 and inserting the last occurrence of a before π i . Since the last occurrence of a before π i occurs after the occurrence of b in the i th permutation of f 0 , f 1 is also an (r, s + 1)-formation. Moreover, f 1 occurs before f 0 on the list. This contradicts the definition of f 0 , so for every 1 i s, π i < ρ i+1 .
For every 1 j r and 1 i s + 1, the letter q j appears in some block between ρ i and π i inclusive. Since π i < ρ i+1 for every 1 i s, the s-tuple (π 1 , . . . , π s ) stabs each of the interval chains q * 1 , . . . , q * r , a contradiction. Hence P contains no (r, s + 1)formation.
The idea for the next lemma is similar to a proof about doubled formation free matrices in [4]. Proof. Let P be a sequence with m blocks such that no subsequence of P is a concatenation of s permutations of r distinct letters and every letter of P occurs at least s times. An occurrence of letter a in P is called even if there are an odd number of occurrences of a to the left of it. Otherwise the occurrence of a is called odd.
Suppose for contradiction that P has at least 1 + (r − 1) m− s   Proof. For every s 1 and m s + 1 we build a sequence X s (m) with m− s 2 s 2 distinct letters. First consider the case of even s 2. The sequence X s (m) is the concatenation of m − 1 fans, so that each fan is a palindrome consisting of two blocks of equal length.
First assign letters to each fan without ordering them. Create a letter for every s 2 -tuple of non-adjacent fans, and put each letter in every fan in its s 2 -tuple. Then order the letters in each fan starting with the first fan and moving to the last. Let L i be the letters in fan i which occur in some fan j < i and let R i be the letters which have first occurrence in fan i.
In the first block of fan i all of the letters in L i occur before all of the letters in R i . If a and b are in L i , then a occurs before b in the first block of fan i if the last occurrence of a before fan i is after the last occurrence of b before fan i. If a and b are in R i , then a occurs before b in the first block of fan i if the first fan which contains a without b is before the first fan which contains b without a.
Consider for any distinct letters x and y the maximum alternation contained in the subsequence of X s (m) restricted to x and y. The maximum alternation is constructed starting with a fan that contains only x, and successively adding adjacent fans. Any other fans which contain x without y or y without x add at most 1 to the alternation length. Any fans which contain both x and y add 2 to the alternation length. If x and y occur together in i fans, then the length of their alternation is at most ( s  Proof. Let P be a sequence with F 2,s,k (m) distinct letters and m blocks such that no subsequence is a concatenation of s permutations of two distinct letters and every letter occurs at least k times. P is the sequence obtained from P by creating r − 1 new letters a 1 , . . . , a r−1 for each letter a and replacing every occurrence of a with the sequence a 1 . . . a r−1 . Suppose for contradiction that P contains an (r, s)-formation on the letters q 1 , . . . , q r . Then there exist indices i, j, k, l and distinct letters a, b such that q i = a j and q k = b l . P contains a (2, s)-formation on the letters q i and q k , so P contains a (2, s) formation on the letters a and b, a contradiction. Then P is a sequence with (r − 1)F 2,s,k (m) distinct letters and m blocks such that no subsequence is a concatenation of s permutations of r distinct letters and every letter occurs at least k times. The proof of the next theorem is much like the proof that D 5,2d+1 (m) = Ω( 1 d mα d (m)) for d 2 in [10]. The only substantial difference is the base case. 1, we inductively construct sequences G d (m) in which each letter appears 2d + 2 times and no two distinct letters make an alternation of length 5. This proof uses a different definition of fan: fans will be the concatenation of two palindromes with no letters in common. Each palindrome consists of two blocks of equal length.
For d, m 1 the blocks in G d (m) containing only first and last occurrences of letters are called special blocks. Let S d (m) be the number of special blocks in G d (m). Every letter has its first and last occurrence in a special block, and each special block in G d (m) has m letters.
Blocks that are not special are called regular. No regular block in G d (m) has special blocks on both sides, but every special block has regular blocks on both sides.
The sequences G 1 (m) are the concatenation of m + 1 fans. In each fan the second block of the first palindrome and the first block of the second palindrome make one block together since they are adjacent and have no letters in common. The first palindrome in the first fan and the second palindrome in the last fan are empty.
There is a letter for every pair of fans and the letter is in both of those fans. The letters with last appearance in fan i are in the first palindrome of fan i. They appear in fan i's first palindrome's first block in reverse order of the fans in which they first appear. The letters with first appearance in fan i are in the second palindrome of fan i. They appear in fan i's second palindrome's first block in order of the fans in which they last appear. For example, the sequence G 1 (4) is isomorphic to the following sequence, such that () denotes special block boundaries  For all d 1 the sequence G d (1) is defined to consist of 2d + 2 copies of the letter 1. The first and last copies of 1 are both special blocks, and there are empty regular blocks before the first 1 and after the last 1.
The sequence G d (m) for d, m 2 is constructed inductively from G d (m − 1) and G d−1 (S d (m − 1)). Let f = S d (m − 1) and g = S d−1 (f ). Make g copies X 1 , . . . , X g of G d (m − 1) and one copy Y of G d−1 (f ), so that no copies of G d (m − 1) have any letters in common with Y or each other.
Let Q i be the i th special block of Y . If the l th element of Q i is the first occurrence of the letter a, then insert aa right after the l th special block of X i . If the l th element of Q i is the last occurrence of a, then insert aa right before the l th special block of X i . Replace Q i in Y by the modified X i for every i. The resulting sequence is G d (m).
. We bound X d (m) and V d (m) as in [10]. Then X 1 (m) = 3 for all m, X d (1) = d + 2 for all d 2, and X d (2) = 2d + 1 for all . We prove by induction on d that X d (m) 2d + 2 for all m, d 1. Observe that the inequality holds for X 1 (m), X d (1), and X d (2) for all m, d.
Fix d and suppose
We use interpolation to extend the bound from m i to m. Let i and t satisfy m i m < m i+1 and t = m m i . Concatenate t copies of G 2 (i) with no letters in common for a total of at least m m i n i = Ω(m log log m) letters. Hence D 5,6 (m) = Ω(m log log m).