---
title: Bicolored Motzkin Paths in Combinatorics
url: https://www.emergentmind.com/topics/bicolored-motzkin-paths
type: topic
---

# Bicolored Motzkin Paths in Combinatorics

A bicolored Motzkin path (also “2-Motzkin path” or “two-colored Motzkin path”) is a lattice path from $(0,0)$ to $(n,0)$ that remains weakly above the $x$-axis and whose steps carry one of two colors or are uncolored, subject to combinatorial and sometimes parenthesis-type nesting constraints. These objects generalize classical Motzkin paths by introducing color assignments to step types and are a central tool for establishing bijections in algebraic combinatorics and enumerative geometry, notably with interval-closed sets, Young tableaux of bounded height, and constrained lattice walks. Their study encompasses precise recursions, generating functions, closed formulae, and complex bijections to combinatorial structures.

## 1. Combinatorial Definitions

A bicolored Motzkin path of length $n$ is a sequence of steps $s_1s_2\cdots s_n$, each from $(x,y)$ to $(x+1,y')$, with $y'\in\{y-1,\,y,\,y+1\}$, such that successive steps never result in negative $y$. The coloring schemes and step constraints vary by context:

- **General colored (“2-Motzkin”) case [1302.3012]:**
  - Steps:
    - $U^{(1)}=(1,1)$ (up, color 1)
    - $U^{(2)}=(1,1)$ (up, color 2)
    - $D^{(1)}=(1,-1)$ (down, color 1)
    - $D^{(2)}=(1,-1)$ (down, color 2)
    - $L=(1,0)$ (level, uncolored)
  - All subwords for each $k=1,2$ consisting of $U^{(k)},D^{(k)}$ form correctly matched parenthesis words.
  - Every $(U^{(2)},D^{(2)})$ pair is nested inside some $(U^{(1)},D^{(1)})$ pair.
  - For every prefix $\mu$,
    $$
    \#U^{(1)}(\mu)-\#D^{(1)}(\mu)\ge\#U^{(2)}(\mu)-\#D^{(2)}(\mu)\ge 0
    $$
- **Basic bicolored case [2501.09208]:**
  - Steps:
    - $U=(1,1)$ (up)
    - $D=(1,-1)$ (down)
    - $H_U=(1,0)$ (“umber” horizontal)
    - $H_D=(1,0)$ (“denim” horizontal)
    - No step ever below $y=0$.
    - $u(P)=d(P)$ for paths returning to $y=0$.

- **Interval-closed set version [2412.16368]:**
  - Steps: $U\ (1,1)$, $D\ (1,-1)$, $H_1\ (1,0)$ color 1, $H_2\ (1,0)$ color 2.
  - Bijection constraints (see Section 2).

*This diversity reflects the role of coloring—either as a local decoration or tied to more stringent parenthetical constraints.*

## 2. Recurrence Relations and Generating Functions

Bicolored Motzkin paths admit rich recursive structure and generating functions.

- **2-Motzkin recurrence [1302.3012]:**
  $$
  M_n^{(2)} = M_{n-1}^{(2)} + 2\sum_{i=0}^{n-2} M_i^{(2)} M_{n-2-i}^{(2)}, \qquad M_0^{(2)} = 1
  $$
  Functional equation:
  $$
  M^{(2)}(x) = 1 + x M^{(2)}(x) + 2x^2\left(M^{(2)}(x)\right)^2
  $$
  Closed form (unique solution vanishing at $x=0$):
  $$
  M^{(2)}(x) = \frac{1-x-\sqrt{(1-x)^2-8x^2}}{4x^2}
  $$
  Explicit coefficients:
  $$
  M_n^{(2)} = \sum_{j=0}^{\lfloor n/2\rfloor} \frac{2^j}{j+1} \binom{2j}{j} \binom{n}{2j}
  $$

- **Generic bicolored case [2501.09208], [2012.14947], [1412.1504]:**
  $$
  M(x) = 1 + 2x M(x) + x^2 M^2(x)
  $$
  $$
  M(x) = \frac{1-2x-\sqrt{1-4x}}{2x^2}
  $$
  
- **Multivariate version [2501.09208]:**
  For statistics of up/down and horizontal steps,
  $$
  M(x, y, z) = 1 + 2xz M(x, y, z) + x^2 y^2 M^2(x, y, z)
  $$
  Leading to coefficient extraction via Lagrange inversion:
  $$
  [x^n y^{2q} z^j] M(x,y,z) = \frac{n!}{j!\,q!\,(q+1)!} 2^j, ~~ \text{with}~ n = j + 2q
  $$

- **Interval-closed sets [2412.16368]:**
  $$
  C(x,y) = 1 + (x+y)C(x,y) + x y C^2(x,y)
  $$
  $$
  C(x,y) = \frac{1-x-y-\sqrt{(1-x-y)^2 - 4xy}}{2xy}
  $$$$
  A(x,y) = \frac{2}{1-x-y + 2xy + \sqrt{(1-x-y)^2 - 4xy}}
  $$

*All these recurrences are variants of the Motzkin–Schröder backbone, tailored with coloring and combinatorial constraints to encode richer object classes.*

## 3. Bijections to Algebraic and Geometric Objects

Bicolored Motzkin paths emerge naturally as canonical representatives in bijections to a variety of combinatorial objects.

- **Standard Young tableaux (SYT) of bounded height [1302.3012]:**
  - There is a bijection between 2-Motzkin paths of length $n$ and SYT of size $n$ and at most $5$ rows.
  - The bijection proceeds by recursively “peeling off” first-row tableau entries and matching with level or up–down pairs, tracking color to enforce nested structure.
  - The number of uncolored level steps in the bicolored Motzkin path equals the number of odd-length columns in the tableau.

- **Interval-closed sets in the poset $[m] \times [n]$ [2412.16368]:**
  - Every interval-closed set is in bijection with a bicolored Motzkin path satisfying:
    - $u(M)+h_1(M) = m$
    - $d(M)+h_2(M) = n$
    - No $H_2$ step on the $x$-axis is immediately followed by $H_1$.
  - Generating function $A(x,y)$ enumerates all such sets via these paths.

- **Set-valued standard tableaux [2501.09208]:**
  - Two-rowed set-valued standard tableaux are in bijection with bicolored Motzkin paths.
  - Each entry in the first row corresponds to an up-step, in the second row to a down-step, and additional entries to colored horizontals.

- **Quarter-plane and triangular walks [1412.1504], [2007.08868]:**
  - Quarter-plane walks with specified steps map bijectively to bicolored Motzkin paths.
  - Triangular walks in six directions (restricted domain) match two-colored Motzkin paths of bounded height, with horizontal steps forbidden at maximal height.
  - The “scaffolding” bijection [2007.08868] provides a linear-time mapping associating the cellwise profile of domain points to Motzkin path steps.

## 4. Enumerative Consequences and Explicit Formulas

Enumeration formulas are both explicit and refined in terms of step statistics.

- **Example values for $M_n^{(2)}$ [1302.3012]:**

| $n$ | $M_n^{(2)}$ |
|-----|------------|
| 0   | 1          |
| 1   | 1          |
| 2   | 3          |
| 3   | 7          |
| 4   | 21         |
| 5   | 61         |

- **Refined multinomial enumeration [2501.09208]:**
  For bicolored Motzkin paths of length $n$ with $i$ up/down and $j$ horizontal steps,
  $$
  N_{n,i,j} = 2^j \frac{n!}{j!\,q!\,(q+1)!}
  $$
  with $i = 2q$, $j = n - 2q$, vanishing for odd $i$.

- **Interval-closed sets in product of chains [2412.16368]:**

| $n \backslash m$ | 0 | 1 | 2 | 3  |
|------------------|---|---|---|----|
| 0                | 1 | 1 | 1 | 1  |
| 1                | 1 | 2 | 4 | 7  |
| 2                | 1 | 4 | 13| 33 |
| 3                | 1 | 7 | 30|114 |

- **Catalan representation [2012.14947],[2501.09208]:**
  $$
  m_n = \sum_{k=0}^{\lfloor n/2\rfloor} \binom{n}{2k} C_k 2^{n-2k},\quad C_k = \frac{1}{k+1}\binom{2k}{k}
  $$

## 5. Applications in Lattice Path Enumeration and Algebraic Combinatorics

Bicolored Motzkin paths provide a unifying combinatorial framework for enumerative and algebraic structures:

- **Representation-theoretic applications:** The bijective correspondence with SYTs of height 5 enables enumerative interpretations in terms of representation dimension counts and branching rules [1302.3012].
- **Poset theory:** Interval-closed sets in products of chains are efficiently counted via bicolored Motzkin path representations, revealing polynomiality in enumeration for fixed rank [2412.16368].
- **Tableaux theory:** Two-rowed set-valued standard tableaux, a key object in combinatorial commutative algebra, are enumerated and structurally analyzed using bicolored Motzkin codes [2501.09208].
- **Lattice walks:** The direct mapping to quarter-plane and triangular walks supports the analysis of walk-in-domain models with step multiplicities and boundary constraints, with implications for weighted enumerative models [1412.1504][2007.08868].

## 6. Connections to Generalized and Higher Order Motzkin Paths

Bicolored Motzkin paths form a subset of $(\vec{\alpha},\vec{\beta})$-colored Motzkin paths, corresponding to $(a,B)=(2,2)$ in the general framework [2012.14947]:

- Steps and coloring generalized to $L$-steps at height 0 and height $k>0$ with arbitrary color assignments.
- Multivariate generating functions express colored path counts, Riordan arrays, and connections to unary–binary trees and $k$-Dyck paths.
- Explicit closed-form coefficient expressions and recursive structure admit direct polynomial-combinatorial interpretations.

*A plausible implication is that techniques for analyzing colored Motzkin paths generalize to richer path models, including those with amplitude constraints, step multiplicities, and nesting properties relevant in higher-dimensional combinatorial and geometric contexts.*

Source: https://www.emergentmind.com/topics/bicolored-motzkin-paths