Preferrably such that ((()) ()), (() (())), (((()))), (() () ()) all were different numbers and any tree can be a number.
2026-03-28 06:30:27.1774679427
On
Is there tree-based numeral system?
181 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
One can represent finite trees by a Dyck word, that is a word of the context-free language $D^*$ generated by the grammar $S \to (S) + SS + 1$. The following article gives several possible enumerations for $D^*$:
Zoltan Kasa, Generating and ranking of Dyck words, Acta Univ. Sapientiae, Informatica, 1, 1 (2009) 109–118
See also this paper:
Yu. S. Medvedeva, Fast enumeration of words generated by Dyck grammars, Mathematical Notes 96(1-2):68-83, July 2014
These trees are known as rooted ordered trees or plane trees and their number linked to Catalan numbers (http://oeis.org/A000108). Paper with such numeral system: A numeral system for the middle levels