Skip to main content
QUICK REVIEW

[Paper Review] Automatic Counting of Restricted Dyck Paths via (Numeric and Symbolic) Dynamic Programming

Shalosh B. Ekhad, Doron Zeilberger|arXiv (Cornell University)|Jun 2, 2020
Advanced Combinatorial MathematicsMathematics7 references6 citations
TL;DR

This paper presents a systematic approach to automatically enumerate restricted Dyck paths using numeric and symbolic dynamic programming. It introduces two Maple packages, Dyck.txt and DyckClever.txt, that generate sequences and derive algebraic generating functions and linear recurrences for Dyck paths avoiding specific run-lengths or peak/valley height constraints, enabling automated discovery of enumeration formulas via the KISS principle.

ABSTRACT

Dyck paths are one of the most important objects in enumerative combinatorics, and there are many papers devoted to counting selected families of Dyck paths. Here we present two approaches for the automatic counting of many such families, using both a "dumb" approach (driven by numeric dynamic programming) that often works in practice, and a "clever" approach, needed for larger problems, driven by "symbolic" dynamic programming. Both approaches are fully automated and implemented in Maple.

Motivation & Objective

  • To automate the enumeration of Dyck paths under various restrictions, such as forbidden run-lengths or peak/valley height constraints.
  • To demonstrate that the 'Keep It Simple Stupid' (KISS) principle enables reliable pattern recognition from initial sequence terms, even when conceptual proofs are complex.
  • To develop a general computational framework that reduces the need for manual combinatorial insight by teaching the computer to reason recursively about path structures.
  • To extend the scope of automatic enumeration beyond finite restrictions to include infinite sets of forbidden patterns via arithmetic progressions.
  • To provide a symbolic dynamic programming engine that derives exact algebraic equations for generating functions, enabling rigorous verification of guessed formulas.

Proposed method

  • Numeric dynamic programming (via Dyck.txt) generates many initial terms of the sequence by recursively counting valid Dyck paths under given constraints.
  • Symbolic dynamic programming (via DyckClever.txt) constructs algebraic equations for the generating function by modeling recursive path decompositions using symbolic variables.
  • The method models Dyck paths as compositions of subpaths with restricted run-lengths (ascending or descending) and peak/valley height conditions.
  • Recursive functional equations are derived based on the first step of a Dyck path, distinguishing cases based on whether the initial run is ascending or descending.
  • The system handles infinite sets of forbidden run-lengths by expressing them as arithmetic progressions (e.g., {2r+1} for odd lengths), enabling symbolic treatment.
  • The generating function equations are derived via recursive decomposition: for example, H_{C,C1,D,D1}(x) = x * h_{C,C2,D,D2}(x) or via subtraction rules when excluding specific small runs.

Experimental results

Research questions

  • RQ1Can the number of Dyck paths avoiding certain run-lengths (e.g., no ascending run of length 2 or descending run of length 3) be automatically computed and their generating functions derived?
  • RQ2To what extent can the KISS principle—guessing formulas from initial sequence terms—be made rigorous and automated in combinatorial enumeration?
  • RQ3Can symbolic dynamic programming be used to derive exact algebraic equations for generating functions of Dyck paths with complex restrictions, such as forbidden peak heights or run-lengths?
  • RQ4How can infinite families of forbidden patterns (e.g., all odd-length ascending runs) be encoded and processed algorithmically within a dynamic programming framework?
  • RQ5Can the method be generalized to simultaneously avoid forbidden subwords, run-lengths, and height constraints in Dyck paths?

Key findings

  • The Maple package Dyck.txt successfully computes the first 100 terms of sequences for Dyck paths avoiding forbidden run-lengths, enabling reliable pattern guessing.
  • For Dyck paths avoiding ascending runs of length 2 and descending runs of length 3, the generating function satisfies a 10th-degree algebraic equation in P, with coefficients that are polynomials in x.
  • The system correctly derives that Dyck paths with all peak heights in {1} ∪ even numbers satisfy the Motzkin recurrence, confirming Retakh’s conjecture via automated means.
  • The symbolic approach via DyckClever.txt can handle infinite sets of forbidden run-lengths, such as all odd-length ascending runs, yielding a generating function equation: 1 + (−x + 1)P + x²(x − 1)P³ = 0.
  • The method generalizes to avoid arbitrary finite or infinite sets of forbidden subwords, including combinations of forbidden run-lengths and height constraints.
  • The approach successfully derives a generating function equation for Dyck paths avoiding all ascending runs of odd length and all descending runs of even length, yielding a 6th-degree algebraic equation in P.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.