# What Do a Longest Increasing Subsequence and a Longest Decreasing Subsequence Know about Each Other?

^{*}

## Abstract

**:**

## 1. Introduction

**Theorem**

**1.**

## 2. Results

**Theorem**

**2.**

**Proof.**

**Necessity**of the condition (1) immediately follows from the theorem of Erdős–Szekeres. Assume that the condition (1) is not satisfied, i.e., $x\xb7y\le n-1$, then, according to the Erdős–Szekeres theorem, the sequence T of length n contains a monotone increasing subsequence of the length $x+1$ or a monotone decreasing subsequence of the length $y+1$, which contradicts the hypothesis of the theorem. The violation of the condition (2) makes impossible the existence of two subsequences with specified lengths, one of which increases, while the other decreases. In fact, these two subsequences can have no more than one element in common; that is, the sum of their lengths should not exceed $n+1$.

**Sufficiency**. Assume that $x\xb7y\ge n$ and $x+y\le n+1$, and build a sequence T of length n, such that $x=lis\left(T\right),y=lds\left(T\right)$. This sequence is built according to the following scheme. We take a sequence of n natural numbers $1,2,\dots ,n$ and divide it into x groups, in such a way that $T=Concatenation({T}_{1},{T}_{2},\dots ,{T}_{x})$ and satisfies the following conditions:

- The numbers in each group are arranged in decreasing order.
- All the numbers of a subsequent group are greater than all the numbers of a preceding group.
- The first group consists of y elements: $y,y-1,y-2,\dots ,1$, which is possible by the condition $y<n$.
- We divide the remaining $n-y$ elements into $x-1$ groups as follows. Let $p=\u230a{\displaystyle \frac{n-y}{x-1}}\u230b$ and $r=(n-y)mod(x-1)$. Note that $p=\u230a{\displaystyle \frac{n-y}{x-1}}\u230b\ge \u230a{\displaystyle \frac{x-1}{x-1}}\u230b=1$ and $0\le r<x-1$. The first r groups represent decreasing subsequences ${T}_{2},\dots ,{T}_{r+1}$ of the length $p+1$:${T}_{2}=\{y+p+1,y+p,y+p-1,\dots ,y+1\}$…${T}_{r+1}=\{y+r(p+1),y+r(p+1)-1,\dots ,y+r(p+1)-p\}$.The last $x-r-1$ groups represent decreasing subsequences ${T}_{r+2},\dots ,{T}_{x}$ of length p. (If $r=0$, then all $x-1$ decreasing subsequences have the length p):${T}_{r+2}=\{y+r(p+1)+p,y+r(p+1)+p-1,\dots ,y+r(p+1)+1\}$,…${T}_{x}=\{n,n-1,n-2,\dots ,n-p+1\}.$

**Claim**

**1.**

**Proof.**

**Example**

**1.**

**Remark**

**1.**

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Erdős, P.; Szekeres, G. A combinatorial problem in geometry. Compositio Mathematica
**1935**, 2, 463–470. [Google Scholar] - Bukh, B.; Sevekari, A. Linear orderings of combinatorial cubes. arXiv
**2019**, arXiv:1906.118669. [Google Scholar] - Deorowich, S. On Some Variants of the Longest Increasing Subsequence Problem. Theor. Appl. Inform.
**2009**, 21, 135–148. [Google Scholar] - Gottlieb, E.; Sheard, M. Erdős-Szekeres results for set partitions. Integers 15
**2015**, 8, A29. [Google Scholar] - Romik, D. The Surprising Mathematics of Longest Increasing Subsequences. In Institute of Mathematical Statistics Textbooks, 4; Cambridge University Press: New York, NY, USA, 2015; p. xi+353. [Google Scholar]
- Stanley, R.P. Increasing and decreasing subsequences and their variants. Int. Congr. Math.
**2007**, I, 545–549. [Google Scholar] - Steele, J.M. Variations on the monotone subsequence theme of Erdős and Szekeres. In IMA Volumes in Mathematics and Its Applications; Springer: New York, NY, USA, 1995; Volume 72, pp. 111–131. [Google Scholar]
- Xu, X.; Liang, M.; Luo, H. Ramsey Theory: Unsolved Problems and Results; De Gruyter/University of Science and Technology of China Press: Berlin, Germany; Boston, MA, USA, 2018; p. 190. [Google Scholar]

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Itskovich, E.J.; Levit, V.E.
What Do a Longest Increasing Subsequence and a Longest Decreasing Subsequence Know about Each Other? *Algorithms* **2019**, *12*, 237.
https://doi.org/10.3390/a12110237

**AMA Style**

Itskovich EJ, Levit VE.
What Do a Longest Increasing Subsequence and a Longest Decreasing Subsequence Know about Each Other? *Algorithms*. 2019; 12(11):237.
https://doi.org/10.3390/a12110237

**Chicago/Turabian Style**

Itskovich, Elizabeth J., and Vadim E. Levit.
2019. "What Do a Longest Increasing Subsequence and a Longest Decreasing Subsequence Know about Each Other?" *Algorithms* 12, no. 11: 237.
https://doi.org/10.3390/a12110237