Download Volume 2 (December 2011)

Document related concepts

Georg Cantor's first set theory article wikipedia , lookup

Large numbers wikipedia , lookup

Location arithmetic wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Addition wikipedia , lookup

Elementary mathematics wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Published by:
Department of Mathematics, Statistics and Computer Science
Macalester College
1600 Grand Avenue
Saint Paul, MN 55105
2011 All rights reserved
Cover art: The students of Math 379: Combinatorics, Fall 2011
Editor: Andrew Beveridge
Table of Contents
For each Catalan problem below, we enumerate the 5 elements for the n = 3 case.
Nonnesting Matchings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Doug Kent and Jenna Hull
Single Stack Sortable Permutations of [n] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Michelle DeKenis and Tim Neuman
123 132 213 312 321
Two-colored Motzkin paths from (0,0) to (n-1,0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Junyi Wang
R
R
R
B
B
R
B
B
Some Sequences of Nonnegative Integers that Sum to n . . . . . . . . . . . . . . . . . . . . . . 13
Nicholas Brooks
(1,1,1) (1,2,0) (2,1,0) (2,0,1) (3,0,0)
Linear Extensions of 2 × n Posets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Amy Janett and Diana Chao
(1, 2, 3, 4, 5, 6) (1, 2, 3, 5, 4, 6) (1, 3, 2, 4, 5, 6) (1, 3, 2, 5, 4, 6) (1, 3, 5, 2, 4, 6)
A Family of Standard Young Tableaux With Two Rows . . . . . . . . . . . . . . . . . . . . . . . 25
Ryan Marshall and Nathaniel Miller
123
123
4
123
45
124
3
124
35
Catalan Staircases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Meg Naminski and Malcolm Kane
321-Avoiding Permuations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Jacob Rath and Eric Biggers
123 132 213 231 312
From Rooted Planar Trees with n Internal Vertices to Dyck Paths with n Peaks
and Beyond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Hossein Alidaee, Elise Delmas and Mike Reeks
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
Nonnesting Matchings
Doug Kent∗ and Jenna Hull†
1
Introduction
We examine the number of ways to connect 2n points which lie on a horizontal
line using n arcs, then: we denote the set of such non-nesting matchings by An .
We require that
– Each arc connects two points
– The arc lies above the points
– No arc is contained entirely below another arc
We will prove that | An | is the nth Catalan number.
2
Examples
The sets Bn for 1 ≤ n ≤ 4 are as follows, listed below.
n=1
n=2
∗ Doug
Kent hails from the metropolitan area and spends his free time playing whatever game
may be available.
† Jenna Hull is a junior mathematics major from Rock Island, IL. She enjoys bad pop music and
even worse reality television.
Macalester Journal of Catalan Numbers
2
n=3
n=4
3
Bijection to Balanced Sequence of +1 s and -1’s
We prove that | An | is the nth Catalan number by defining a bijection between this
family and a known Catalan family. Let Bn be the set of sequences of length 2n
2n
of n +1’s and n −1’s such that ∑2n
i =1 ai = 0 and ∑i =1 ai ≥ 0 for 1 ≤ k ≤ 2n. This
family of balanced sequences is counted by the Catalan numbers.
3.1
The Mapping!
We define a mapping f : Bn → An . Start by placing 2n points, one above each +1
and −1. We then connect the points in pairs. First connect the left most +1 to the
left most −1. Connect the second +1 to the second −1, and so on. Continuing in
this fashion, we ensure there are no nested arcs. Indeed, any pair of matchings
looks like one of the following diagrams:
Macalester Journal of Catalan Numbers
+1
+1
+1
+1
-1
-1
-1 +1
+1
-1
3
-1
-1
The last picture above cannot occur because the outer arc should of mapped
to the third dot, which would of given the same result as the first picture.
3.2
Injective
We show that if b1 , b2 ∈ Bn then b1 �= b2 implies that f (b1 )�= f (b2 ). a, b ∈ Bn
a ={ a1 , a2 , ..., a2n } and b ={b1 , b2 , ..., b2n }. Let k be the first index such that ak
�= bk . Without loss of generality, ak = +1 and bk = −1. In the corresponding
matchings, an arc starts at the kth dot in f ( a), while an arc ends at the kth dot of
f (b). Therefore, f ( a) �= f (b).
3.3
Surjective
We now show that the function is surjective. Given a matching in An , we create
a string of +1’s and −1’s from our arcs and dots. Assign a +1 to every left
hand endpoint and a −1 to every right hand endpoint. This results in a sequence
of length 2n of n +1’s and n −1’s. Each arc must have a left endpoint and a
right endpoint, meaning the sequence will sum to 0, and each partial sum will be
greater than or equal to 0 because you can not have more right endpoints than
left endpoints. Clearly this balanced sequence maps to our nonesting matching.
3.4
Conclusion
Our function is a bijection between An and Bn proving that our set of non-nested
matching pairs is counted by the Catalan numbers.
Macalester Journal of Catalan Numbers
4
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
Single Stack Sortable Permutations of [n]
Michelle DeKenis∗ and Tim Neuman†
1
Introduction
We examine single stack sortable permutations of [n]. A stack sortable permutation is a permutation in which the entries can be placed one by one in a stack (always in descending order from bottom to top) and removed (from top to bottom)
to an output pile to ultimately yield the identity permutation. This is perhaps
more easily understood through example. As shown in Figure 1, the permutation (3,1,2) is stack sortable.
312
12
3
2
1
3
1
2
3
123
1
2
3
Figure 1: (3,1,2) is stack sortable.
This example begins with the (3,1,2) permutation of [3]. We first place 3 in the
stack, followed by 1. We then move the 1 to the output pile because we cannot
place 2 on top of 1. We repeat this process again with 2 and finally remove 3. The
output is the identity permutation (1,2,3). We prove that the number of single
stack sortable permutations of [n] is counted by the Catalan numbers. We introduce the following notation: let Sk be the set of all stack sortable lists of size k
and Sk = |Sk |.
∗ Michelle
is a senior mathematics major from Cambridge, MA. She whips her hair back and
forth.
† Tim is a junior mathematics major from Madison, WI. He likes doing hoodrat stuff with his
friends.
6
Macalester Journal of Catalan Numbers
2
Enumeration
We list all stack sortable permutations for 0 ≤ n ≤ 4.
n
Single Stack Permutations
0
1
2
3
∅
1
12 21
123 132 213 312 321
1234 2134 4132
1243 2143 4213
1324 3124 4312
1423 3214 4321
1432 4123
4
3
Proof
We show that the number of single stack sortable permutations of [n] satisfies the
Catalan recurrence. Consider L ∈ Sk where L = (a1 ,...,an ). We split L into the
elements before n, the element n, and the elements after n. Let k be the index of
the element n, that is ak = n. Set L1 = (a1 ,...,ak−1 ) and L2 = (ak+1 ,...,an ), so that | L1 |
= k − 1 and | L2 | = n − k.
We claim if L is stack sortable then L1 must be a stack sortable ordering of [k − 1]
and the elements in L2 must be a stack sortable ordering of {k, k + 1, ..., n − 1}. The
key observation is that n is the largest element in [n] and the contents of the stack
must always be in descending order from bottom to top. Therefore n can never
be placed on top of any other numbers. For example the configuration in Figure
2 is not allowed because 4 has been placed on top of 3 in the stack.
7
Macalester Journal of Catalan Numbers
12
4
3
Figure 2
Therefore the elements in L1 must already be out of the stack before n can
be placed on the stack. In other words, we have already sorted the elements
{a1 ...ak−1 }. Next we prove that L1 must be [k − 1] . If j ∈ L1 where j > k then there
exists i ∈ [k − 1] such that i ∈
/ L1 , in other words i ∈ L2 . All elements of L1 are
removed from the stack before n is placed on the stack. This means j is removed
from the stack before i is placed on the stack. Therefore j appears before i in the
output, which is a contradiction. Therefore L1 is itself stack sortable of [k − 1].
Since the elements in L1 are [k] the elements in L2 must be the remaining elements {k, k + 1, ..., n − 1}. We now observe that L2 is a stack sortable permutation
of {a1 ...ak−1 }. Element n must be the last one removed from the stack, so, by an
argument analogous to the L1 case, L2 must be stack sortable.
ak+1 . . .an
123. . .k-1
n
Figure 3
In summary, we stack sort L1 before placing n in the stack. We then stack sort L2
before removing n from the stack. Therefore n will be the last element removed
and will complete the stack sorting process. Since the elements 1, 2, ..., k − 1 have
already been sorted by the time we get to L2 we can treat the elements of L2 as
[n − k]. In other words, we have L1 ∈ Sk−1 and L2 ∈ Sn−k . Considering all
possible positions of the element n we obtain all the stack sortable permutations
Macalester Journal of Catalan Numbers
8
of [n]. This gives the recurrence.
Sn =
n
∑ Sk −1 Sn − k
k =1
This summation is precisely the Catalan recurrence.
(1)
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
Two-colored Motzkin paths from (0,0) to
(n-1,0)
Junyi Wang∗
1
Introduction
Consider lattice paths with steps (1, 0), (1, 1) and (1, −1). A Motzkin path from
(0,0) to (n,0) never goes below x-axis. Two-colored Matzkin paths are lattice paths
where each horizontal step (1, 0) can be colored either red or blue.
Let Mn denote the set of two-colored Motzkin paths from (0, 0) to (n-1,0), and
let Mn = |Mn |. We prove that Mn = Cn , where Cn is the nth Catalan number.
2
Examples
Consider Mn for 0 ≤ n ≤ 4.
When n = 0, M0 denotes the number of Motzkin paths from (0,0) to (-1,0). As
Motzkin paths cannot go leftwards, so there is no such path. ∅
When n = 1, we automatically reach point (0, 0) from (0, 0), so there is only 1
Motzkin path in this case. That is to say M1 = 1.
When n = 2, in order to reach point (1, 0), we must take one horizontal step.
Thus, there are two elements in M2 : a red one or a blue one. This gives M2 = 2.
∗ Junyi
is a Mathematics major and Computer Science minor at Macalester College. He was
born and raised in Shanghai, China, and is the intramural Ping Pong champion.
10
Macalester Journal of Catalan Numbers
R
B
When n = 3, we need to get to point (2, 0) by 2 steps.
Case 1: Take only horizontal step (1, 0). Each step is either colored by blue or
red, and there are 2 such steps. So altogether there are 22 = 4 such paths:
R
R
R
B
B
R
B
B
Case 2: Take one step (1, 1) then one step (1, −1), and there is only one such
path.
Overall, there are 4 + 1 = 5 such Motzkin paths. As a result, M3 = 5.
When n = 4, we need to get to point (3, 0) by 3 steps.
Case 1: Take only horizontal steps. There are 23 = 8 such paths:
R
R
R
B
R
R
R
B
R
R
R
B
B
B
R
B
R
B
R
B
B
B
B
B
Case 2: Take one horizontal step only. There is only one way to perform the
remaining two steps: take step (1, 1) first and then take step (1, −1). There are
(31 ) = 3 choices to decide which step is the horizontal step and the step can be
colored either red or blue. Therefore, the total number of such paths is 3 × 2 = 6;
11
Macalester Journal of Catalan Numbers
R
R
B
B
R
B
Overall, there are 8 + 6 = 14 such Motzkin paths. This gives M4 = 14.
3
Proof
We will prove the number of two-colored Motzkin paths from (0,0) to (n-1,0) is
the nth Catalan number by showing that it follows the recurrence relation Mn =
−1
∑nk=
0 Mk Mn − k − 1 .
Consider the first step. It moves to either (1,0) or (1,1). It cannot go down to
(1,-1) because it is required that the path never goes below the x-axis.
Case 1: the first step moves to (1,0). According to our definition of Mn , we
know that the number of ways to move from (0,0) to (1,0) is M2 . Next, it has to
move from the point (1,0) to (n-1,0), which is equivalent to going from (0,0) to
point (n-2,0). Therefore, the number of ways to go from (1,0) to (n-1,0) is Mn−1 .
By using the product principle, we deduce that total number of ways of going
from (0,0) to (n-1,0) passing through the point (1,0) is M2 Mn−1 .
Case 2: the first step moves to the lattice point (1,1). Consider the first time
the path goes back to the x-axis.
Suppose that the path first goes back onto the x-axis at (j,0) where 2 ≤ j ≤
n − 1. The last step before reaching the x-axis must go from (j-1,1) to (j,0). This
means that the path must move from (1,1) to (j-1,1). There is a natural bijection
between two-colored Motzkin paths from (1,1) to (j-1,1) and two-colored Motzkin
paths from (0,0) to (j-2,0), so the number of ways is M j−1 . Next, we must move
from (j,0) to (n-1,0). Similarly, there is a natural bijection between two-colored
Motzkin paths from (j,0) to (n-1,0) and two-colored Motzkin paths from (0,0) to
(n-1-j,0), so the number of ways in this case is Mn− j . Finally, we use the product
12
Macalester Journal of Catalan Numbers
principle to count the number of ways that the paths first goes back to the x-axis
at point (j,0) and get M j−1 Mn− j .
Now we sum up all the possible ways and get
Mn = M2 Mn−1 +
n −1
∑ M j − 1 Mn − j .
j =2
We assumed that M0 = 1, so M2 = 2 = 2M0 . We rewrite this equation as
Mn = M0 Mn−1 +
n −1
∑
j =2
M j−1 Mn− j + Mn−1 M0 =
n −1
∑ M j Mn − j − 1 .
j =0
This formula is the Catalan recurrence relation. Therefore, the number of twocolored Motzkin paths from (0,0) to (n-1,0) is the nth Catalan number.
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
Some Sequences of Nonnegative Integers that
Sum to n
Nicholas Brooks∗
1
Introduction
Let Sn be sequences of non-negative integers ( a1 , a2 , . . . , an ), where
n
∑ aj = n
j =1
and
( a1 + a2 + · · · + ai ) ≥ i,
for 1 ≤ i ≤ n.
The latter condition requires that the sum of the first i elements must be at
least i. For example, when n=3, (1, 0, 2) is not a valid sequence because 1 + 0 < 2.
We prove that |Sn | is equal to the nth Catalan number.
∗ Nicholas,
class of 2013, is a double major in Computer Science and Chemistry, with a minor in Mathematics. He hails from Kingston, Jamaica and enjoys doing crosswords and solving
interesting puzzles and problems.
14
Macalester Journal of Catalan Numbers
2
Enumeration of Sequences for n ≤ 4
n
0
1
2
3
4
3
Sn
∅
(1)
(1,1) (2,0)
(1,1,1) (1,2,0) (2,1,0) (2,0,1) (3,0,0)
(1,1,1,1) (1,1,2,0) (1,2,0,1) (1,2,1,0)
(1,3,0,0) (2,0,1,1) (2,0,2,0) (2,1,0,1)
(2,1,1,0) (2,2,0,0) (3,0,0,1) (3,0,1,0)
(3,1,0,0) (4,0,0,0)
| Sn |
1
1
2
5
14
Proof: A Bijection to NE Lattice Paths
We construct a bijection from this family to a known Catalan family. Consider
the set Pn of northeast lattice paths from (0, 0) to (n, n) that do not cross above
the main diagonal connecting these points. For example, there are 5 different
northeast lattice paths when n = 3:
Figure 1: Lattice Paths in the set P3
We differentiate these lattice paths according to how many horizontal movements to the right occur at each height. We consider horizontal movements along
the bottom of the grid to occur at height zero. Therefore, horizontal movements
can occur at n − 1 distinct heights for each lattice path in an n × n grid. Since
the paths cannot go over the main diagonal, the first horizontal movement must
occur at height zero. Figure 1 shows that, when n = 3, horizontal movements
may occur at height zero, height one, and height two.
In each path, the horizontal movements end with a one unit vertical movement, ultimately culminating the path at the point (n, n). We uniquely identify
Macalester Journal of Catalan Numbers
15
each path using the number of horizontal movements that occur at each height i,
where 0 ≤ i ≤ n − 1. Note that the number of horizontal movements that occur
at height i ≥ 1 may be 0, accounting for vertical increases of seemingly more than
one unit.
Consider the lattice paths in Figure 1. Let Hi denote the number of horizontal
movements at height i. The horizontal movements corresponding to the paths
may be given by the form (H0 , H1 , H2 ). Therefore the paths in Figure 1 may also
be enumerated as (1,1,1), (1,2,0), (2,1,0), (2,0,1), and (3,0,0), respectively.
We now define our bijection f : Pn → Sn . We map a lattice path p ∈ Pn to
f ( p) = ( H0 , H1 , . . . , Hn−1 ).
We claim that ( H0 , H1 , . . . , Hn−1 ) ∈ Sn . Observe that ( H0 + H1 + . . . + Hi ) ≥
i + 1 because the lattice paths are constrained by the main diagonal. The number
of horizontal movements must offset the vertical increase to keep the path below
the diagonal. Therefore f is well-defined.
We can also show that f is injective. Consider two paths p1 , p2 ∈ Pn such that
p1 �= p2 . Let k be the first height at which p1 and p2 differ; that is, k is the height
at which the two paths first diverge. Without loss of generality, let us assume that
at this divergence k, p1 steps up while p2 steps right. This is illustrated in Figure
2 below, where the paths diverge at height 1.
Figure 2: Paths Diverging at Height k = 1
It follows that Hk,p1 < Hk,p2 because the length of the horizontal path at height
k is longer for p2 . Therefore the sequences f ( p1 ) = ( a0 , . . . , an−1 ) and f ( p2 ) =
(b0 , . . . , bn−1 ) satisfy ak < bk . Thus distinct paths in Pn map to distinct sequences
in Sn , so f is an injection.
We now show that f is surjective. Given a sequence s ∈ Sn , we can construct
a path p ∈ Pn such that f ( p) = s. Taking an element s ∈ Sn , a lattice path p
can be created by following the series of horizontal movements. Starting at (0,
0), move right s1 units to (s1 , 0). Then, move upward by 1 unit to (s1 , 1). Next,
Macalester Journal of Catalan Numbers
16
move rightward to (s1 + s2 , 1) and then move upward to (s1 + s2 , 2). This process
is repeated for subsequent values in the sequence, shifting upwards after each
horizontal shift. The relationship (s1 + s2 + . . . + s j ) ≥ j is analogous to that
previously described between ( H0 + H1 + . . . + Hi ) and i; this means that p ∈ Pn ,
and f ( p) is therefore also surjective.
Since this function f ( p) has been shown to be both injective and surjective, by
definition the function is a bijection. Therefore |Sn | = | Pn |.
The Catalan numbers count these lattice paths so, therefore, |Sn | is the nth
Catalan number.
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
Linear Extensions of 2 × n Posets
Amy Janett∗ and Diana Chao†
1
Introduction
A poset is a partially ordered set that arranges the elements within that set. It
follows the reflexive, antisymmetric, and transitive properties. This means that
for all i, j, k ∈ 2n, they must satisfy these properties:
– reflexivity: i ≤ i
– antisymmetry: if i ≤ j and j ≤ i, then i = j
– transitivity: if i ≤ j and j ≤ k, then i ≤ k
A graded poset has linear extensions that create an order of the elements of
the set. With each linear extension, every element in a set of n elements must
be included and ordered ( xi1 , xi2 , xi3 , ..., xin ). The sequence must satisfy the conditions:
– 1 < 3 < 5 < ... < 2n − 1
– 2 < 4 < 6 < ... < 2n
– for 1 ≤ i ≤ n, 2i − 1 < 2i
All other relations can be derived from these. We represent this poset as a 2 × n
grid. The 2 × 3 poset is shown below.
∗ Amy
is a Mathematics major at Macalester College. She hails from Verona, New Jersey.
is a Philosophy major and Mathematics minor at Macalester College. She is a hungry,
hungry hippo from New York City.
† Diana
18
Macalester Journal of Catalan Numbers
6
4
5
3
2
1
We present a bijection between the number of linear extensions of a poset
2 × n and the number of mountain ranges of length 2n. Through this bijection,
we find that the number of linear extensions of a poset 2 × n is the nth Catalan
number.
2
2.1
Examples for n ≤ 4
For n = 0
Consider a 2 × 0 poset. This creates the empty grid, with only one (empty) linear
extension.
2.2
Case n = 1
A 2 × 1 poset is represented by a 2 × 1 grid.
2
1
There is only 1 linear extension. This post is, in fact, a total ordering, so we will
write this extension as
(1, 2)
19
Macalester Journal of Catalan Numbers
2.3
Case n = 2
A 2 × 2 poset is represented by a 2 × 2 grid.
4
3
2
1
There are 2 linear extensions:
2.4
(1, 2, 3, 4)
(1, 3, 2, 4)
Case n = 3
A 2 × 3 poset is represented by a 2 × 3 grid.
6
4
5
3
2
1
There are 5 linear extensions:
(1, 2, 3, 4, 5, 6)
(1, 2, 3, 5, 4, 6)
(1, 3, 2, 4, 5, 6)
(1, 3, 2, 5, 4, 6)
(1, 3, 5, 2, 4, 6)
20
Macalester Journal of Catalan Numbers
2.5
For Case = 4
A 2 × 4 poset is represented by a 2 × 4 grid.
8
6
7
4
5
3
2
1
There are 14 linear extensions:
(1,2,3,4,5,6,7,8)
(1,2,3,4,5,7,6,8)
(1,2,3,5,4,6,7,8)
(1,2,3,5,4,7,6,8)
(1,2,3,5,7,4,6,8)
(1,3,2,4,5,6,7,8)
(1,3,2,4,5,7,6,8)
3
(1,3,2,5,4,7,6,8)
(1,3,2,5,4,6,7,8)
(1,3,2,5,7,4,6,8)
(1,3,5,2,4,6,7,8)
(1,3,5,2,4,7,6,8)
(1,3,5,7,2,4,6,8)
(1,3,5,2,7,4,6,8)
Bijection
Our bijection will map the linear extensions of a poset 2 × n to the Catalan mountain ranges of length 2n.
3.1
The Mapping
Let Ln be the set of all linear extensions (�1 , �2 , ..., �2n ) of a 2 × n poset. Element
�k will correspond to the kth step of the mountain range. Let Mn be the set of all
mountain ranges of length 2n. We define a bijection f : Ln → Mn as follows : if �k
is odd, the kth step is up, and if �k is even, the kth step is down. f : Ln → Mn is
well-defined in general because you return to height 0 at the end and you never
Macalester Journal of Catalan Numbers
21
go below height 0 along the way. Indeed, every linear extension � has an equal
number of odd and even components. Therefore, f (�) has an equal number of
up and down steps, so that the mountain range f (�) always returns to height 0 at
the end. Because 2i − 1 < 2i in each linear extension, there are never more even
numbers than odd numbers at any point in the linear extension. Because of this
property, there are never more down steps than up steps, so the mountain ranges
never go below sea level.
3.2
Injective
We prove that f : Ln → Mn is an injection. If a, b ∈ Ln and a �= b, f ( a) �= f (b).
This is because there is a unique parity ordering for each linear extension and
mountain range. Given a, b ∈ Ln , we show that if a �= b, then f ( a) �= f (b).
We write a = ( a1 , ..., a2n ) and b = (b1 , ..., b2n ). Let k be the first index for which
a k � = bk .
We claim that ak and bk have different parity. If they have the same parity,
without loss of generality, ak < bk . We know that ai = bi for 1 ≤ i < k, which
implies that ak ∈
/ (b1 , ..., bk−1 ). This further implies that ak appears after bk in b
since ak < bk . Because the linear extensions must adhere to the three conditions,
both odd and even components of the linear extension increase consecutively, reflecting the unique parity of the mountain ranges. Consider the 2 × 3 poset. For
f ((�1 , �2 , ..., �2n )), (�1 , �2 , ..., �2n ) maps to mn .
3.3
Surjective
We prove that f is surjective. Given a mountain range m ∈ Mn , we find a linear
ordering � ∈ Ln such that f (�) = m.
For intuition, we examine the Catalan mountain ranges of length 6. Staring
with a mountain, label the ith up setp as oi and the ith down step as ei . In the
case of n = 3, we get the lists of length six in Table 1.
Next, replace oi with 2i − 1 and replace ei with 2i, as shown in Table 2.
22
Macalester Journal of Catalan Numbers
Linear extension
Parity
(1,2,3,4,5,6)
(o1 , e1 , o2 , e2 , o3 , e3 )
(1,2,3,5,4,6)
(o1 , e1 , o2 , o3 , e2 , e3 )
(1,3,2,4,5,6)
(o1 , o2 , e1 , e2 , o3 , e3 )
(1,3,2,5,4,6)
(o1 , o2 , e1 , o3 , e2 , e3 )
(1,3,5,2,4,6)
(o1 , o2 , o3 , e1 , e2 , e3 )
Mountain
Figure 1: Linear extension, parity, and mountain ranges
The resulting list contains all the elements of the linear extensions of a 2 × n
poset and follow the rules of a graded poset. This list clearly maps to the original
mountain, so f is surjective.
4
Conclusion
We have shown that f : Ln → Mn is a bijection. We know that the number of
mountain ranges of length 2n is the nth Catalan number, so the number of linear
extensions of a poset 2 × n is also the nth Catalan number.
23
Macalester Journal of Catalan Numbers
Mountain
Parity
(o1 , e1 , o2 , e2 , o3 , e3 )
(o1 , e1 , o2 , o3 , e2 , e3 )
(o1 , o2 , e1 , e2 , o3 , e3 )
(o1 , o2 , e1 , o3 , e2 , e3 )
(o1 , o2 , o3 , e1 , e2 , e3 )
Figure 2: Mountains and parity
24
Macalester Journal of Catalan Numbers
Parity
(o1 , e1 , o2 , e2 , o3 , e3 )
(o1 , e1 , o2 , o3 , e2 , e3 )
(o1 , o2 , e1 , e2 , o3 , e3 )
(o1 , o2 , e1 , o3 , e2 , e3 )
(o1 , o2 , o3 , e1 , e2 , e3 )
Linear extension
(1,2,3,4,5,6)
(1,2,3,5,4,6)
(1,3,2,4,5,6)
(1,3,2,5,4,6)
(1,3,5,2,4,6)
Figure 3: Parity and linear extensions
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
A Family of Standard Young Tableaux With
Two Rows
Ryan Marshall∗ and Nathaniel Miller†
1
Introduction
A Standard Young Tableau is a Ferrer’s Diagram with m boxes, where we insert
the elements of [m], one element per box. The rows and columns of a Young
Tableau must both be increasing, and if an integer k appears, then so must all
positive integers less than k. Consider a Standard Young Tableau with at most
two rows, such that for all i, the ith entry of row 2 is not 2i. Let Tn be the set of
all such Standard Young Tableaux whose first row is of length n. We will prove
that | Tn | = Cn , the nth Catalan number.
2
Examples
Below, we enumerate Tn for 0 ≤ n ≤ 4.
∗ Ryan
is a Mathematics and Physics major at Macalester College.
is a Computer Science and Mathematics major at Macalester College.
† Nathaniel
26
Macalester Journal of Catalan Numbers
n
0
1
2
3
4
Tn
∅
1
12 12
3
123 123 123 124 124
4
45 3
35
1234 1234 1234 1234 1235
5
56
567 4
1235
46
1235
467
1236
45
1236
457
1245
36
1245
367
1246
35
1246
357
1245
3
| Tn |
1
1
2
5
14
From the table, we see that for 0 ≤ n ≤ 4, | Tn | indeed are equal to the Catalan
numbers.
3
Proof
We show that there is a bijection from Tn to the mountain ranges of length 2n,
which we denote M2n . First, we define a bijection from Tn to partial mountain
ranges, Pn , and then we define a bijection from Pn to M2n . Pn is the set of mountain ranges that begin with one up step, have exactly n up steps and at no point
in the partial mountain range are there as many down steps as there are up steps.
Note that no Pn goes below height one after the first step.
Let us first define our mapping, f : Tn → Pn . For each tableau, let the numbers
in the top row represent up steps and the numbers in the bottom row represent
down steps. The number in the box indicates the index of the corresponding step.
Additionally, we will define an inverse mapping, g : Pn → Tn . For a partial mountain range, let ( a1 , a2 , ..., an ) be the indices of the up steps and (b1 , b2 , ..., bk ) be the
indices of the down steps for k ≤ n. Let t be the Standard Young Tableaux whose
27
Macalester Journal of Catalan Numbers
first row is ( a1 , a2 , ..., an ) and whose second row is (b1 , b2 , ..., bk ). Note that when
k = 0 there is no second row. Given any p ∈ Pn it is clear g( p) ∈ Tn . Indeed, the
ith element of the second row is 2i only when there are an equal number of up
and down steps in the first 2i steps. Thus f is surjective.
Here we show Tn , Pn , and M2n for 0 ≤ n ≤ 3:
n
0
1
Tn
∅
1
2
12
Pn
∅
M2n
∅
12
3
3
123
123
4
123
45
124
3
124
35
To show f is injective consider t1 , t2 ∈ Tn such that t1 �= t2 . Suppose for the
sake of contradiction that f (t1 ) = f (t2 ). There are two cases to consider. The first
case is that t1 does not have the same number of boxes in the second row as t2
does. The second case is that the first row of boxes in t1 does not match the first
Macalester Journal of Catalan Numbers
28
row of boxes in t2 . Note that if the second row of boxes in t1 does not match the
second row of boxes in t2 , it must be the case that either there is a mismatched
box in the first row or the second rows have different numbers of boxes. In the
first case, we see that f (t1 ) will have a different number of down steps than f (t2 ),
so f (t1 ) �= f (t2 ). In the second case, we see that the indices of up steps in f (t1 )
will be different than the indices of up steps in f (t2 ). This contradicts our assumption that f (t1 ) = f (t2 ), so it must be the case that f (t1 ) �= f (t2 ) if t1 �= t2 .
Therefore f is injective.
Since f is both injective and surjective, it is a bijection.
Let us define a mapping, h : Pn → M2n as follows: remove the first up step,
add an up step after the last step in the partial mountain range, and then add
down steps to the end until the numbers of down steps and up steps are equal.
We can also think of this as getting back to sea level. Clearly this operation is
invertible by adding an up step at the beginning and then removing the last up
step and all the following down steps. Additionally, we can see that h−1 is well
defined for all m ∈ M2n because no m has more down steps than up steps at any
step.
Thus h ◦ f is an invertible mapping from Tn to Pn to M2n and we can conclude
| Tn | is the nth Catalan number.
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
Catalan Staircase
Meg Naminski∗ and Malcolm Kane†
1
Introduction
A staircase Tn is a rectilinear shape with height of n, and decreasing widths from
n to 1. For n = 3, T3 looks like:
Figure 1: Staircase T3
A Catalan staircase is Tn divided into n rectangles. We count the number of
Catalan Staircases of size n as being the number of ways to compose a Catalan
staircase using n rectangles. To form a Catalan staircase of size 3, we simply find
all the ways to divide the above shape into 3 rectangles. Let Sn be the set of all
Catalan staircases of size n. We prove that |Sn | is the nth Catalan number.
2
Examples
The sets Sn for 0 ≤ n ≤ 4 are as follows. Note that we let |S0 | = 1, where S0 =
{∅}. In the table below, we give all the ways to subdivide Tn into n rectangles.
∗ Meg
is a junior Computer Science and Mathematics major who enjoys swing dancing, martial
arts, and hates spiders.
† Malcolm is a junior Computer Science and Mathematics major. When he’s not busy being
swamped by work or Mock Trial, he likes to spend excessive amounts of time playing flash games
and watching T.V.
30
Macalester Journal of Catalan Numbers
n
Sn
|Sn |
0
∅
1
1
1
2
2
3
5
4
14
Figure 2: Catalan Staircases for S0 , S1 , S2 , S3 , and S4
31
Macalester Journal of Catalan Numbers
3
Recurence Relation
We show that |Sn | satisfies the Catalan recurrence. We show how to combine
si ∈ Si and sn−1−i ∈ Sn−1−i to obtain a staircase in Sn . Given smaller staircases
si and sn−1−i for 0 ≤ i ≤ n − 1, we arrange them so that si takes up the top-right
corner of Tn and sn−1−i takes up the bottom left corner. We use a total of n − 1
rectangles in these two staircases. The nth rectangle ω takes up the remaining
area of the top left corner of the staircase. In the diagrams below for n = 4, we
shade ω. Since the two staircases are always put in the corners, ω is i + 1 by n − i
for 0 ≤ i ≤ n − 1.
ω
S3
S0
ω
S2
S1
ω
S1
S2
ω
S3
S0
Figure 3: Breakdown of division of S3 into smaller Catalan Staircases
Here T4 can be subdivided. This shows that |S4 |, satisfies the recurrence
relation:
|S4 | = |S0 | ∗ |S3 | + |S1 | ∗ |S2 | + |S2 | ∗ |S1 | + |S0 | ∗ |S3 |
We now prove that in general, |Sn | satisfies the Catalan recurrence relation:
|Sn | = |Sn−1 | ∗ |S0 | + |Sn−2 | ∗ |S1 | + ... + |S1 | ∗ |Sn−2 | + |S0 | ∗ |Sn−1 |
First, we prove that any staircase Tn must be divided into a minimum of n
rectangles. Define a step on a staircase to be the rightmost square in each row.
Each staircase of size n has a total of n steps. The following shows the 3 steps on
a staircase of size 3.
A rectangular block cannot contain more than one step, so we need at least
n rectangles. Recall that ω is the rectangle starting in the upper left corner of
Tn . This rectangle must contain one step or we would require at least n more
rectangles to cover all steps. Therefore, every Catalan staircase contains a rectangle
ω of dimension i + 1 by n − i for some 0 ≤ i ≤ n − 1. So there are n possible ω.
Macalester Journal of Catalan Numbers
32
Figure 4: T3 with three steps greyed out
Removing ω gives two Catalan staircases, Si on the right and Sn−1−i below. For
each possible ω, the subdivision can be completed in |Si | ∗ |Sn−1−i | ways.
4
Bijection
We can also create a bijection for Sn to another counted Catalan problem. Let Rn
be the set of rooted trees with n edges and n + 1 nodes. The map f : Sn → Rn
is defined as follows. We place the root node of the tree above the staircase. We
then place a node in each of the blocks in the staircase. We connect the root node
to the nodes of blocks within the top row, and all other nodes from the top down
such that for each block, its node is connected to the nodes of any blocks adjacent
to its bottom edge.
We prove that the mapping of f : Sn → Rn is injective through induction.
Base Case: For all s ∈ S0 and all s ∈ S1 , s is unique. The figure below shows
that f is injective for f : S0 → R0 and f : S1 → R1 .
Inductive Step: Assume that for all k < n, all s1 , s2 ∈ Sk , f (s1 ) �= f (s2 ).
Proof: Observe that in creating the rooted tree r from Catalan Staircase s, the
furthest left child of the root node must represent ω, the rectangle containing the
top left corner of s. We have two sets of Catalan Staircases adjacent to ω. The
staircase to the right of ω, s a , forms one subtree of the rooted tree, r a , and the
staircase below ω, CSb , forms a subtree rooted at the node representing ω. For
all s1 , s2 ∈ Sn , where s1 �= s2 , we show f (s1 ) �= f (s2 )
Case 1: ω1 �= ω2 : The number of rectangles in sb1 �= sb2 . This means that
rooted trees associated with sb1 and sb2 have a different number of nodes, and
therefore are different.
Case 2: ω1 = ω2 : Since s1 �= s2 , either sb1 �= sb2 and/or s a1 �= s a2 . Since
all of these Catalan Staircases are in one of the sets Sk where k < n, this means
Macalester Journal of Catalan Numbers
33
Figure 5: Mapping of S3 to R3
that either sb1 and sb2 map to different rooted trees, and/or s a1 and s a1 map to
different rooted trees.
This proves that for all s1 , s2 ∈ Sn , where s1 �= s2 , s1 and s2 map to unique
rooted trees.
To prove that the conversion of Sn to Rn is surjective, we must first establish
some truths of Catalan staircases. We recall our definition of a step from above.
We also recall that there cannot be a rectangular block that contains more than
one step. Therefore, if we divide the staircase into n blocks, we know that each
34
Macalester Journal of Catalan Numbers
n
0
Sn → Rn
∅
1
Figure 6: Base cases S0 → R0 and S0 → R0
step on the staircase of height n must correspond to a unique block. For any
block bk where 1 ≤ k ≤ n, the blocks directly beneath bk , will form a smaller
staircase Twk −1 , which will be equal in height to one less than the width of the
original block. This smaller staircase will divide into a number of blocks equal
to its height. Therefore, if we let ik equal the number of blocks directly below bk ,
and wk equal the width of bk , we have wk = ik + 1.
We can determine a similar equality for the height of bk in relation to the
blocks directly to its right. If we let jk equal the number of blocks directly below
bk and hk equal the height of bk , we have: hk = jk + 1.
Looking at a rooted tree, we define the descendents of a node to be any children of a node in addition to their children and their children’s children, etc. We
define the siblings of a node to be any the fellow children of that node’s parent.
Similarly, the right siblings of a node are any siblings that are situated to the right
of the node. We define desc(k) to be the number of descendents of a node and
right(k ) to be the sum total of a node’s right siblings and descendents of those
siblings. We know each node on the tree (except for the root), corresponds to a
block in the staircase. For any node vk which corresponds to block bk , we can
determine the number of blocks beneath bk by looking at desc(k). From this, we
can determine for bk , wk = desc(k ) + 1. We can also determine the number of
blocks next to bk by looking at right(k ). From this we can determine that for bk ,
hk = right(k ) + 1.
35
Macalester Journal of Catalan Numbers
Using the rules that for each node vk , block bk must be directly under the
block corresponding to vk ’s parent, and directly right to the block corresponding
to vk ’s left sibling, we can reconstruct the Catalan staircase for any rooted tree.
0
2
1
3
Figure 7: A rooted tree that we will use to construct a Catalan Staircase
For example, to convert the above rooted tree, to its Catalan staircase, we first
figure out the sizes of the blocks for each node. We know v0 is the root node, and
will be placed at the top outside the staircase. We calculate the block sizes in the
following table.
k
1
2
3
desc(k )
2
0
0
right(k )
0
1
0
block size
1x3
2x1
1x1
Figure 8: Creation of Catalan Staircase
With this information, we can construct the Catalan staircase for this rooted
tree.
0
1
2
3
Figure 9: Rooted Tree and equivalent Catalan Staircase
Macalester Journal of Catalan Numbers
36
Thus, since we have proved both an injection and a surjection, we have proven
a bijection between Sn and Rn . Therefore |Sn | is the nth Catalan number.
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
321-Avoiding Permutations
Jacob Rath∗ and Eric Biggers†
1
Introduction
Consider permutations a1 a2 . . . an of [n] with longest decreasing subsequence
length at most two; that is, there does not exist some i < j < k where ai > a j > ak .
We shall call such permutations 321-avoiding permutations. Let Pn be the set of 321avoiding permutations of size n. We will prove that | Pn | = Cn , the nth Catalan
number.
2
Enumeration for 0 ≤ n ≤ 4
n
0
1
2
3
4
∗ Jacob
Pn
∅
1
12 21
123 132 213 231 312
1234 1243 1324 1342
1423 2134 2143 2314
2341 2413 3124 3142
3412 4123
| Pn |
1
1
2
5
14
Rath is an Art & Math Double Major at Macalester College with a Minor in Kitten and
Feline Studies. In his spare time, he enjoys puzzles, modern art museums, and making cats chase
after lasers.
† Eric is sophomore majoring in computer science and mathematics. He is from Verona, Wisconsin.
Macalester Journal of Catalan Numbers
3
38
Bijection
Let Mn denote the set of mountain ranges of length 2n. We show that there is a
bijection between Pn and Mn .
3.1
Defining f : Pn → Mn
First, we define a function f : Pn → Mn . We create a mountain range from
a permutation p = ( a1 , a2 , . . . , an ) ∈ Pn in the following way. First, begin the
mountain range with a1 up edges followed by one down edge. Then, go through
every index 2 ≤ i ≤ n, in order, and examine the value of ai . If ai > a j for all 1 ≤
j < i, then add ai − max( a1 , a2 , . . . , ai−1 ) up edges and one down edge. Otherwise,
add one down edge. Table 1 shows some examples of how this function maps
elements of P4 to elements of M4 .
3.2
Proof that the codomain of f is Mn
For any p = ( a1 , a2 , . . . , an ) ∈ Pn , f ( p) must be in Mn . To prove this, we show
that f ( p) must be a mountain range of length 2n, must end at sea level, and must
never drop below sea level.
Consider the longest increasing subsequence ( am1 , am2 , . . . , amk ), taken from
p, where a j < ami for all 1 ≤ j ≤ mi − 1. We call this the significant increasing
subsequence of p. It is the list of partial maximums in the order that they are
encountered in the permutation. In other words, we form ( am1 , am2 , . . . , amk ) by
appending an element when a new maximum is encountered in p while traversing its elements in order. We know that the only times that up edges appear
in the mountain range f ( p) are when we reach some element in this significant
increasing subsequence. Indeed, if we reach some other integer in p that is not
the maximum integer that has been seen so far, then we would only add a down
edge. Let am0 = 0 for the sake of convenience. The number of up edges added
by any ami is equal to ami − ami−1 . We therefore have that the total number of up
edges is equal to:
( am1 − am0 ) + ( am2 − am1 ) + ( am3 − am2 ) + · · · + ( amk − amk−1 ) = amk − 0 = n,
39
Macalester Journal of Catalan Numbers
Table 1: An illustration of how f maps 321-avoiding permutations to mountain
ranges.
321-avoiding permutation
12
Mountain range
21
→
123
→
213
→
1234
→
2134
→
2
2
1
2
→
312
1324
1
→
2
3
1
3
3
1
2
3
1
2
→
1
3142
4123
→
→
→
1
3
4
2
4
3
4
1
4
2
3
4
2
2413
1
1
4
1
2
3
2
3
where the last equality follows from the fact that the largest element in the permutation of [n] is the integer n.
Macalester Journal of Catalan Numbers
40
We also know that there are exactly n down edges in the mountain range
because there is exactly one down edge associated with each element of the permutation p. It follows that the mountain range f ( p) is of length 2n and ends at
exactly sea level.
It remains to be shown that f ( p) never drops below sea level. For any 1 ≤
k ≤ n, we can construct a partial mountain range from the first k elements
{ a1 , a2 , . . . , ak } of p by following the same procedure that the function f uses
to construct the full mountain range from p. If none of these partial mountain
ranges end below sea level, then the full mountain range must never drop below sea level. Since all elements of p are unique positive integers, we know that
max{ a1 , a2 , . . . , ak } ≥ k. This maximum is the number of up edges in the partial
mountain range. The number of down edges in the partial mountain range is k,
since there are k elements in the sequence from which it is constructed. It follows that the number of up edges in the partial mountain range is greater than
or equal to the number of down edges in the partial mountain range, so it ends
at or above sea level. Since this is true for any 1 ≤ k ≤ n, f ( p) must never drop
below sea level. This completes the proof.
3.3
Proof that f is injective
We now show that f is injective. By definition, this requires that for any p1 ∈ Pn
and p2 ∈ Pn , p1 �= p2 implies f ( p1 ) �= f ( p2 ); that is, two different 321-avoiding
permutations of the same length must map to different mountain ranges.
Let p1 = ( a1 , a2 , . . . , an ) ∈ Pn and p2 = (b1 , b2 , . . . , bn ) ∈ Pn , where p1 �= p2 .
Let S1 = ( ac1 , ac2 , . . . ac j ) be the significant increasing subsequence of p1 , and let
S2 = (bd1 , bd2 , . . . , bdk ) be the significant increasing subsequence of p2 .
Since |S1 | = j and |S2 | = k, the mountain range f ( p1 ) must have j parts consisting of only up edges, where each part either begins at the beginning of the
mountain range or immediately after a down edge, and each part ends immediately before a down edge. Likewise, f ( p2 ) must have k of these parts, defined in
the same way. If j �= k, the numbers of these parts must differ between the two
mountain ranges, so f ( p1 ) �= f ( p2 ) in this case.
If j = k, consider the lowest i such that ci �= di or aci �= bdi . If there was not
such an i, then ci = di and aci = bci for all i. This would yield two identical
significant increasing subsequences, and therefore the same permutation. We
Macalester Journal of Catalan Numbers
41
can take the values in S1 (or S2 , as they would be the same) and lay them out
in n empty spaces, such that each element in S1 goes in the slot of the same
index from which it originally came in p1 . From this arrangement, exactly n − j
numbers must be added to the empty spaces to create a permutation of [n]. In
order for this permutation to be a valid 321-avoiding permutation, these n − j
numbers must be added in increasing order. This is because if any two of these
added numbers are not arranged in increasing order, they must form a decreasing
subsequence of at least length 3, as there must be some previous element that is
part of the significantly increasing subsequence and is greater than both of these
two numbers. There must be a unique way to construct a valid 321-avoiding
permutation from S1 , given indices and values in the original permutation from
which the elements of S1 are taken. This valid 321-avoiding permutation can only
be the original permutation from which S1 was taken.
It follows that in order for there to not be such an i as described above, p1
would have to be equal to p2 , which is a contradiction because we are assuming
that p1 �= p2 . Therefore, there must be some 1 ≤ i ≤ j such that ci �= di or
a ci � = d ci .
Consider the first such i. If aci �= bdi , then the mountain ranges f ( p1 ) and
f ( p2 ) differ at this up slope because different numbers of up edges will be added
to them. Indeed, the number of up edges added to f ( p1 ) is aci − aci−1 , while the
number of up edges added to the mountain range being built from p2 is bdi − bdi−1
if i > 1, or bd1 if i = 1. Neither of these quantities are equal to each other, so the
mountain ranges must differ.
Suppose instead that ci �= di and aci = bdi . Then the mountain ranges f ( p1 )
and f ( p2 ) again must differ, but this time due to the number of down edges that
occur just before the up edges associated with aci and bdi , respectively. The number of consecutive down edges that occur between any two consecutive members
of the significantly increasing subsequence of a 321-avoiding permutation must
be equal to the number of elements of the permutation in between (positionwise)
those two members plus one, as each of these elements is associated with one
down edge, and the smaller member is also associated with a down edge. Since
ci − ci−1 �= di − di−1 (note that i ≥ 2, since c1 = d1 = 1), it must be the case that a
different number of consecutive down edges occurs in this place in the mountain
ranges f ( p1 ) and f ( p2 ), so f ( p1 ) �= f ( p2 ).
Combining the previous results, it is proven that if p1 �= p2 , then f ( p1 ) �=
Macalester Journal of Catalan Numbers
42
f ( p2 ), so f must be injective.
3.4
Defining g : Mn → Pn
We will now define a function g : Mn → Pn that maps mountain ranges of length
2n to 321-avoiding permutations of length n. First, divide the mountain range
into n sets E1 , E2 , . . . , En , where E1 includes all the edges up to and including
the first down edge and for all k ≥ 2, Ek includes all the edges after the (k − 1)th
down edge up to and including the kth down edge. Each of these sets will include
one down edge and some number of up edges. Let uk be the number of up edges
in the set Ek .
Let the sequence p = ( a1 , a2 , . . . an ) represent permutation of [n] we are constructing, where ak is the kth digit of the permutation. Initially, all the digits in
this sequence are undetermined. First, set a1 to be u1 . Then, for each 2 ≤ k ≤ n,
consider the value of uk . If uk > 0, then let ak = ∑ik=1 ui , which is the total number
of up edges that appear before the kth down edge for all Ek that contain at least
one up edge. Otherwise, if uk = 0, set ak = 0 for the time being.
Let ( a f1 , a f2 , . . . , a f j ) be the subsequence of increasing positive integers, and let
( ae1 , ae2 , . . . , aen− j ) be the subsequence of zeros. The latter subsequence may be
empty (if j = n), in which case the permutation of [n] from the mountain range
is simply { a f1 , a f2 , . . . a f j }.
Consider the sequence [n] \ { a f1 , a f2 , . . . , a f j } = { g1 , g2 , . . . , gn− j } arranged in
increasing order. We now fill in the missing values of p by setting aek = gk for
1 ≤ k ≤ n − j. The sequence { a1 , a2 , . . . , an } will contain all of the integers from
( a f k ) and ( gk ), which is equivalent to containing all of the integers {1, 2, . . . , n}.
Thus, we have converted a mountain range with 2n edges into a permutation
of n. Since the ( a f k ) subsequence and ( gk ) subsequence are both increasing, it
is not possible to have a decreasing subsequence of length three or greater in
{ a1 , a2 , . . . a n }.
As a result, g : Mn → Pn maps any valid mountain range of length 2n to a
valid 321-avoiding permutation of [n].
Macalester Journal of Catalan Numbers
3.5
43
Proof that g is injective
We now have to show that g maps each mountain range of length 2n to a unique
permutation of [n]. Assume that there are two mountain ranges A and B, both of
length 2n, that map to the same permutation of n. Divide the edges in A and B
into the sets E1 , E2 , . . . , En and F1 , F2 , . . . , Fn such that each Ek contains all of the
edges after the (k − 1)th down edge in A up to and including the kth down edge
in A, while each Fk contains all of the edges after the (k − 1)th down edge in B
up to and including the kth down edge in B. Let uk and vk represent the total
number of up edges in each Ek and Fk , respectively. In order for A and B to map
to the same permutation, the number of up edges in each Ek needs to be the same
as the number of up edges in Fk for all 1 ≤ k ≤ n. But if uk = vk for all 1 ≤ k ≤ n,
then the sequences { E1 , E2 , . . . En } and { F1 , F2 , . . . Fn } would be equivalent, which
means A and B would be the same. Therefore, g is injective.
3.6
Proof that f and g are inverses
Let m ∈ Mn represent any mountain range of length 2n. As shown in section 3.4,
given any m we can produce a sequence of sets of up edges { E1 , E2 , . . . En } and a
sequence g(m) = ( a1 , a2 , . . . , an ), which is a 321-avoiding permutation of [n] that
we shall call p.
We know that the sequence ( a1 , a2 , . . . an ) contains two increasing subsequences.
The first increasing subsequence is the significant increasing subsequence S =
( ae1 , . . . ae j ). Each term in the significant increasing subsequence aer corresponds
to an Eer with | Eer | = aer − aer−1 up edges for r > 1 and | E1 | = a1 up edges
when r = 1. The second increasing subsequence is the “insignificant” increasing
subsequence T = { a f1 , . . . a f n− j }, where each term a fr corresponds to an E fr that
contains no up edges and one down edge.
Let us calculate f ( p). Each ak maps to a particular Fk , where Fk contains some
number of up edges followed by one down edge. Let the number of up edges
in Fk be uk . We know that each ak is either an element of S or T. We know that
| F1 | = a1 , and for k > 1 with ak ∈ S, we have that uk = aer − aer−1 for the er that is
equal to k. When ak ∈ T, it follows that uk = 0.
Let us consider the values of | Ek | and uk . We know that | E1 | = a1 = u1 . For all
ak ∈ S (the significant increasing subsequence), we get that | Ek | = aer − aer−1 = uk .
For all ak ∈ T, we get that | Ek | = 0 = uk . Since | Ek | = uk for all k, it follows that
Macalester Journal of Catalan Numbers
44
m = f ◦ g(m). A similar argument shows that for p ∈ Pn , we have g ◦ f ( p) = p,
which means that f and g are inverses.
4
Conclusion
Since f : Pn → Mn and g : Mn → Pn are both injective and inverses of each other,
we have | Pn | = | Mn |. Since the mountain ranges are counted by the Catalan
numbers, or | Mn | = Cn , it follows that | Pn | = Cn . In other words, the number of
321-avoiding permutations of length n is counted by the Catalan numbers.
Macalester Journal of Catalan Numbers
Volume 2 (December 2011)
From Rooted Planar Trees with n Internal
Vertices to Dyck Paths with n Peaks and
Beyond
Hossein Alidaee,∗ Elise Delmas† and Mike Reeks‡
1
Introduction
Let Tn denote the set of rooted planar trees, with n internal vertices such that
each left child of a vertex with two children is an internal vertex, and each vertex
contains at most two children.
A Dyck path is a path of upward and downward steps of unit length, which
always has a height greater than or equal to zero. A peak occurs when an upward
step U is immediately followed by a downward step D. Let Dn denote the set
of Dyck Paths with n peaks such that there are no consecutive steps of the form
UUU or UUDD.
We show that | Tn | = | Dn | = Cn , the nth Catalan number.
∗ Hossein
is a Mathematics and Economics double major at Macalester College, and moonlights
as a professional Mancala player, as well as US champion of Jenga on Android. He calls California
home.
† Elise is a Mathematics major at Macalester College. She is a Saint Paul, MN native who
participates in Morris dancing in her free time.
‡ Mike is a Mathematics major and Computer Science minor. While he reveals no activities of
interest, readers can feel free to project any one of world-champion equestrian, international man
of mystery, and renowned concert cellist to his persona.
46
Macalester Journal of Catalan Numbers
2
Examples
2.1
The Tree Family Tn
Below are graphical representations for the sets Tn , such that 0 ≤ n ≤ 4.
n
| Tn |
Tn
0
1
∅
1
1
2
2
3
5
4
14
47
Macalester Journal of Catalan Numbers
These examples are in contrast with the following non-example:
which is not in T3 since there are two left children, colored red, which are not
internal vertices.
2.2
The Dyck Path Family Dn
We now observe all the representations of Dn for the sets Dn , such that 1 ≤
n ≤ 4.
n
| Dn |
Dn
0
1
∅
1
1
2
2
3
5
48
Macalester Journal of Catalan Numbers
n
Cn
4
14
Dn
The following example illustrates a Dyck path with four peaks that is not in
T4 because it has an UUDD sequence of edges at its final peak:
3
3.1
Bijections
From Dyck Paths to Rooted Planar Trees
We define a bijection ψ : Tn → Dn . Consider a tree t ∈ Tn . Define the degree of an
internal vertex v to be the number of children of v. Let Rv be the first ancestor of
v that is the right child of a vertex of degree 2 (if no such vertex exists, Rv = ∅)
and A(v) to be the set of ancestors of v, excepting its parent, up to and including
Rv . Finally, define H (∅) = 0 and recursively define
H (v) =
∑
ν∈ A(v)
deg(ν) − | A(v)| + H ( Rv )
Define the mapping f from{1, 2} to a sequence of up and down edges as
follows:
49
Macalester Journal of Catalan Numbers
f (1)
f (2)
�→
�→
We will apply f to internal vertices of trees in Tn to obtain our bijection.
We now define ψ : Tn → Dn . Beginning at the root vertex, apply f to every
left internal child, drawing a continuous mountain range and extending it at each
vertex. Once no more left internal children remain along the leftmost path, move
back to the first (i.e., highest) degree 2 vertex. At each internal right child v,
return the mountain range to the height H (v) through a sequence of consecutive
down edges. Intuitively, H (v) may be understood as the height at which the peak
corresponding to the parent of v begins.
Note that this operation always either returns the mountain range to sea level
or above sea level. Since every left child of a vertex of degree 2 of a tree in Tn is
an internal vertex, any right vertices must be encountered sometime after two up
edges followed by a down edge appear in the mountain range being constructed;
furthermore, no sequence of left children will ever decrease the height below 1.
Finally, apply f to each left internal child starting at v, and return to v when none
remain. Repeat this process until no more internal vertices remain, and then return the mountain range to sea level.
For an example of ψ, consider the tree in T9 depicted below.
v5
v3
v4
v1
v2
v6
v7 v8
v9
The information relevant for the construction of a Dyck path from this tree is
50
Macalester Journal of Catalan Numbers
summarized in the below table.
v1
v2
v3
v4
v5
v6
v7
v8
v9
deg(vi )
1
2
1
2
1
2
1
1
1
A ( vi )
∅
∅
{ v1 }
{ v1 , v2 }
{ v1 , v2 , v3 }
{ v1 }
∅
∅
v6
R vi
∅
∅
∅
∅
∅
∅
v6
v6
v6
H ( R vi )
0
0
0
0
0
0
0
0
0
H (v)
0
0
1
3
4
0
0
0
1
We begin at the root, v1 . It has degree 1, so f (deg(v1 )) = f (1) = UD.
Next, we move to v2 , the only internal child of the root. It has degree 2, so
f (deg(v2 )) = f (2) = UUD.
We move to v3 since it is the left child of v2 . f (deg(v3 )) = f (1) = UD.
Next, v4 has degree 2, so we add an UUD:
The last remaining left internal child on this branch is v5 , which has degree 1.
Macalester Journal of Catalan Numbers
51
Now, no more left internal vertices remain among this branch, so we must return
to v2 , the last split vertex with two internal children. It has one right internal
child, v6 , which itself has two children. So, f (deg(v6 )) = f (2) = UUD, but this
peak must begin at H (v6 ). Since the only non-parental ancestor of v6 is the root,
which has degree 1, H (v6 ) = 1 − 1 = 0, so we must return the mountain range to
sea level before drawing the new peak.
The vertex v6 has one left child, v7 , so we move to this vertex next. f (deg(v7 )) =
f (1) = UD.
Again, no left children remain, so we move back to v6 . It has one right internal
child, v8 . f (deg(v8 )) = f (1) = UD, and H (v8 ) = 0 − 0 + 0 = 0 since A(v8 ) is
empty. So, we return to sea level, and draw the peak corresponding to v8 .
Finally, v8 itself has one internal child, v9 . f (deg(v9 )) = f (1) = UD, and we
draw this peak immediately.
Figure 1: A finished Dyck path in D9 .
We now have a Dyck path in D9 , as desired.
Macalester Journal of Catalan Numbers
52
It remains to show that ψ is bijective. First, note that the mapping given by
the inverse images of Dyck paths is well-defined, i.e., each Dyck path in Dn gives
exactly one tree in Tn via inverse application of the rules of φ. Given a Dyck
path with n peaks, draw a root vertex and its left children according to (the easily
inverted) f , for as long as the Dyck path is exclusively a series of UD and UUD
peaks. Continue in this fashion until a DD sequence is encountered. This indicates that there are no further left internal children, and that a right child must
be drawn. Let k be the height at which the next peak sequence begins. Solving
the equation H (v) = k using the current tree, find the level at which the right
vertex must be then draw it according to f . Continue drawing left children of
this vertex until another DD sequence is encountered. Repeat the process until
the mountain range is finished. This process is well-defined, since every time
the change from left to right children is made, there will be a corresponding DD
sequence in the mountain range, and f is clearly invertible. Hence, the mapping
defined by taking inverse images of Dyck paths under ψ is well-defined.
Next, we show that ψ is injective. Let t1 , t2 ∈ Tn such that ψ(t1 ) ∼
= ψ(t2 ) (i.e.,
the Dyck paths that are the images of t1 and t2 have the same sequence of up and
down edges). If there are no DD sequences in ψ(t1 ), then, since f −1 is injective,
t1 ∼
= t2 easily.
Now, if there a single DD sequence in ψ(t1 ), consider the portions of the Dyck
path to the left and right of the DD sequence separately. Denote the portions of
t1 which maps to these t11 and t12 , respectively, and the portions of t2 which map
to them t21 and t22 , respectively. These portions of the Dyck path are without DD
sequences by assumption, and so, by the argument above, t11 ∼
= t21 and t12 ∼
= t22 .
Furthermore, the value of H (v) is the same in both of these inverse images; since,
in their procedural construction, only t11 and t21 have been drawn when the DD
sequence is encountered, the trees have the same structure at this point, and so
the right internal vertex will be drawn in exactly the same location in each. Since
the trees are also identical after the DD sequence, this implies that t1 ∼
= t2 .
This argument generalizes to an arbitrary number of DD sequences in ψ(t1 ).
Split the inverse images into portions which map to each part of the Dyck path
between the DD sequences. These are isomorphic in t1 and t2 by the same argu-
53
Macalester Journal of Catalan Numbers
ments as above, and at each DD sequence, the value of H (v) will be the same
for t1 and t2 . By considering these portions separated by DD sequences one at a
time, we can apply the same argument as for when there was only a single such
sequence. Hence, whenever ψ(t1 ) ∼
= ψ ( t2 ), t1 ∼
= t2 , so ψ is injective. That ψ is
bijective immediately follows as described above. Thus, | Tn | = | Dn | for all n.
For an example of ψ, we will partition the below Dyck path and invert the
process to obtain a tree. Partitioning the path at the peaks (either UD or UUD)
gives:
| v1 | v2
| v3 |
v4
| v5 |
v6 |
The first peak is an UD, so the tree begins with a single child of v1 . The next peak
is an UUD, and so v2 must have degree 2. Since every left child of a split vertex
must be an internal vertext, the next peak will correspond to the left branch of
this split. It is UD, so the left child has degree 1. At this point, if there is a
DD sequence, we return to the first vertex of degree 2, v2 , and begin drawing
right children. The next peak is UUD, so v4 has degree 2. It’s first left child,
v5 , has degree 1, since the next peak is UD. Another DD sequence follows this
peak, so we return to v4 and draw a right child, which, since the last peak is UD,
has degree 1. Drawing all the vertices in this fashion yields the original tree, as
desired:
v1
v2
v4
v3
v5 v6
3.2
From Rooted Planar Trees to the Catalan Numbers and
Beyond
Now that we have shown that | Tn | = | Dn |, we define a bijection from Tn to
a set that is known to be counted by the Catalan numbers: the set of balanced
sequences of length 2n. Let An = {( a1 , a2 , . . . , a2n ) | ai = +1 or ai = −1} such
that
54
Macalester Journal of Catalan Numbers
1. ∑2n
i =1 ai = 0 and
2. ∑ik=1 ai ≥ 0 for 1 ≤ k ≤ 2n.
In other words, An is the set of all sequences of length 2n comprised of only
-1 and +1 whose total sum is zero and for which each partial sum is greater than
or equal to zero.
Let t ∈ Tn be an arbitrary tree with k vertices. We say that a vertex has a sibling
if its parent has another child. To construct φ : Tn → An , we label all vertices of
the tree except for the root with either 1, -1, or (1,-1). Beginning at the children of
the root, label each vertex as follows: if the vertex has no siblings then label it (1, 1); if the vertex is a left child and has a sibling then label it 1; if the vertex is a right
child and has a sibling then label it -1. Place the k vertices of t in depth-first order
and then list the labels of the vertices in that order. The resulting sequence is φ(t).
For example, if we consider the labeled tree
t=
−1
1
(1, −1)
1
−1
(1, −1)
in T4 , to compute φ(t) we list the labels in depth-first order which gives the sequence φ(t) = (1, 1, −1, −1, 1, 1, −1, −1).
To show that φ is well defined we show that for any tree t ∈ Tn , φ(t) =
( a1 , a2 , . . . , a2n ) satisfies the three conditions of a sequence in An .
1. φ(t) has 2n terms.
There are n internal vertices in t, and each internal vertex has either 1 or 2
children. If an internal vertex has one child, that child contributes a (1, -1)
pair to the sequence φ(t). If an internal vertex has two children then each
child contributes one term to the sequence φ(t). Therefore, each internal
vertex contributes two terms to φ(t) and φ(t) has 2n terms.
Macalester Journal of Catalan Numbers
55
2. ∑2n
i =1 ai = 0.
As shown before, each internal vertex of t contributes a 1 and a -1 to the
sequence φ(t). Therefore the 2n terms of φ(t) are n pairs of 1 and -1, and so
it is clear that ∑2n
i =1 ai = 0.
3. ∑im=1 ai ≥ 0 for 1 ≤ m ≤ 2n.
For any 1 ≤ m ≤ 2n, we show that if there are k terms with ai = 1 and
i ≤ m and j terms with ai = −1 and i ≤ m, then k ≥ j. The sequence
φ(t) is created through a depth first traversal of the tree t, which guarantees
that the labels of any left children of internal vertices are listed before the
label of their right sibling. Therefore, if ai = −1 with i ≤ m and ai is the
label of a right child then for some � ≤ i, a� = 1. Also, children with no
siblings have the label (1, −1), which means that if there is some ai = −1
with i ≤ m which corresponds to the label of a child with no sibling then
ai−1 = 1. Therefore, for every ai = −1 with i ≤ m there is at least one
a� = 1 with � ≤ i which implies that k ≥ j and it follows that ∑im=1 ai ≥ 0 for
1 ≤ m ≤ 2n.
We show that φ is injective. Given t1 , t2 ∈ Tn with t1 �= t2 , let t1 have i vertices
and t2 have j vertices. Order the vertices of each tree in depth-first order and let
these sequences of vertices be v(t1 ) = (v1 , v2 , . . . , vi ) and v(t2 ) = (w1 , w2 , . . . , w j ).
Let k be the smallest index such that the degree of vk is not equal to the degree of
wk . This indicates that the children of vk and wk (if there are any) have different
labels. Clearly, φ(t1 ) and φ(t2 ) cannot be the same sequence.
Finally, to show that φ is a bijection we show that it is surjective by finding
the tree that maps to a given sequence. Let s ∈ An with s = (s1 , s2 , . . . , s2n ). First,
we pair each occurrence of (1, −1) in s. This gives k pairs of (1, −1) and 2n − 2k
remaining terms of s. Each (1, −1) pair corresponds to a vertex without a sibling,
and every other term of s corresponds to a vertex with a sibling so this sequence
will map to a tree with 2n − k + 1 vertices including the root. We now use s to
define a new sequence a = ( a1 , a2 , . . . , a2n−k ) where ai ∈ {1, −1, (1, −1)}. Draw
a tree from this sequence by drawing the root and defining the tree recursively.
Starting at the root of the tree,
– if ai = 1, then add a left and a right child stemming from this vertex and
move to the left child;
56
Macalester Journal of Catalan Numbers
– if ai = (1, −1), then add a child stemming from this vertex and move to it;
– if ai = −1, then move up to the right child that is closest via depth-first
traversal. This child must exist because ∑kj=1 sk ≥ 0, so for any i ≤ 2n − k
there are at least as many terms with j ≤ i such that a j = 1 as there are with
a j = −1.
As stated before, there are 2n − k + 1 vertices in the resulting tree t. Every −1
in a marks the previous vertex as not internal, and the last vertex of the tree is
always not internal. This implies that the number of internal vertices in this tree
is 2n − k + 1 − ((2n − 2k)/2 + 1) = n. Therefore, the tree t is in Tn and t clearly
maps to the original sequence s through its construction.
To illustrate, take the sequence
(1, −1, 1, 1, −1, −1, 1, −1)
in A4 . We find the (1, −1) pairs and get a = ((1, −1), 1, (1, −1), −1, (1, −1)).
Following the rules of drawing the tree from this sequence gives the tree
(1, −1, 1, 1, −1, −1, 1, −1)
�→
We find that labeling the tree and applying φ gives the sequence
(1, −1, 1, 1, −1, −1, 1, −1).
(1, −1)
1
(1, −1)
−1
�→
(1, −1, 1, 1, −1, −1, 1, −1)
(1, −1)
By showing that φ is a bijection, we have shown that | Tn | = | An | for all n, and
therefore | Tn | = | Dn | = Cn .