How to enumerate trees from a context-free grammar
Not on the map. Why?
Abstract (arXiv)
I present a simple algorithm for enumerating the trees generated by a Context Free Grammar (CFG). The algorithm uses a pairing function to form a bijection between CFG derivations and natural numbers, so that trees can be uniquely decoded from counting. This provides a general way to number expressions in natural logical languages, and potentially can be extended to other combinatorial problems. I also show how this algorithm may be generalized to more general forms of derivation, including analogs of Lempel-Ziv coding on trees.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 0 of its 23 references that are in the map. First posted on arXiv 30 Apr 2023.
Builds on
0 of 23 references.
No references here yet.
Built on by
Citing papers per year: 2025: 1.
1 paper.
- 2025The Syntax and Semantics of einsumcited by 0
- 2025The Syntax and Semantics of einsum24 Sep 2025