Continuously Increasing Subsequences of Random Multiset Permutations
Abstract
For a word and integer , we define to be the length of the longest subsequence of the form , and we let . In this paper we estimate the expected values of and when is chosen uniformly at random from all words which use each of the first integers exactly times. We show that if is sufficiently larger in terms of as tends towards infinity, confirming a conjecture of Diaconis, Graham, He, and Spiro. We also show that is asymptotic to the inverse gamma function if is sufficiently large in terms of as tends towards infinity.
1 Introduction
1.1 Main Results
Given integers and , let denote the set of words which use each integer in exactly times, and we will refer to as a multiset permutation. For example, . For and an integer, we define to be the length of the longest subsequence of of the form , which we call an -continuously increasing subsequence. We say that a subsequence is a continuously increasing subsequence if it is an -continuously increasing subsequence for some , and we define to be the length of a longest continuously increasing subsesquence of . For example, if then due to the subsequence , and due to the subsequence .
The focus of this paper is to study and when is chosen uniformly at random from . We focus on the regime where is much larger than , as in the opposite regime is very likely to be its maximum possible value for all .
We first consider . This quantity was briefly studied by Diaconis, Graham, He, and Spiro [DGHS21] due to its relationship with a certain card game that we describe later in this paper. They proved for some absolute constant provided is sufficiently large in terms of . It was conjectured in [DGHS21] that this upper bound for is asymptotically tight for sufficiently large in terms of . We verify this conjecture in a strong form, obtaining an exact formula for for any fixed and precise estimates of this value as tends towards infinity.
Theorem 1.1.
-
(a)
For any integer , let be the zeroes of . If is chosen uniformly at random, then
(1) -
(b)
There exists an absolute constant such that
For example, when we have and , implying , which can also be proven by elementary means. For we have and . From this Theorem 1.1(a) gives the following closed form expression for .
Corollary 1.2.
Our next result gives precise bounds for the length of a longest continuously increasing subsequence in a random permutation of . We recall that the gamma function is a function which, in particular, gives a bijection from to and which satisfies for non-negative integers .
Theorem 1.3.
If is sufficiently large in terms of , then
where is the inverse of the gamma function when restricted to .
Note when the error term of Theorem 1.3 is , but for it is , which is fairly close to the main term of . Thus the behavior of changes somewhat dramatically as soon as one starts to consider multiset permutations as opposed to just permutations.
1.2 History and Related Work
Determining and can be viewed as variants of the well-studied problem of determining the length of the longest increasing subsequence in a random permutation of length , and we denote this quantity by . It was shown by Logan and Shepp [LS77] and Vershick and Kerov [VK77] that , answering a famous problem of Ulam. Later Baik, Deift, and Johansson [BDJ99] showed that the limiting distribution of is the Tracy-Widom distribution. Some work with the analogous problem for multiset permutations has been considered recently by Almeanazel and Johnson [AMJ20]. Much more can be said about this topic, and we refer the reader to the excellent book by Romik [Rom15] for more information.
The initial motivation for studying was due to its relationship to a card guessing experiment introduced by Diaconis and Graham [DG81]. To start the experiment, one shuffles a deck of cards which consists of distinct card types each appearing with multiplicity . In each round, a subject iteratively guesses what the top card of the deck is according to some strategy . After each guess, the subject is told whether their guess was correct or not, the top card is discarded, and then the experiment continues with the next card. This experiment is known as the partial feedback model. For more on the history of the partial feedback model we refer the reader to [DGS21].
If is a strategy for the subject in the partial feedback model and , we let denote the number of correct guesses made by the subject if they follow strategy and the deck is shuffled according to . We say that is an optimal strategy if , where ranges over all strategies and is chosen uniformly at random. Optimal strategies are unknown in general, and even if they were known they would likely be too complex for a human subject to implement in practice. As such there is interest in coming up with (simple) strategies such that is relatively large.
One strategy is the trivial strategy which guesses card type 1 every single round, guaranteeing a score of exactly at the end of the experiment. A slightly better strategy is the safe strategy which guesses card type 1 every round until all are guessed correctly, then 2’s until all are guessed correctly, and so on. It can be deduced from arguments given by Diaconis, Graham, and Spiro [DGS21] that is plus an exponential error term, so the safe strategy does just a little better than the trivial strategy.
Another natural strategy is the shifting strategy , defined by guessing 1 until you are correct, then 2 until you are correct, and so on; with the strategy being defined arbitrarily in the (very rare) event that one correctly guesses a copy of each card type. It is not difficult to see that , with equality holding provided the player does not correctly guess . Thus Theorem 1.1(b) shows that the expected number of correct guesses under the shifting strategy is close to , which is slightly better than the trivial strategy, and very slightly better than the safe strategy.
1.3 Preliminaries
We let and let be the set of tuples of length with entries in . Whenever we write, for example, , we will assume is chosen uniformly at random from unless stated otherwise.
Throughout this paper we use several basic results from probability theory. One such result is that if is a non-negative integer-valued random variable, then
A crucial observation that we use throughout the text is the following.
Observation 1.4.
For , if and are drawn uniformly at random, then
Proof.
For , let be the word obtained by deleting every letter from which is larger than . Note that if and only if . Moreover, it is not difficult to see that is distributed uniformly at random in provided is distributed uniformly at random in , proving the result. ∎
2 Proof of Theorem 1.1
2.1 Theorem 1.1(a): Generating Functions
We say that a word has a complete increasing subsequence if . Let be the number of words which have a complete increasing subsequence. Horton and Kurn [HK81, Corollary (c)] give the following formula for .
Theorem 2.1 ([HK81]).
The number of words which have a complete increasing subsequence, , is given by
where
is the set of weak compositions of into parts, i.e.,
and
is a multinomial coefficient.
Notice that can be expressed in terms of as follows:
(2) |
where the third equality is due to Observation 1.4. Note that . Thus, as a consequence of Theorem 2.1, we have
(3a) | |||
(3b) |
Intuitively, if the were removed from the right-hand-side expression in (3b), then by using the multinomial theorem we could write this expression as an power, turning (2) into a geometric series. The next few paragraphs formalise this idea.
We begin by replacing by in the right-hand-side of (3a) to obtain the polynomial
Thus,
Next, we define an operator in order to remove the from the denominator. Let be a commutative ring containing and let be an -linear map defined on the monomials by
We can extend to an -linear map on , which we also refer to as by abuse of notation. Throughout this article, is either or for an indeterminate , and we shall refer to this -linear map as in both cases. Notice that is invertible for any such ring . A key property that we use about is
(4) |
Consider the polynomial
(5) | |||
Notice that,
Let and be the ordinary generating functions of and respectively, i.e.
(6) | |||
Putting everything together, we see that
(7) |
and thus it suffices to find a nice closed form expression for . Note that
where we recall the polynomial is defined in Theorem 1.1 by . As , we have
(8) |
Hence,
and thus
We now prove the main result of this subsection.
Proposition 2.2.
Let be the zeroes of the polynomial . The formal power series satisfies
Proof.
Let . Since are the zeroes of , we have
Notice that has no repeated zeroes. This is true because, if is a repeated zero of , it is also a zero of its derivative . But then has to be a zero of , which is only possible if , a contradiction as is not a zero of .
Thus are pairwise distinct, and hence the zeroes of being , are also pairwise distinct. This and (8) means has the partial fraction decomposition
The derivative of is
2.2 Theorem 1.1(b): Exponential Sums of Zeroes
We remind the reader that Theorem 1.1(b) claims
for some constant . Given Theorem 1.1(a), proving this claim is equivalent to showing that for some positive constant . We do this by following the approach used by Conrey and Ghosh [CG88] to evaluate a similar exponential sum.
For , let and be the real and imaginary parts, respectively, of . Let be arbitrary positive numbers such that . We partition into disjoint sets and where when and when , allowing us to rewrite our desired sum as
Proposition 2.3.
We begin our argument by restricting our attention to the indices in :
Lemma 2.4.
Proof.
By the triangle inequality,
Note that . Since , we know that , so . Thus for , we have that
Adding over the elements of , of which there are at most , we have . ∎
To evaluate the sum for the indices in , we utilize . Since the ’s are the roots of , we have for , so .
Lemma 2.5.
For , we have
with .
Proof.
All of this follows from Proposition 2.3(b) except for showing that . To show this, we observe by definition of that
Conrey and Ghosh [CG88] note that when , so this can be expanded as a convergent geometric series in such cases. Thus,
The only time an term can appear in the double infinite sum is when , so this term has coefficient as desired.
∎
Note that for we have from Proposition 2.3(a). Thus we can use Lemma 2.5 to conclude that
(9) |
where and .
Using the values of for from Proposition 2.3(c) and that and , we see that
By Lemma 2.4, we have for some , so we are left to consider the sum over . The first three terms above match our claimed expression, so it suffices to show that the leftover terms are .
Using the Triangle Inequality, and recalling that for all by Proposition 2.3(b), we obtain
Since , this is at most .
Now we make use of Proposition 2.3(a). In the first summation, the quantity is negative, so . In the second summation, is nonnegative, so . Putting this altogether, we have
Note that the first summation is finite and it is bounded above by the convergent infinite sum , which is a constant. Since , we have that , so the second summation also converges. Let be some constant which serves as an upper bound for both of these summations. The total expression is then at most
We need to show that this expression will still be after we multiply it by . By the Stirling approximation, is asymptotically , so for sufficiently large , we have
Now we examine
Let . Since , we have that and hence that . However, can be chosen arbitrarily close to to ensure . In this case
Note that and that the is negligible for sufficiently large , so indeed the sum we are considering is for some positive , completing our proof of Theorem 1.1(b).
3 Proof of Theorem 1.3
At a high level, the proof of Theorem 1.3 revolves around showing that tends to 0 or 1 depending on if tends to 0 or infinity as tends to infinity. The following lemma (which we will apply for ) will be used to determine the threshold when shifts from being very small to very large. Here and throughout the text, denotes the natural logarithm.
Lemma 3.1.
Given integers and , let be a real number such that is an integer. We have
and if , we have
Here and throughout the text we define the falling factorial .
Proof.
Note that , so it suffices to show
with the upper bound holding when . When , we have , so . This implies
Similarly for all , proving the result. ∎
Before delving into the details of the proof, we introduce some auxiliary definitions that will make our arguments somewhat cleaner. The main idea is that we wish to reduce multiset permutations to set permutations by labeling each of the copies of .
To this end, let denote the set of permutations of the set . For example, . If contains a subsequence of the form , then we will say that has a subsequence of type where and . We say that has a subsequence of type if it has a subsequence of type for some . For example, defined above has a subsequence of type and hence of type , but it contains no subsequence of type .
Observation 3.2.
If and are chosen uniformly at random, then for any word with letters in we have
The intuition for this observation is as follows. We can view as a deck of cards with card types each having suits, and we view as a way of shuffling this deck. The property that contains a subsequence of type is independent of the suits of the cards. Thus if we let denote the shuffling after ignoring suits, then contains as a subsequence if and only if contains a subsequence of type . More formally, one can prove this result by considering the map which deletes the subscripts in the letters of . We omit the details.
3.1 The Upper Bound
To prove the upper bound of Theorem 1.3, essentially the only fact we need is that there are at most continuously increasing subsequences of a given length , and as such our proof easily generalizes to a wider set of subsequence problems.
To this end, let be a set of words with letters in . For , we define to be the maximum length of a word which appears as a subsequence in . For example, if consists of every word of the form for some , then . We will say that a set of words is prefix closed if for every we have for all .
Lemma 3.3.
Let be a prefix closed set of words with letters in and let be the set of words of length in . If is chosen uniformly at random, then
Proof.
For we define to be the length of a longest such that contains a subsequence of type . By Observation 3.2, it suffices to bound with chosen uniformly at random from .
Because is prefix closed, we have if and only if contains some subsequence of type , and by definition this happens if and only if contains some subsequence of type with and . For and , let be the indicator variable which is 1 if contains a subsequence of type and which is 0 otherwise. Let . By our observations above and Markov’s inequality, we find
where the last step used that if and only if the distinct letters appear in the correct relative order in , and this happens with probability . This proves the result. ∎
Proposition 3.4.
Let be a prefix closed set of words with letters in and let be the words of length in . Assume there exists an such that for all . If is chosen uniformly at random and is sufficiently large in terms of , then
In particular, for the set of continuously increasing words , we have for all , so taking gives the upper bound of Theorem 1.3. As another example, if is the set of arithmetic progressions, then one can take to give an upper bound of roughly for . Recent work of Goh and Zhao [GZ20] shows that this bound for arithmetic progressions is tight.
Proof.
By using Lemma 3.3 and the trivial bound , we find for all integers that
(10) |
3.2 The Lower Bound
For , we define their Hamming distance . Our key lemma for proving the lower bound of Theorem 1.3 is the following:
Lemma 3.5.
Let be such that any distinct have for some integer . Then
Proof.
For , let denote the length of the longest subsequence of of type . By Observation 3.2, it suffices to prove this lower bound for where is chosen uniformly at random. For , let be the event that contains a subsequence of type . Observe that
(11) |
where the last inequality used the Bonferroni inequality (which is essentially a weakening of the principle of inclusion-exclusion); see e.g. [Spe14] for further details on this inequality. To bound (11), we use the following:
Claim 3.6.
If with , then and
Proof.
Observe that occurs if and only if occur in the correct relative order in , so . Let be any set of indices such that , and note that such a set exists by assumption of . Let be the event that is a subsequence of . Observe that and that this event is independent of since these two events concern disjoint sets of letters. Because implies , we have
proving the result. ∎
The problem of finding such that with and both large is the central problem of coding theory. In particular, a basic greedy argument from coding theory gives the following:
Lemma 3.7.
For any and , there exists such that any two distinct have and such that
Proof.
Let be a set such that for distinct and such that is as large as possible. Let , and note that for all ,
with this last step using for . By the maximality of , we must have , and thus
giving the desired bound on . ∎
Proposition 3.8.
For sufficiently large in terms of , we have
Proof.
We start with the following fact.
Claim 3.9.
For all , there exists a constant such that if , then .
Proof.
In [Cov99] it is noted that for all , where is the binary entropy function. Because tends to 0 as tends to 0, there exists a constant such that , and the result follows by taking . ∎
Let , and assume is sufficiently large in terms of so that , i.e. so that . We also choose sufficiently large so that , or equivalently so that . Let be a set as in Lemma 3.7, and by our assumptions above we find
Possibly by deleting elements from we can assume that is exactly the quantity stated above666Strictly speaking we should take to be the floor of this value to guarantee that it is an integer. This would change our ultimate bound by at most a factor of 2, and this factor of 2 can easily be recovered by sharpening our analysis in various places., so by Lemma 3.5 it suffices to show . Using the inequality and that is sufficiently large, we have
Thus , proving the result. ∎
With this we can now prove Theorem 1.3.
Proof of Theorem 1.3.
The upper bound follows from Proposition 3.4. To prove the lower bound, fix an integer . For , let be the event that contains the subsequence .
Claim 3.10.
We have the following:
-
(a)
If any event occurs, then ,
-
(b)
The events are mutually independent, and
-
(c)
For all , we have where is chosen uniformly at random.
Proof.
Part (a) is clear, and (b) follows from the fact that the events involve the relative ordering of disjoint sets of letters. For (c), one can consider the map which sends to by deleting every letter in except for and then relabeling to . It is not difficult to see that occurs if and only if occurs, and that being chosen uniformly at random implies is chosen uniformly at random. ∎
Let and let be the integer such that . The claim above implies that for all we have
(12) |
with this last step using for , that , and that .
It is easy to see by definition that for all ; and for sufficiently large, we have . For such , by (12) we have for all that
(13) |
Summing this bound over all for gives
This gives the desired lower bound of for since .
We now consider . By Proposition 3.8 we have for sufficiently large in terms of that . Let be large enough in terms of so that this bound holds for . Also let be large enough so that . By Lemma 3.1, if , then . Thus by (12) we have
where this last step used . This quantity is at least for (and hence ) sufficiently large. Using this together with (13) for gives, for sufficiently large in terms of ,
proving the desired result. ∎
4 Concluding Remarks
In this paper we solved a conjecture of Diaconis, Graham, He, and Spiro [DGHS21] by asymptotically determining provided is sufficiently large in terms of . Using similar ideas, it is possible to compute the asymptotic limit of the moment for any fixed . Based off of computational evidence for these higher moments, we conjecture the following:
Conjecture 4.1.
For all , if is sufficiently large in terms of , then
where and
One can show that the standard deviation of is asymptotic to . Thus, this conjecture would imply that the standardized moments converge to 0 for odd and to for even. These are exactly the moments of a standard normal distribution, and actually this fact would imply that converges in distribution to a standardized normal distribution, see for example [FK16, Corollary 21.8].
Perhaps a first step towards proving Conjecture 4.1 would be to get a better understanding of the (non-centralized) moments , and to this end we conjecture the following:
Conjecture 4.2.
For all , if is sufficiently large in terms of , then
We can prove that the moment is asymptotic to , but we do not know how to determine the coefficient of . We were unable to observe any pattern for the coefficients of lower order terms.
In this paper, we considered continuously increasing subsequences in multiset permutations, and it is natural to consider other types of subsequences in multiset permutations. Perhaps the most natural to consider is the following:
Question 4.3.
For , let denote the length of a longest increasing subsequence in . What is asymptotic to when is fixed?
When it is well known that (see [Rom15]), so Question 4.3 is a natural generalization of this classical problem. See also recent work of Almeanazel and Johnson [AMJ20] for some results concerning the distribution of .
Acknowledgments. We thank S. Venkitesh for fruitful conversations and Persi Diaconis for comments regarding an earlier draft. We thank the Graduate Student Combinatorics Conference 2021 for hosting an open problem session, at which the fourth author presented the problem which inspired this work.
References
- [AMJ20] Ayat Al-Meanazel and Brad C. Johnson. The distribution of the length of the longest increasing subsequence in random permutations of arbitrary multi-sets. Methodology and Computing in Applied Probability, 22:1009–1021, 2020.
- [BDJ99] Jinho Baik, Percy Deift, and Jurt Johansson. On the distribution of the length of the longest increasing subsequence of random permutations. Journal of the American Mathematical Society, 12(4):1119–1178, 1999.
- [CG88] Brian Conrey and Amit Ghosh. On the zeros of the taylor polynomials associated with the exponential function. The American mathematical monthly, 95(6):528–533, 1988.
- [Cov99] Thomas M Cover. Elements of information theory. John Wiley & Sons, 1999.
- [DG81] Persi Diaconis and Ronald Graham. The analysis of sequential experiments with feedback to subjects. The Annals of Statistics, 9(1):3–23, 1981.
- [DGHS21] Persi Diaconis, Ron Graham, Xiaoyu He, and Sam Spiro. Card guessing with partial feedback. Combinatorics, Probability and Computing, pages 1–20, 2021.
- [DGS21] Persi Diaconis, Ron Graham, and Sam Spiro. Guessing about guessing: Practical strategies for card guessing with feedback. American Mathematical Monthly (to appear), 2021.
- [FK16] Alan Frieze and Michal Karoński. Introduction to random graphs. Cambridge University Press, 2016.
- [GZ20] Marcel K Goh and Rosie Y Zhao. Arithmetic subsequences in a random ordering of an additive set. arXiv preprint arXiv:2012.12339, 2020.
- [HK81] J.D. Horton and Andrew Kurn. Counting sequences with complete increasing subsequences. Congressus Numerantium, pages 75–80, 1981.
- [LS77] B.F Logan and L.A Shepp. A variational problem for random young tableaux. Advances in Mathematics, 26(2):206–222, 1977.
- [Rom15] Dan Romik. The surprising mathematics of longest increasing subsequences. Cambridge University Press, 2015.
- [Spe14] Joel Spencer. Asymptopia, volume 71. American Mathematical Soc., 2014.
- [VK77] A.M. Vershik and S.V. Kerov. Asymptotics of the plancheral measure of the symmetric group and a limiting form for young tableaux. Doklady Akademii Nauk SSSR, 233(6):1024–1027, 1977.
- [Zem05] Stephen Zemyan. On the zeroes of the nth partial sum of the exponential series. American Mathematical Monthly, 112(10):891–909, 2005.