Infinite labeled trees: From rational to Sturmian trees

Nicolas Gast, Bruno Gaujal
2010 Theoretical Computer Science  
This paper studies infinite unordered d-ary trees with nodes labeled by {0, 1}. We introduce the notions of rational and Sturmian trees along with the definitions of (strongly) balanced trees and mechanical trees, and study the relations among them. In particular, we show that (strongly) balanced trees exist and coincide with mechanical trees in the irrational case, providing an effective construction. Such trees also have a minimal factor complexity, hence are Sturmian. We also give several
more » ... mples illustrating the inclusion relations between these classes of trees. 1147 several characterizations of Sturmian lines can be extended to discrete planes. There exist interesting relations between multidimensional continued fraction decomposition of the normal direction of an hyperplane and the patterns of its discretization. These relations mimic what happens for Sturmian sequences, [10] . Finally, another generalization is to ordered trees [4] , where Sturmian trees are defined as infinite binary automata such that the number of factors (subtrees) of size n is n + 1. The other characterizations of Sturmian words are lost once more. The aim of this paper is to do the same for unordered trees where things work better in the sense that several extensions coincide. We introduced in [11] a new type of infinite tree: unordered labeled trees, for which the left and right children of each node are not distinguishable and gave a brief presentation of their main properties. Here, we make an exhaustive study of such trees. We show that the balance property (even distribution of the labels over the vertices of the tree) coincides with a characterization of trees using integer parts of affine functions (called mechanicity). Furthermore these strongly balanced trees have a minimal factor complexity. Therefore, they can be seen as a natural extensions of Sturmian sequences in more than one aspect. This brings some hope to use them as extreme points for adapted optimization problems. Our purpose in the paper is two-fold. The first part of the paper is dedicated to the study of general unordered infinite trees with binary labels. In Section 2, we provide definitions of the main concepts as well as the basic properties of unordered trees with a special focus on the notion of density (the average number of ones) and rationality. Section 3 is dedicated to the study of the rational trees. The second part of the paper investigates balanced unordered trees and their properties. In particular, we show that strongly balanced trees (defined in Section 4) are mechanical (so that they have a density and all labels can be constructed in almost constant time). Furthermore their factor complexity is minimal among all non-periodic trees. We also investigate the general shape of strongly balanced rational trees (Section 5). We show that there essentially exists a unique strongly balanced tree with a given rational density. Also, once a strongly balanced tree is given, its density is easy to compute and we provide an efficient algorithm with polynomial complexity to test whether a rational tree is strongly balanced. Finally, Section 6 presents several examples and counter examples that illustrate the different notions presented in the paper. Infinite trees Ordered infinite trees or tree-automata Ordered infinite trees (also called tree-automata here) have been studied in [8, 4] . Ordered infinite trees are automata with an infinite number of states. An automaton is a tree-automaton if it has one initial state and each state has a uniform indegree equal to one (except for the initial state, whose in-degree is 0) and a uniform out-degree d with labels a 1 , . . . , a d on the arcs. Every node v is labeled by (v) = 1 (resp. 0) if it is final (resp. non-final). The language accepted by the tree-automaton T is a subset of A * (where the alphabet A = {a 1 , . . . a d }) and is denoted by L(T ). Thus, a word w in the free monoid A * corresponds to a node in T , and a word w in L(T ) corresponds to a node in T with label 1. Conversely, a unique tree-automaton can be associated to any subset L of A * , by labeling by one the nodes corresponding to the words in L. Classically for automata, a family of equivalence relations can be defined over the nodes of tree T : v ∼ 0 u if (v) = (u), v ∼ n+1 u if v ∼ n u and for all i, the ith child of u, ua i and the ith child of v, va i satisfy ua i ∼ n va i . By definition of ∼ n , u ∼ n v if and only if the subtree rooted in u of height n is the same as the subtree rooted in v of height n. L(T ) is recognized by its minimal deterministic automaton (possibly infinite), say A(T ). Actually, A(T ) can be obtained from the tree T by merging all the states in the tree in the same equivalence class of ∼ n for all n. An example is given in Fig. 1 where the infinite tree-automaton and the minimal automaton recognizing all the prefixes of the Fibonacci 1 word over the alphabet {a, b} is given together with the corresponding minimal automaton (which has an infinite number of states). The number of distinct subtrees of height n in T is called the complexity P(n), of T . P(n) is the number of equivalence classes of ∼ n . If P(k) ≤ k for at least one k, then it can be shown [4] that the complexity P(n) is bounded by k. This implies that the minimal automaton A(T ) has less than k states. The tree is therefore rational, since it recognizes a rational language. If a tree-automaton T is such that P(n) = n + 1 for all n, then it has a minimal complexity among all non-rational trees. Such trees have been shown to exist and are called Sturmian in [4] by analogy with the factor complexity definition of Sturmian words ( Fig. 1 gives an example). In [4] several classes of Sturmian tree-automata are presented. However such trees are not balanced and no constructive definition (as the mechanical construction for words) is known. Unordered trees and minimal graph In this paper, we rather consider a different type of tree, namely infinite directed graphs with labels 0 or 1 on nodes and with uniform in-degree 1 and out-degree d ≥ 2. Up to our knowledge, these types of tree have not yet been considered in the literature. The similarities as well as the discrepancies with ordered trees will be discussed all along the paper. 1 The Fibonacci word is the limit of the sequence f n+2 = f n f n+1 with f 0 = a and f 1 = b, see [16] for more details.
doi:10.1016/j.tcs.2009.12.009 fatcat:22hgfcxbpngn5mttfh7pstokhq