38 Recognizable Tree Languages and Finite Tree Automata
1.6 Top Down Tree Automata
The tree automata that we have defined in the previous sections are also known
as bottom-up tree automata because these automata start their computation at
the leaves of trees. In this section we define top-down tree automata. Such an
automaton starts its computation at the root in an initial state and then simul-
taneously works down the paths of the tree level by level. The tree automaton
accepts a tree if a run built up in this fashion can be defined. It appears that
top-down tree automata and bottom-up tree automata have the same expres-
sive power. An important difference between bottom-up tree automata and
top-down automata appears in the question of determinism since deterministic
top-down tree automata are strictly less powerful than nondeterministic ones
and therefore are strictly less powerful than bottom-up tree automata. In-
tuitively, it is due to the following: tree properties specified by deterministic
top-down tree automata can depend only on path properties. We now make
precise these remarks, but first formally define top-down tree automata.
A nondeterministic top-down finite Tree Automaton (top-down NFTA)
over F is a tuple A = (Q, F, I, ∆) where Q is a set of states (states are unary
symbols), I ⊆ Q is a set of initial states, and ∆ is a set of rewrite rules of the
following type :
q(f(x
1
, . . . , x
n
)) → f(q
1
(x
1
), . . . , q
n
(x
n
)),
where n ≥ 0, f ∈ F
n
, q, q
1
, . . . , q
n
∈ Q, x
1
, . . . , x
n
∈ X .
When n = 0, i.e. when the symbol is a constant symbol a, a transition rule of
top-down NFTA is of the form q(a) → a. A top-down automaton starts at the
root and moves downward, associating along a run a state with each subterm
inductively. We do not formally define the move relation →
A
defined by a top-
down NFTA because the definition is easily deduced from the corresponding
definition for bottom-up NFTA. The tree language L(A) recognized by A is the
set of all ground terms t for which there is an initial state q in I such that
q(t)
∗
−→
A
t.
The expressive power of bottom-up and top-down tree automata is the same.
Indeed, we have the following Theorem:
Theorem 1.6.1 (The equivalence of top-down and bottom-up NFTAs). The
class of languages accepted by top-down NFTAs is exactly the class of recogniz-
able tree languages.
Proof. The proof is left to the reader. Hint. Reverse the arrows and exchange
the sets of initial and final states.
Top-down and bottom-up tree automata have the same expressive power
because they define the same classes of tree languages. Nevertheless they do
not have the same behavior from an algorithmic p oint of view because nonde-
terminism can not be reduced in the class of top-down tree automata.
Proposition 1.6.2 (Top-down NFTAs and top-down DFTAs). A top-down
finite Tree Automaton (Q, F, I, ∆) is deterministic (top-down DFTA) if t here is
one initial state and no two rules with th e same left-hand side. Top-down DFTAs
are strictly less powerful than top-down NFTAs, i.e. there exists a recognizable
tree language which is not accepted by a top-down DFTA.
TATA — November 18, 2008 —