Discrete

Mountain ranges counted by their peaks

There are fourteen mountain ranges of four up-steps and four down-steps. Sorted by how many peaks they have, they split 1, 6, 6, 1, and the split reads the same backwards. Ranges with two peaks are not reflections of ranges with three, so the symmetry is not visible in the ranges. It becomes visible when the ranges are redrawn as partitions of points on a circle, where a second set of points between the first turns k blocks into n + 1 − k.

Worth reading first: One word, and four objects · Counting the paths that go wrong.

Draw a mountain range as a path of up-steps and down-steps that starts and ends at sea level and never goes below it. With four of each there are fourteen such ranges, the fourth Catalan number, and one word with four objects showed them standing in for triangulations, bracketings and trees. The opening figure sorts the fourteen by a second number: how many peaks each has, where a peak is an up-step followed immediately by a down-step.

Fourteen mountain ranges sorted by peaks. Dyck paths of semilength 4 by peaks: 1, 6, 6, 1
Fig. 1 The fourteen mountain ranges of four up-steps and four down-steps, sorted by their number of peaks: 1, 6, 6 and 1.

The split is 1, 6, 6, 1. One range is a single mountain; one is four separate hills; six have two peaks and six have three. The equal sixes are the puzzle. Turning a range upside down does not give a range, and reflecting it left to right preserves the number of peaks rather than changing it. There is no obvious operation on mountain ranges that turns two peaks into three. Yet the counts agree, and they agree at every length: the numbers of ranges of length 2n2n with kk peaks form a row that reads the same backwards.

Those numbers are the Narayana numbers, named for Tadepalli Venkata Narayana, who studied them in the 1950s, and they have a closed formula:

N(n,k)=1n(nk)(nk−1).N(n, k) = \frac{1}{n}\binom{n}{k}\binom{n}{k-1}.

The symmetry k↔n+1−kk \leftrightarrow n + 1 - k is visible in the formula, since swapping kk with n+1−kn + 1 - k swaps the two binomial coefficients. Why it should be visible in the objects is the question this essay follows. The answer comes from another object counted by the same numbers, on which the symmetry is a construction rather than a calculation.

The Narayana triangle

The Narayana triangle. 1 / 1 1 / 1 3 1 / 1 6 6 1 / 1 10 20 10 1 / 1 15 50 50 15 1 / 1 21 105 175 105 21 1 / 1 28 196 490 490 196 28 1 / 1 36 336 1176 1764 1176 336 36 1
Fig. 2 The Narayana numbers for n=1n = 1 to 9, each row counting the ranges of length 2n2n by their number of peaks, checked against the ranges themselves up to n=7n = 7. Every row reads the same backwards and adds up to a Catalan number.

The triangle begins 1; 1, 1; 1, 3, 1; 1, 6, 6, 1; 1, 10, 20, 10, 1. Each row adds up to a Catalan number — 1, 2, 5, 14, 42, and on to 4,862 for n=9n = 9 — because every range has some number of peaks. The figure checks the formula against an explicit enumeration of the ranges, sorted by peaks, for every nn up to 7.

The edges of each row are easy. A range with one peak climbs all the way and descends all the way: there is only one. A range with nn peaks must alternate up and down at every step: again only one. A range with two peaks is determined by where the first descent ends and the second ascent begins — a pair of choices constrained to keep the path above sea level — and there are (n2)\binom{n}{2} of them, the triangular numbers 1, 3, 6, 10, 15 in the second diagonal. By the symmetry, the second diagonal from the right counts the same.

The formula itself follows from the method that counted the ranges in the first place, counting the paths that go wrong by reflecting them. A range with kk peaks is fixed by the positions of its kk peaks and its k−1k - 1 valleys, which gives a product of two binomial coefficients counting all such placements, and the reflection that discards the paths going below sea level removes all but one part in nn of them. The calculation produces the symmetry as an algebraic accident: it is there, and nothing in the paths says why.

From a range to a partition

The two families are matched by a rule simple enough to apply by hand, and it is worth having before the symmetry is moved from one to the other. Read a mountain range from left to right and number its down-steps 1,2,…,n1, 2, \ldots, n. Each up-step is eventually matched by the first down-step that returns to its level, as an opening bracket is matched by its closing bracket — the correspondence between ranges and balanced brackets that one sequence counting everything started from. Now put two down-steps in the same block when they come at the bottom of the same run of consecutive descents. Each run of descents begins at a peak, so the blocks correspond to the peaks, and a range with kk peaks gives a partition with kk blocks.

This is not quite yet a non-crossing partition, because the runs of descents are intervals, and a partition into intervals is far too special. The refinement that produces every non-crossing partition is to label each down-step by the up-step it closes rather than by its position, so that a block collects the up-steps closed during one run of descents. Then the blocks are nested or disjoint exactly as the matched brackets are, and nesting brackets never cross. The translation is reversible, and it sends peaks to blocks at every length, which is why the Narayana numbers count both.

The rule shows what is gained by moving. On the range, the second set of points that Kreweras needs has no natural home: the peaks are at the tops of mountains, and the complement would have to be indexed by something like the valleys plus one. On the circle the points sit in a ring and the gaps between them are a second ring of the same size, so the complement has room to live. The symmetry was always there; the circle is the drawing in which it has space.

Partitions and their complements

Partitions and their complements. 000000 -> 012345; 001102 -> 012133; 011022 -> 010232; 012345 -> 000000
Fig. 3 Four non-crossing partitions of six points round a circle (orange), each with its Kreweras complement on interleaved points (blue). The two block counts always add up to seven.

Put nn points round a circle and divide them into blocks so that no two blocks cross — no chord of one block cuts a chord of another. These non-crossing partitions are another Catalan family, and when they are sorted by their number of blocks the counts are again the Narayana numbers: for six points, 1 partition with one block, 15 with two, 50 with three, 50 with four, 15 with five, 1 with six. The correspondence with mountain ranges sends blocks to peaks.

On partitions the symmetry has a construction, found by Germain Kreweras in 1972. Place a second, blue point in each gap between neighbouring orange points. Given an orange partition, join the blue points into the largest blocks possible without crossing any orange block. The figure shows four examples. When all six orange points form one block, no two blue points can be joined, so the complement has six blocks; when every orange point is alone, all the blue points can be joined into one. In between, three orange blocks give four blue ones, and three give four again.

The two counts always add to seven — to n+1n + 1. The reason is Euler’s formula. The orange blocks and the blue blocks, drawn as polygons inside a disc, together with the regions between them, form a map on a sphere once the outside is capped off, and counting its vertices, edges and faces as in every corner pays for itself forces the total number of blocks to be one more than the number of orange points. So complementing turns a partition with kk blocks into one with n+1−kn + 1 - k, and if it is a bijection, the symmetry of the Narayana rows follows without any formula.

Every partition paired with its complement

Every partition paired with its complement. 1: 1; 2: 1,1; 3: 1,3,1; 4: 1,6,6,1; 5: 1,10,20,10,1; 6: 1,15,50,50,15,1; 7: 1,21,105,175,105,21,1; 8: 1,28,196,490,490,196,28,1
Fig. 4 Every non-crossing partition of nn points for nn up to 8, sorted by number of blocks, with bands in proportion. The complement was computed for each one and checked to be non-crossing, distinct for distinct partitions, and to have n+1n + 1 minus as many blocks.

That it is a bijection is clearest in the language of permutations. Write a non-crossing partition as the permutation π\pi that sends each point to the next point of its block, going round the circle, and let cc be the rotation that sends each point to its clockwise neighbour. Then the complement is the permutation π−1c\pi^{-1}c, whose cycles are the blue blocks. Undoing it is equally explicit — π=c K−1\pi = c\,K^{-1} — so complementing is reversible, and doing it twice gives the original partition rotated by one place.

The figure computes the complement this way for every non-crossing partition of up to eight points — 1,430 of them at n=8n = 8 — and checks three things for each: that the complement is itself non-crossing, that different partitions have different complements, and that the block counts add to n+1n + 1. No partition of eight points or fewer breaks any of the three, so each row’s bands, sorted by block count, are paired from the outside in, and each row is symmetric.

The permutation description also connects the construction to something larger. The non-crossing partitions are exactly the permutations lying on a shortest path from the identity to cc in the Cayley graph generated by all transpositions, and the number of blocks measures how far along the path a partition sits. Complementing reflects the path end to end. That reflection is why the row is symmetric — and the same picture, with the transpositions replaced by the reflections of another symmetry group, gives generalised Catalan and Narayana numbers for every finite reflection group, a theory developed by Christos Athanasiadis, David Bessis, Victor Reiner and others since the 2000s.

The equation the peaks satisfy

The Catalan numbers have a generating function satisfying a quadratic equation, the subject of the equation a sequence satisfies: a nonempty range is an up-step, a range, a down-step, and a range, so C(x)=1+x C(x)2C(x) = 1 + x\,C(x)^2. The same decomposition, tracking peaks, gives the refined version. Let N(x,t)N(x, t) count ranges by length and peaks. A range is either empty, or it begins with an up-step, a range AA, a down-step and a range BB — and the first mountain is a single peak exactly when AA is empty, in which case it contributes one peak of its own. So

N=1+x (N−1+t) N,N = 1 + x\,(N - 1 + t)\,N,

a quadratic in NN whose solution expands into the Narayana numbers. Setting t=1t = 1 recovers Catalan’s equation, as it must. The symmetry is visible here too, if one looks for it: the solution satisfies N(x,t)−1=t (N(xt,1/t)−1)N(x, t) - 1 = t\,(N(xt, 1/t) - 1), which says term by term that N(n,k)=N(n,n+1−k)N(n, k) = N(n, n + 1 - k) — the algebraic shadow of the complement, and as silent about its reason as the formula.

How many peaks a long range has

How many peaks a long range has. n=30: mean 15.5000, variance 3.8093
Fig. 5 The share of all mountain ranges of 30 up-steps and 30 down-steps with each number of peaks: exactly symmetric about (n+1)/2=15.5(n + 1)/2 = 15.5, with variance (n2−1)/(4(2n−1))=3.81(n^2 - 1)/(4(2n - 1)) = 3.81, and close to the bell curve of that mean and spread.

For long ranges the Narayana row becomes a distribution, and the figure draws it for ranges of 30 up-steps — 3.81 thousand million million of them. Its mean is exactly (n+1)/2(n + 1)/2, which follows from the symmetry alone: pairing kk with n+1−kn + 1 - k puts the average at the middle. Its variance is (n2−1)/(4(2n−1))(n^2 - 1)/(4(2n - 1)), about n/8n/8 for large nn, and its shape approaches the bell curve, as sums of many weakly dependent indicators do at a rate the central limit theorem prices.

The mean has a pleasant reading. A range of length 2n2n has 2n−12n - 1 places where a peak could occur, and on average (n+1)/2(n + 1)/2 of them do — about one in four. That is the rate for a walk that steps up or down with equal chance and has no constraint at all: a peak is an up-step followed by a down-step, with probability 1/41/4. The requirement never to go below sea level, which cuts the number of walks from (2nn)\binom{2n}{n} to the Catalan number, barely changes the local texture. It changes where the range is, not how jagged it is.

Every root real and negative

Every root real and negative. 2: -1.000; 3: -2.618,-0.382; 4: -4.791,-1.000,-0.209; 5: -7.513,-1.798,-0.556,-0.133
Fig. 6 The roots of each row’s polynomial N(n,1)+N(n,2)t+⋯+N(n,n)tn−1N(n, 1) + N(n, 2)t + \cdots + N(n, n)t^{n-1} for n=2n = 2 to 12, on a logarithmic scale: every root is real and negative, and they come in pairs rr and 1/r1/r, mirrored about −1-1.

Turn each row into a polynomial, the Narayana polynomial, and find its roots. The figure does it numerically for every row up to n=12n = 12, and the roots are all real and negative — the polynomial factors completely as a product of terms t+at + a with positive aa. Because the row reads the same backwards, the polynomial is unchanged when tt is replaced by 1/t1/t and multiplied through, so its roots come in reciprocal pairs, rr and 1/r1/r, mirrored about −1-1; for odd nn the middle root is −1-1 itself.

Real-rootedness is a strong property, and it explains the shape of the last figure. Isaac Newton proved that if a polynomial with positive coefficients has only real roots, then its coefficients satisfy ak2≥ak−1ak+1(1+1/k)(1+1/(n−k))a_k^2 \geq a_{k-1}a_{k+1}(1 + 1/k)(1 + 1/(n-k)); in particular the row is log-concave — each number’s square is at least the product of its neighbours — and so it rises to a single peak and falls, with no plateaus or second bumps. The bell shape is then forced: a real-rooted polynomial is the generating function of a sum of independent yes-or-no events, one for each root, and such sums obey the central limit theorem. The number of peaks of a random range has exactly the distribution of a sum of independent coin flips with different biases, though nobody has found coins that explain it.

The associahedron’s faces

The Narayana numbers count the associahedron's faces. dim 1: f 2,1 h 1,1; dim 2: f 5,5,1 h 1,3,1; dim 3: f 14,21,9,1 h 1,6,6,1; dim 4: f 42,84,56,14,1 h 1,10,20,10,1; dim 5: f 132,330,300,120,20,1 h 1,15,50,50,15,1
Fig. 7 The associahedron in dimensions 1 to 5: its numbers of corners, edges, two-dimensional faces and so on, and its h-numbers — which are exactly the Narayana rows.

The Narayana numbers count one more thing, and it is the most structural of all. The solid whose corners are triangulations — the associahedron — has a corner for each triangulation of a polygon, an edge for each single flip, and in general a face of each dimension for each partial dissection of the polygon. The three-dimensional one, for the hexagon, has 14 corners, 21 edges and 9 faces. The figure lists the face counts up to dimension 5, computed from Kirkman and Cayley’s formula for dissections.

Face counts of a simple polytope — one where every corner meets exactly as many edges as the dimension — can be repackaged into its h-numbers: multiply each count by (t−1)(t - 1) raised to the dimension of the faces, add, and read off the coefficients. For the hexagon’s associahedron, 14+21(t−1)+9(t−1)2+(t−1)3=1+6t+6t2+t314 + 21(t-1) + 9(t-1)^2 + (t-1)^3 = 1 + 6t + 6t^2 + t^3. The h-numbers are exactly the Narayana row, in every dimension the figure checks.

This gives the symmetry a third explanation, and it is the oldest. Max Dehn and Duncan Sommerville proved a century ago that the h-numbers of every simple polytope read the same backwards — a consequence of Euler’s formula applied to every face at once. So the symmetric split of mountain ranges into peaks is, in the language of polytopes, the symmetry of an associahedron’s faces. The h-number hkh_k also has a meaning of its own: tilt the polytope and count the corners at which exactly kk edges point downhill.

A symmetry proved but not yet seen on the ranges

The figures check the symmetry exhaustively up to eight points and on rows up to twelve, and they draw it on four examples. That every Narayana row is symmetric for every nn is proved — by the formula, by Kreweras’s complement and by Dehn and Sommerville — but the figures are instances, and the proof that complementing is a bijection is the permutation argument, not the fact that 1,430 checks pass.

The pictures also leave a question unanswered, the same kind of gap as in how far apart two triangulations can be, where a distance is known exactly and no picture of it is. Complementing explains the symmetry on non-crossing partitions, and Dehn–Sommerville explains it on the associahedron. On mountain ranges themselves, there are bijections that turn kk peaks into n+1−kn + 1 - k, built by translating a range into a partition, complementing, and translating back; but no simple, local operation on a range is known that reverses its peaks in the way the blue points reverse blocks. The symmetry is proved for ranges and is not seen in them.

And the real-rootedness of the Narayana polynomials is checked here numerically to n=12n = 12. It is proved for all nn — through the theory of polynomials with interlacing roots — but the interpretation as a sum of independent coin flips is purely formal: for no nn above small cases is there a natural set of independent events whose total is the number of peaks.

Still open: Narayana numbers beyond the reflection groups

The Narayana numbers have analogues for every finite group generated by reflections, defined through the non-crossing partitions of the group, and the symmetry, the real-rootedness and the h-vector interpretation all carry over — each proved, in the general case, by checking the classification of reflection groups type by type. A uniform proof, one that uses only the axioms of a reflection group and not the list of its types, is not known for several of these statements, and finding one is an active problem in algebraic combinatorics.

There is also a question about the third Catalan statistic in pairs of trees that count planar maps. Intervals in the Tamari lattice are counted by Chapoton’s formula and can be refined by statistics analogous to peaks; whether those refinements are symmetric, real-rooted or the h-numbers of anything is known in some cases and conjectured in others.

The symmetry that needed a second circle

Fourteen ranges split 1, 6, 6, 1 by their peaks, and every longer length splits symmetrically too. The formula N(n,k)=(nk)(nk−1)/nN(n, k) = \binom{n}{k}\binom{n}{k-1}/n shows it and explains nothing. The explanation comes from moving to a different object counted by the same numbers: on non-crossing partitions of a circle, the blocks of a partition and the blocks of its complement, drawn on interleaved points, always add to n+1n + 1. On the associahedron the same symmetry is Dehn and Sommerville’s, a consequence of Euler’s formula on every face at once. The peaks of a mountain range average one per four steps, form a bell curve whose generating polynomial has only real roots, and read the same backwards — and on the range itself, nobody has yet found the second circle.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

AssociahedronBijectionCatalan numbersDyck pathNon-crossing partitionSymmetry