vEnhance's avatar

Nov 15, 2017

🖉 A story of block-ascending permutations

I recently had a combinatorics paper appear in the EJC. In this post I want to brag a bit by telling the “story” of this paper: what motivated it, how I found the conjecture that I originally did, and the process that eventually led me to the proof, and so on.

This work was part of the Duluth REU 2017, and I thank Joe Gallian for suggesting the problem.

1. Background

Let me begin by formulating the problem as it was given to me. First, here is the definition and notation for a “block-ascending” permutation.

Definition 1. For nonnegative integers a1a_1, …, ana_n an (a1,,an)(a_1, \dots, a_n)-ascending permutation is a permutation on {1,2,,a1++an}\{1, 2, \dots, a_1 + \dots + a_n\} whose descent set is contained in {a1,a1+a2,,a1++an1}\{a_1, a_1+a_2, \dots, a_1+\dots+a_{n-1}\}.

In other words the permutation ascends in blocks of length a1a_1, a2a_2, …, ana_n, and thus has the form π=π11π1a1π21π2a2πn1πnan\pi = \pi_{11} \dots \pi_{1a_1} | \pi_{21} \dots \pi_{2a_2} | \dots | \pi_{n1} \dots \pi_{na_n} for which πi1<πi2<<πiai\pi_{i1} < \pi_{i2} < \dots < \pi_{ia_i} for all ii.

It turns out that block-ascending permutations which also avoid an increasing subsequence of certain length have nice enumerative properties. To this end, we define the following notation.

Definition 2. Let Lk+2(a1,,an)\mathcal L_{k+2}(a_1, \dots, a_n) denote the set of (a1,,an)(a_1, \dots, a_n)-ascending permutations which avoid the pattern 12(k+2)12 \dots (k+2).

(The reason for using k+2k+2 will be explained later.) In particular, Lk+2(a1,,an)=\mathcal L_{k+2}(a_1 ,\dots, a_n) = \varnothing if max{a1,,an}k+2\max \{a_1, \dots, a_n\} \ge k+2.

Example 3. Here is a picture of a permutation in L7(3,2,4)\mathcal L_7(3,2,4) (but not in L6(3,2,4)\mathcal L_6(3,2,4), since one can see an increasing length 66 subsequence shaded). We would denote it 134692578134|69|2578.

A permutation with blocks 3+2+4 with avoiding an increasing subsequence of length 7.
A permutation with blocks 3+2+4 with avoiding an increasing subsequence of length 7.

Now on to the results. A 2011 paper by Joel Brewster Lewis (JBL) proved (among other things) the following result:

Theorem 4 (Lewis 2011)

The sets Lk+2(k,k,,k)\mathcal L_{k+2}(k,k,\dots,k) and \mathcal L_{k+2}(k+1,k+1,\dots,k+1} are in bijection with Young tableau of shape (k+1)n\left\langle (k+1)^n \right\rangle.

Remark 5. When k=1k=1, this implies L3(1,1,,1)\mathcal L_3(1,1,\dots,1), which is the set of 123123-avoiding permutations of length nn, is in bijection with the Catalan numbers; so is L3(2,,2)\mathcal L_3(2,\dots,2) which is the set of 123123-avoiding zig-zag permutations.

Just before the Duluth REU in 2017, Mei and Wang proved that in fact, in Lewis’ result one may freely mix kk and k+1k+1’s. To simplify notation,

Definition 6. Let I{1,,n}I \subseteq \left\{ 1,\dots,n \right\}. Then L(n,k,I)\mathcal L(n,k,I) denotes Lk+2(a1,,an)\mathcal L_{k+2}(a_1,\dots,a_n) where ai={k+1iIkiI.a_i = \begin{cases} k+1 & i \in I \\ k & i \notin I. \end{cases}

Theorem 7 (Mei, Wang 2017)

The 2n2^n sets L(n,k,I)\mathcal L(n,k,I) are also in bijection with Young tableau of shape <(k+1)n>\left< (k+1)^n \right>.

The proof uses the RSK correspondence, but the authors posed at the end of the paper the following open problem:

Problem

Find a direct bijection between the 2n2^n sets L(n,k,I)\mathcal L(n,k,I) above, not involving the RSK correspondence.

This was the first problem that I was asked to work on. (I remember I received the problem on Sunday morning; this actually matters a bit for the narrative later.)

At this point I should pause to mention that this Lk+2()\mathcal L_{k+2}(\dots) notation is my own invention, and did not exist when I originally started working on the problem. Indeed, all the results are restricted to the case where ai{k,k+1}a_i \in \{k,k+1\} for each ii, and so it was unnecessary to think about other possibilities for aia_i: Mei and Wang’s paper use the notation L(n,k,I)\mathcal L(n,k,I). So while I’ll continue to use the Lk+2()\mathcal L_{k+2}(\dots) notation in the blog post for readability, it will make some of the steps more obvious than they actually were.

2. Setting out

Mei and Wang’s paper originally suggested that rather than finding a bijection L(n,k,I)L(n,k,J)\mathcal L(n,k,I) \rightarrow \mathcal L(n,k,J) for any II and JJ, it would suffice to biject L(n,k,I)L(n,k,)\mathcal L(n,k,I) \rightarrow \mathcal L(n,k,\varnothing) and then compose two such bijections. I didn’t see why this should be much easier, but it didn’t seem to hurt either.

As an example, they show how to do this bijection with I={1}I = \{1\} and I={n}I = \{n\}. Indeed, suppose I={1}I = \{1\}. Then π11<π12<<π1(k+1)\pi_{11} < \pi_{12} < \dots < \pi_{1(k+1)} is an increasing sequence of length k+1k+1 right at the start of π\pi. So π1(k+1)\pi_{1(k+1)} had better be the largest element in the permutation: otherwise later in π\pi the biggest element would complete an ascending permutation of length k+2k+2 already! So removing π1(k+1)\pi_{1(k+1)} gives a bijection between L(n,k,{1})L(n,k,)\mathcal L(n,k,\{1\}) \rightarrow \mathcal L(n,k,\varnothing).

But if you look carefully, this proof does essentially nothing with the later blocks. The exact same proof gives:

Proposition 8. Suppose 1I1 \notin I. Then there is a bijection L(n,k,I{1})L(n,k,I)\mathcal L(n,k,I \cup \{1\}) \rightarrow \mathcal L(n,k,I) by deleting the (k+1)(k+1)-st element of the permutation (which must be largest one).

Once I found this proposition I rejected the initial suggestion of specializing L(n,k,I)L(n,k,)\mathcal L(n,k,I) \rightarrow \mathcal L(n,k,\varnothing). The “easy case” I had found told me that I could take a set II and delete the single element 11 from it. So empirically, my intuition from this toy example told me that it would be easier to find bijections L(n,k,I)L(n,k,I)\mathcal L(n,k,I) \rightarrow \mathcal L(n,k,I') whee II' and II were only “a little different”, and hope that the resulting bijection only changed things a little bit (in the same way that in the toy example, all the bijection did was delete one element). So I shifted to trying to find small changes of this form.

3. The fork in the road

3.1. Wishful thinking

I had a lucky break of wishful thinking here. In the notation Lk+2(a1,,an)\mathcal L_{k+2}(a_1, \dots, a_n) with ai{k,k+1}a_i \in \{k,k+1\}, I had found that one could replace a1a_1 with either kk or k+1k+1 freely. (But this proof relied heavily on the fact the block really being on the far left.) So what other changes might I be able to make?

There were two immediate possibilities that came to my mind.

  • Deletion: We already showed a1a_1 could be changed from k+1k+1 to kk for any ii. If we can do a similar deletion with aia_i for any ii, not just i=1i=1, then we would be done.
  • Swapping: If we can show that two adjacent aia_i’s could be swapped, that would be sufficient as well. (It’s also possible to swap non-adjacent aia_i’s, but that would cause more disruption for no extra benefit.)

Now, I had two paths that both seemed plausible to chase after. How was I supposed to know which one to pick? (Of course, it’s possible neither work, but you have to start somewhere.)

Well, maybe the correct thing to do would have to just try both. But it was Sunday afternoon by the time I got to this point. Granted, it was summer already, but I knew that come Monday I would have doctor appointments and other trivial errands to distract me, so I decided I should pick one of them and throw the rest of the day into it. But that meant I had to pick one.

(I confess that I actually already had a prior guess: the deletion approach seemed less likely to work than the swapping approach. In the deletion approach, if ii is somewhere in the middle of the permutation, it seemed like deleting an element could cause a lot of disruption. But the swapping approach preserved the total number of elements involved, and so seemed more likely that I could preserve structure. But really I was just grasping at straws.)

3.2. Enter C++

Yeah, I cheated. Sorry.

Those of you that know anything about my style of math know that I am an algebraist by nature — sort of. It’s more accurate to say that I depend on having concrete examples to function. True, I can’t do complexity theory for my life, but I also haven’t been able to get the hang of algebraic geometry, despite having tried to learn it three or four times by now. But enumerative combinatorics? OH LOOK EXAMPLES.

Here’s the plan: let k=3k=3. Then using a C++ computer program:

  • Enumerate all the permutations in S=Lk+2(3,4,3,4)S = \mathcal L_{k+2}(3,4,3,4).
  • Enumerate all the permutations in A=Lk+2(3,3,3,4)A = \mathcal L_{k+2}(3,3,3,4).
  • Enumerate all the permutations in B=Lk+2(3,3,4,4)B = \mathcal L_{k+2}(3,3,4,4).

If the deletion approach is right, then I would hope SS and AA look pretty similar. On the flip side, if the swapping approach is right, then SS and BB should look close to each other instead.

It’s moments like this where my style of math really shines. I don’t have to make decisions like the above off gut-feeling: do the “data science” instead.

3.3. A twist of fate

Except this isn’t actually what I did, since there was one problem. Computing the longest increasing subsequence of a length NN permutation takes O(NlogN)O(N \log N) time, and there are N!N! or so permutations. But when N=3+4+3+4=14N = 3+4+3+4=14, we have N!NlogN31012N! \cdot N \log N \approx 3 \cdot 10^{12}, which is a pretty big number. Unfortunately, my computer is not really that fast, and I didn’t really have the patience to implement the “correct” algorithms to bring the runtime down.

The solution? Use N=1+4+3+2=10N = 1+4+3+2 = 10 instead.

In a deep irony that I didn’t realize at the time, it was this moment when I introduced the Lk+2(a1,,an)\mathcal L_{k+2}(a_1, \dots, a_n) notation, and for the first time allowed the aia_i to not be in {k,k+1}\{k,k+1\}. My reasoning was that since I was only doing this for heuristic reasons, I could instead work with S=Lk+2(2,4,3,2)S = \mathcal L_{k+2}(2,4,3,2) and probably not change much about the structure of the problem, while replacing N=2+4+3+2=11N = 2 + 4 + 3 + 2 = 11, which would run 10001000 times faster. This was okay since all I wanted to do was see how much changing the “middle” would disrupt the structure.

And so the new plan was:

  • Enumerate all the permutations in S=Lk+2(1,4,3,2)S = \mathcal L_{k+2}(1,4,3,2).
  • Enumerate all the permutations in A=Lk+2(1,3,3,2)A = \mathcal L_{k+2}(1,3,3,2).
  • Enumerate all the permutations in B=Lk+2(1,3,4,2)B = \mathcal L_{k+2}(1,3,4,2).

I admit I never actually ran the enumeration with AA, because the route with SS and BB turned out to be even more promising than I expected. When I compared the empirical data for the sets SS and BB, I found that the number of permutations with any particular triple (π1,π9,π10)(\pi_1, \pi_9, \pi_{10}) were equal. In other words, the outer blocks were preserved: the bijection Lk+2(1,4,3,2)Lk+2(1,3,4,2)\mathcal L_{k+2}(1,4,3,2) \rightarrow \mathcal L_{k+2}(1,3,4,2) does not tamper with the outside blocks of length 11 and 22.

This meant I was ready to make the following conjecture. Suppose ai=ka_i = k, ai+1=k+1a_{i+1} = k+1. There is a bijection

Lk+2(a1,,ai,ai+1,,an)Lk+2(a1,,ai+1,ai,,an) \mathcal L_{k+2}(a_1, \dots, a_i, a_{i+1}, \dots, a_n) \rightarrow \mathcal L_{k+2}(a_1, \dots, a_{i+1}, a_{i}, \dots, a_n)

which only involves rearranging the elements of the ii-th and (i+1)(i+1)-st blocks.

4. Rooting out the bijection

At this point I was in a quite good position. I had pinned down the problem to a finding a particular bijection that I was confident had to exist, since it was showing up to the empirical detail.

Let’s call this mythical bijection W\mathbf W. How could I figure out what it was?

4.1. Hunch: W\mathbf W preserves order-isomorphism

Let me quickly introduce a definition.

Definition 9. We say two words a1ama_1 \dots a_m and b1bmb_1 \dots b_m are order-isomorphic if ai<aja_i < a_j if and only bi<bjb_i < b_j. Then order-isomorphism gives equivalence classes, and there is a canonical representative where the letters are {1,2,,m}\{1,2,\dots,m\}; this is called a reduced word.

Example 10. The words 1395713957, 1284612846 and 1253412534 are order-isomorphic; the last is reduced.

Now I guessed one more property of W\mathbf W: this W\mathbf W should order-isomorphism.

What do I mean by this? Suppose in one context 13957139 | 57 changed to 3915739 | 157; then we would expect that in another situation we should have 12468124 | 68 changing to 2416824 | 168. Indeed, we expect W\mathbf W (empirically) to not touch surrounding outside blocks, and so it would be very strange if W\mathbf W behaved differently due to far-away numbers it wasn’t even touching.

So actually I’ll just write W(12345)=23145\mathbf W(123|45) = 23|145 for this example, reducing the words in question.

4.2. Keep cheating

With this hunch it’s possible to cheat with C++ again. Here’s how.

Let’s for concreteness suppose k=2k=2 and the particular sets Lk+2(1,3,2,1)Lk+2(1,2,3,1).\mathcal L_{k+2}(1,3,2,1) \rightarrow \mathcal L_{k+2}(1,2,3,1). Well, it turns out if you look at the data:

  • The only element of Lk+2(1,3,2,1)\mathcal L_{k+2}(1,3,2,1) which starts with 22 and ends with 55 is 21473652|147|36|5.
  • The only element of Lk+2(1,2,3,1)\mathcal L_{k+2}(1,2,3,1) which starts with 22 and ends with 55 is 24713652|47|136|5.

So that means that 14736147 | 36 is changed to 4713647 | 136. Thus the empirical data shows that W(13524)=35124.\mathbf W(135|24) = 35|124. In general, it might not be that clear cut. For example, if we look at the permutations starting with 22 and 44, there is more than one.

  • 21573642 | 1 5 7 | 3 6 | 4 and 21673542 | 1 6 7 | 3 5 | 4 are both in Lk+2(1,3,2,1)\mathcal L_{k+2}(1,3,2,1).
  • 25713642 | 5 7 | 1 3 6 | 4 and 26713542 | 6 7 | 1 3 5 | 4 are both in in Lk+2(1,2,3,1)\mathcal L_{k+2}(1,2,3,1).

Thus W({13524,14523})={35124,45123}\mathbf W( \{135|24, 145|23\} ) = \{35|124, 45|123\} but we can’t tell which one goes to which (although you might be able to guess).

Fortunately, there is lots of data. This example narrowed 13524135|24 down to two values, but if you look at other places you might have different data on 13524135|24. Since we think W\mathbf W is behaving the same “globally”, we can piece together different pieces of data to get narrower sets. Even better, W\mathbf W is a bijection, so once we match either of 13524135|24 or 14523145|23, we’ve matched the other.

You know what this sounds like? Perfect matchings.

So here’s the experimental procedure.

  • Enumerate all permutations in Lk+2(2,3,4,2)\mathcal L_{k+2}(2,3,4,2) and Lk+2(2,4,3,2)\mathcal L_{k+2}(2,4,3,2).
  • Take each possible tuple (π1,π2,π10,π11)(\pi_1, \pi_2, \pi_{10}, \pi_{11}), and look at the permutations that start and end with those particular four elements. Record the reductions of π3π4π5π6π7π8π9\pi_3\pi_4\pi_5|\pi_6\pi_7\pi_8\pi_9 and π3π4π5π6π7π8π9\pi_3\pi_4\pi_5\pi_6|\pi_7\pi_8\pi_9 for all these permutations. We call these input words and output words, respectively. Each output word is a “candidate” of W\mathbf W for a input word.
  • For each input word a1a2a3b1b2b3b4a_1a_2a_3|b_1b_2b_3b_4 that appeared, take the intersection of all output words that appeared. This gives a bipartite graph GG, with input words being matched to their candidates.
  • Find perfect matchings of the graph.

And with any luck that would tell us what W\mathbf W is.

4.3. Results

Luckily, the bipartite graph is quite sparse, and there was only one perfect matching.

246|1357 => 2467|135
247|1356 => 2457|136
256|1347 => 2567|134
257|1346 => 2357|146
267|1345 => 2367|145
346|1257 => 3467|125
347|1256 => 3457|126
356|1247 => 3567|124
357|1246 => 1357|246
367|1245 => 1367|245
456|1237 => 4567|123
457|1236 => 1457|236
467|1235 => 1467|235
567|1234 => 1567|234

If you look at the data, well, there are some clear patterns. Exactly one number is “moving” over from the right half, each time. Also, if 77 is on the right half, then it always moves over.

Anyways, if you stare at this for an hour, you can actually figure out the exact rule:

Claim 11. Given an input a1a2a3b1b2b3b4a_1a_2a_3|b_1b_2b_3b_4, move bi+1b_{i+1} if ii is the largest index for which ai<bi+1a_i < b_{i+1}, or b1=1b_1 = 1 if no such index exists.

And indeed, once I have this bijection, it takes maybe only another hour of thinking to verify that this bijection works as advertised, thus solving the original problem.

Rather than writing up what I had found, I celebrated that Sunday evening by playing Wesnoth for 2.5 hours.

5. Generalization

5.1. Surprise

On Monday morning I was mindlessly feeding inputs to the program I had worked on earlier and finally noticed that in fact L6(1,3,5,2)\mathcal L_6(1,3,5,2) and L6(1,5,3,2)\mathcal L_6(1,5,3,2) also had the same cardinality. Huh.

It seemed too good to be true, but I played around some more, and sure enough, the cardinality of Lk+2(a1,,an)\mathcal L_{k+2}(a_1, \dots, a_n) seemed to only depend on the order of the aia_i’s. And so at last I stumbled upon the final form the conjecture, realizing that all along the assumption ai{k,k+1}a_i \in \{k,k+1\} that I had been working with was a red herring, and that the bijection was really true in much vaster generality. There is a bijection

Lk+2(a1,,ai,ai+1,,an)Lk+2(a1,,ai+1,ai,,an) \mathcal L_{k+2}(a_1, \dots, a_i, a_{i+1}, \dots, a_n) \rightarrow \mathcal L_{k+2}(a_1, \dots, a_{i+1}, a_{i}, \dots, a_n)

which only involves rearranging the elements of the ii-th and (i+1)(i+1)-st blocks.

It also meant I had more work to do, and so I was now glad that I hadn’t written up my work from yesterday night.

5.2. More data science

I re-ran the experiment I had done before, now with L7(2,3,5,2)L7(2,5,3,2)\mathcal L_7(2,3,5,2) \rightarrow \mathcal L_7(2,5,3,2). (This was interesting, because the 88 elements in question could now have either longest increasing subsequence of length 55, or instead of length 66.)

The data I obtained was:

246|13578 => 24678|135
247|13568 => 24578|136
248|13567 => 24568|137
256|13478 => 25678|134
257|13468 => 23578|146
258|13467 => 23568|147
267|13458 => 23678|145
268|13457 => 23468|157
278|13456 => 23478|156
346|12578 => 34678|125
347|12568 => 34578|126
348|12567 => 34568|127
356|12478 => 35678|124
357|12468 => 13578|246
358|12467 => 13568|247
367|12458 => 13678|245
368|12457 => 13468|257
378|12456 => 13478|256
456|12378 => 45678|123
457|12368 => 14578|236
458|12367 => 14568|237
467|12358 => 14678|235
468|12357 => 12468|357
478|12356 => 12478|356
567|12348 => 15678|234
568|12347 => 12568|347
578|12346 => 12578|346
678|12345 => 12678|345

Okay, so it looks like:

  • exactly two numbers are moving each time, and
  • the length of the longest run is preserved.

Eventually, I was able to work out the details, but they’re more involved than I want to reproduce here. But the idea is that you can move elements “one at a time”: something like

Lk+2(7,4)Lk+2(6,5)Lk+2(5,6)Lk+2(4,7) \mathcal L_{k+2}(7,4) \rightarrow \mathcal L_{k+2}(6,5) \rightarrow \mathcal L_{k+2}(5,6) \rightarrow \mathcal L_{k+2}(4,7)

while preserving the length of increasing subsequences at each step.

So, together with the easy observation from the beginning, this not only resolves the original problem, but also gives an elegant generalization. I had now proved:

Theorem 12. For any a1a_1, …, ana_n, the cardinality Lk+2(a1,,an)\left| \mathcal L_{k+2}(a_1, \dots, a_n) \right| does not depend on the order of the aia_i’s.

6. Discovered vs invented

Whenever I look back on this, I can’t help thinking just how incredibly lucky I got on this project.

There’s this perpetual debate about whether mathematics is discovered or invented. I think it’s results like this which make the case for “discovered”. I did not really construct the bijection W\mathbf W myself: it was “already there” and I found it by examining the data. In another world where W\mathbf W did not exist, all the creativity in the world wouldn’t have changed anything.

So anyways, that’s the behind-the-scenes tour of my favorite combinatorics paper.