arXiv:2610.33111cs.FLOct 2026

Manuscript Offprint

arXiv:2610.33111

Formal Grammars and Generating Functions: From Algebraic Structure to Non-Algebraic and Non-Derivable Series

Zhijun Wang

ZHIJUN WANG

ABSTRACT. This paper studies the relationship between formal grammars, recursive production systems, computability, and ordinary length generating functions. We first recall the classical Chomsky–Schützenberger theorem and the commutative translation usually associated with the DSV method. We then distinguish DSV systems satisfying a finite-algebra condition from more general grammar-to-generating-function constructions. In particular, the language {anbncn:n≥1}\{a^n b^n c^n : n \geq 1\}, although not context-free, is indexed and has the rational length generating function z3/(1−z3)z^3/(1 - z^3). We show that the finite-algebra condition is sufficient for a polynomial DSV system to have an algebraic target generating function. The converse is false: the same rational generating function can arise from languages of radically different grammatical complexity.

We next establish a computability principle. If a recursively enumerable language has a computable length-counting sequence, then the language itself is recursive. Consequently, for every non-recursive recursively enumerable language, the coefficients of its ordinary length generating function form a non-computable sequence. We further deduce that a recursively enumerable language with a D-finite length generating function must be decidable.

For recursive languages, by contrast, the coefficient sequence is always computable, independently of whether the generating function is algebraic, D-finite, or transcendental.

Finally, we examine singularities of generating functions with non-negative integer coefficients. We relate productive recursion to infinite languages and finite radii of convergence, and review the Polya–Carlson dichotomy, Hadamard gap phenomena, algebraic functions, D-finite transcendental functions, and Siegel's G-functions.

The resulting picture is inherently asymmetric:

grammar ⟶\longrightarrow functional equations ⟶\longrightarrow generating function ⟶\longrightarrow analytic structure, whereas the reverse implications generally require additional information not contained in the ordinary length generating function.

CONTENTS

  1. Introduction and Preliminaries 2
  2. From Grammars to Generating Functions 2
    2.1. The classical theorem 2
    2.2. A finite-algebra criterion for DSV systems 3
    2.3. Beyond context-free grammars: a rational indexed-language example 3
  3. Why Generating Functions Do Not Determine Grammar Classes 4
  4. Computability of Length-Counting Sequences 5
    4.1. Length counting and computability 5
    4.2. Recursive languages 6
    4.3. D-finiteness as a decidability criterion 6
  5. Analytic Properties and Singularities 6
    5.1. Coefficient growth and positive radius 6
    5.2. Infinite languages and productive recursion 7
    5.3. Integer coefficients: the Polya–Carlson dichotomy 8
    5.4. Algebraic and D-finite examples 8
    5.5. Siegel's G-functions 9
    5.6. Natural boundaries and lacunary examples 10
    5.7. A unified analytic and arithmetic classification 11
  6. Discussion and Conclusion 12
    Appendix A. Examples of Integer-Coefficient Generating Functions 12
    Appendix B. A More Precise Language-Series Dictionary 13

ZHIJUN WANG

References

13