L11 – Catalan number and T-routes

Discrete Mathematics2026年4月8日发布 芮和
21.2K 820
5,680字
24–36 分钟

Catalan Number

Triangulation of Convex Polygons

𝒫n+2{\mathcal{P}_{n+2}}(n0)(n \geq 0): convex (n+2)(n+2)-polygons (interior angles 180\leq 180^\circ, vertices point outward)

DEFINITION: A triangulation of 𝒫n+2\mathcal{P}_{n+2}(n0)(n \geq 0) is a set of n1n-1 diagonals of 𝒫n+2\mathcal{P}_{n+2} which do not cross in their interiors.

The nnth Catalan NumberCnC_n (Euler, 1751): # of triangulations of 𝒫n+2\mathcal{P}_{n+2}(C0=1)(C_0 = 1)

Earlier findings: Ming Antu (1692-1763) in Qing court (China), established the following formula in “Quick Methods for Accurate Values of Circle Segments”:

sin(2α)=2sinαn=1Cn14n1sin2n+1α\sin(2\alpha) = 2 \sin \alpha – \sum_{n=1}^\infty \frac{C_{n-1}}{4^{n-1}} \sin^{2n+1} \alpha

Recurrence Relation: Cn+1=k=0nCkCnkC_{n+1} = \sum_{k=0}^n C_k C_{n-k}, C0=1C_0 = 1

  • 𝒫n+3\mathcal{P}_{n+3} has Cn+1C_{n+1} triangulations
  • After removing an edge ee, each triangulation of 𝒫n+3\mathcal{P}_{n+3} gives
    • a triangulation for 𝒫a+2\mathcal{P}_{a+2} and a triangulation for 𝒫b+2\mathcal{P}_{b+2}
    • a+b=na + b = n

Binary Trees

DEFINITION: A binary tree is defined recursively as follows.

  • The empty set \emptyset is a binary tree.
  • Otherwise, a binary tree has a root vertex vv, a left subtree T1T_{1}, and a right subtree T2T_{2}, both of which are binary trees.
    • left child: the root of T1T_{1} ; right child: the root of T2T_{2}
EXAMPLE: the binary trees with three vertices

THEOREM: The number of binary trees with nn vertices is CnC_{n}

  • proof is omitted

Plane Trees

DEFINITION: A plane tree (ordered tree) is defined recursively as follows.

  • A single vertex vv is a plane tree. And the vertex is called the root of the tree.
  • Otherwise, a plane tree has a root vertex vv, and a sequence (P1,,Pm)(P_{1}, \dots, P_{m}) of subtrees, each of which is a plane tree.
EXAMPLE: the plane trees with four vertices

THEOREM: The number of plane trees with n+1n+1 vertices is CnC_{n}.

  • proof is omitted

Parenthesization

DEFINITION: A parenthesization (or bracketing) of a string of n+1n+1 symbols x0,x1,,xnx_{0}, x_{1}, \dots, x_{n} consists of the insertion of nn left parentheses and nn right parentheses that define nn binary operations on the string.

  • Eugêne Charles Catalan (1814-1894) studied this problem in 1838

EXAMPLE: There are five parenthesizations on four symbols x0,x1,x2,x3x_{0},x_{1},x_{2},x_{3}

  • (((x0x1)x2)x3)\left(\left(\left(x_{0} x_{1}\right) x_{2}\right) x_{3}\right);
  • ((x0x1)(x2x3))\left(\left(x_{0} x_{1}\right)\left(x_{2} x_{3}\right)\right);
  • ((x0(x1x2))x3)\left(\left(x_{0}\left(x_{1} x_{2}\right)\right) x_{3}\right);
  • (x0((x1x2)x3))\left(x_{0}\left(\left(x_{1} x_{2}\right) x_{3}\right)\right);
  • (x0(x1(x2x3)))\left(x_{0}\left(x_{1}\left(x_{2} x_{3}\right)\right)\right)

THEOREM: The number of parenthesizations of a string of n+1n+1 symbols is CnC_{n}.

  • proof is omitted

Ballot sequence

DEFINITION: A ballot sequence of length 2n2n is a sequence of 11‘s and 1-1‘s, where

  • the number of 11‘s is equal to the number of 1-1‘s; and
  • the sum of every prefix of the sequence is nonnegative.

Bertrand’s Ballot Problem (special case): There are two candidates A and B in an election. Each receives nn votes. What is the probability pnp_{n} that A will never trail B during the count of votes?

  • First published by W. A. Whitworth (1840-1905) in 1878
  • Named after Joseph Louis Francois Bertrand (1822-1900) who rediscovered it in 1887.

EXAMPLE: AABABBBAAB is bad, since among the first 7 votes, A receives 3 but B receives 4 , which is greater than 3.

THEOREM: The number of Ballot sequences of length 2n2n is CnC_{n}.

  • proof is omitted

Dyck path

DEFINITION: A Dyck path of length 2n2n is a sequence P0=(x0,y0)=(0,0)P_{0}=(x_{0}, y_{0})=(0,0), Pi=(xi,yi)P_{i}=(x_{i}, y_{i})(1i<2n)(1\leq i<2n), P2n=(x2n,y2n)=(2n,0)P_{2n}=(x_{2n}, y_{2n})=(2n, 0) of 2n+12n+1 lattice points (points with integral entries) such that

  • (xi+1,yi+1)(xi,yi){(1,1),(1,1)}(x_{i+1}, y_{i+1})-(x_{i}, y_{i}) \in \{(1,1),(1,-1)\} for all i=0,1,,2n1i=0,1, \dots, 2n-1
  • yi0y_{i}\geq 0 for all i=0,1,,2ni=0,1, \dots, 2n
EXAMPLE: The Dyck paths of length 6 (n=3)(n=3)

THEOREM: The number of Dyck paths of length 2n2n is CnC_{n}.

REMARK: Dyck path may be called T-route generally. The name of “Dyck path” is in memory of German mathematician Walther von Dyck (1856-1934)


Shortest Path

DEFINITION: A 𝒑×𝒒\boldsymbol{p \times q}-grid is a collection of pqpq squares of side length 1, organized as a rectangle of side length pp and qq.

THEOREM: The number of shortest paths from (0,0)(0,0) to (p,q)(p,q) is (p+q)!p!q!\displaystyle\frac{(p+q)!}{p!q!}.

  • Let A={p,q}A = \{p \cdot \rightarrow, q \cdot \uparrow\} be a (p+q)(p+q)-multiset.
  • The number of shortest paths == the number of permutations of AA.

T-Route

DEFINITION: Let A=(x,y),B2A = (x, y), B \in \mathbb{Z}^2. // integral (lattice) points

  • A T-Step at AA is a segment from AA to (x+1,y+1)(x + 1, y + 1) or (x+1,y1)(x + 1, y – 1).
  • A T-Route from AA to BB is a route where each step is a T-step.

THEOREM: There is a T-route from A=(a,α)A = (a, \alpha) to B=(b,β)B = (b, \beta) only if (1) b>ab > a; (2) ba|βα|b – a \geq |\beta – \alpha|; and (3) 2|(b+βaα)2 \mid (b + \beta – a – \alpha).

  • Let A=P0,P1,,Pk=BA = P_0, P_1, \dots, P_k = B be a T-route from AA to BB, where Pi=(xi,yi)P_i = (x_i, y_i).
    • x0=a,y0=αx_0 = a, y_0 = \alpha; xk=b,yk=βx_k = b, y_k = \beta;
    • xixi1=1x_i – x_{i-1} = 1; yiyi1{±1}y_i – y_{i-1} \in \{\pm 1\} for every i=1,2,,ki = 1,2, \dots, k
  • ba=xkx0=(xkxk1)+(xk1xk2)++(x1x0)=k>0b – a = x_k – x_0 = (x_k – x_{k-1}) + (x_{k-1} – x_{k-2}) + \dots + (x_1 – x_0) = k > 0
  • βα=yky0=(ykyk1)+(yk1yk2)++(y1y0)\beta – \alpha = y_k – y_0 = (y_k – y_{k-1}) + (y_{k-1} – y_{k-2}) + \dots + (y_1 – y_0)
    • |βα||ykyk1|+|yk1yk2|++|y1y0|=k=ba|\beta – \alpha| \leq |y_k – y_{k-1}| + |y_{k-1} – y_{k-2}| + \dots + |y_1 – y_0| = k = b – a
  • b+βaα=i=1k(yiyi1+xixi1)b + \beta – a – \alpha = \sum_{i=1}^k (y_i – y_{i-1} + x_i – x_{i-1})
    • yiyi1+xixi1{0,2}y_i – y_{i-1} + x_i – x_{i-1} \in \{0,2\}
    • 2|(b+βaα)2 \mid (b + \beta – a – \alpha)

REMARK: The T-condition (1)+(2)+(3) is sufficient for the existence of a T-route.


THEOREM: Let A=(a,α),B=(b,β)2A = (a, \alpha), B = (b, \beta) \in \mathbb{Z}^2 satisfy the T-condition, where α,β>0\alpha, \beta > 0. Then # of T-routes from AA to BB that do not intersect the x-axis is

(ba)!(ba2+βα2)!(ba2βα2)!(ba)!(ba2+β+α2)!(ba2β+α2)!\frac{(b – a)!}{\left( \frac{b – a}{2} + \frac{\beta – \alpha}{2} \right)! \left( \frac{b – a}{2} – \frac{\beta – \alpha}{2} \right)!}–\frac{(b – a)!}{\left( \frac{b – a}{2} + \frac{\beta + \alpha}{2} \right)! \left( \frac{b – a}{2} – \frac{\beta + \alpha}{2} \right)!}
© 版权声明

相关文章

82 条评论

  • MuffinMittens
    MuffinMittens 游客

    这递推式每次都要从拆边开始想,记不住啊。

    孟加拉
    回复
  • 珊瑚黄
    珊瑚黄 游客

    感觉讲二叉树那段最通透,一下子串起来了。

    中国上海
    回复
  • 雪原独狼
    雪原独狼 游客

    T-route和Dyck path应该是一回事吧?一个往上走一个往下走不越界?

    中国天津
    回复
  • 问月
    问月 游客

    之前写算法题用Dyck路径模拟括号匹配,调了一晚上才过。

    中国浙江
    回复
  • 绝凛
    绝凛 游客

    Catalan数列这几个模型对应起来真神奇,像拼图对上了。

    中国
    回复