arXiv:2608.24262cs.FLAug 2026

Manuscript Offprint

arXiv:2608.24262

Weighted Alternating Tree Automata

Olle Torstensson

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Olle Torstensson

Linköping University

Linköping, Sweden

olle.torstensson@liu.se

We define weighted alternating tree automata — a generalization of weighted (non-alternating) tree automata, (unweighted) alternating tree automata, and weighted alternating (string) automata — over commutative semirings. We study their expressive power, and show that it is equivalent to that of weighted tree automata exactly when the employed semiring is locally finite. In our main result, we characterize the class of weighted tree languages defined by weighted alternating tree automata as the closure of the recognizable weighted tree languages under inverse tree homomorphisms.

1 Introduction

The basic model of finite automata over ordered, finite, and labeled trees has seen a great number of generalizations over time. One direction has been to equip the automaton with a weight structure, usually a semiring, allowing it to compute a quantitative output, resulting in a weighted tree automaton (wta). The output of a wta is produced by letting the addition and multiplication operators of the semiring accumulate the individual transition weights (elements of the semiring) that are attached to each transition, according to a specific scheme. Alternation is an orthogonal generalization that introduces the concept of universality (roughly, all computations going forward should be accepting) to the automaton, which in the basic version is only equipped to handle existentiality (roughly, some computation going forward should be accepting).

In this paper, we perform both these generalizations at once by introducing weighted alternating tree automata (wata) over commutative semirings. Intuitively, they differ from ordinary weighted tree automata in that they allow arbitrary polynomials over the semiring to describe how computations on subtrees are to be combined, as opposed to having these polynomials be of a specific limiting form; while wta have the power to non-deterministically perform multiple computations on the same subtree and sum up the results (corresponding to existentiality), wata may also multiply them (corresponding to universality). For example, in a wata over, e.g., the natural semiring and some alphabet containing a γ\gamma of positive rank there may be a transition

δ(q,γ)=2⋅x(q,1)2.\delta(q,\gamma)=2\cdot x_{(q,1)}^{2}.

where the variable x(q,1)x_{(q,1)} represents the computed weight of the first direct subtree in the state q. The kind of non-linearity displayed here, where references to more than one computation carried out on the same subtree occur in the same monomial, allows for some complex weighting patterns generally not achievable by wta.

Tree automata were extended with alternation by Slutzki [15], who showed that, while it may add succinctness to the formalism, it adds nothing in terms of expressive power. Section 3.2 explicitly establishes wata as the weighted generalization of alternating tree automata, and we will show that, over locally finite semirings, this holds true also in the weighted case. In contrast, by leveraging a result on

M. Hospodár et al. (Eds.): 17th International Conference on Automata and Formal Languages (AFL 2026)

EPTCS 451, 2026, pp. 289–303, doi:10.4204/EPTCS.451.20

© O. Torstensson

This work is licensed under the

Creative Commons Attribution License.

Weighted Alternating Tree Automata

weighted alternating automata over strings, we will see that alternation does indeed contribute expressive power to weighted tree automata whenever the employed semiring is not locally finite (Section 4).

In Section 6 we will see that there are intimate ties between the weighted version of universality described above, and the notion of copying subtrees. Intuitively, if each subtree is duplicated ahead of being processed, with each copy being treated as a unique subtree, computations on what is essentially the same subtree may be multiplied freely, and the same effect as that of the earlier described non-linearity in the transitions can be achieved using wta style transitions. Using this intuition, we can precisely capture the complexity added to wta by alternation via (non-linear) tree homomorphisms. Whereas the unweighted recognizable tree languages are closed under inverse tree homomorphisms without restrictions, the same does not hold in general in the weighted case. This is due precisely to the copying capability of non-linear tree homomorphisms, which allows for exponential expansions of trees and thereby weight computations that can be too complex (e.g., grow too fast) to be handled by a wta on the original tree. A wata, however, is adequately equipped to compute just such functions. In fact, we characterize the weighted tree languages defined by wata as the closure of the recognizable tree languages under inverse tree homomorphisms (Theorem 6.2).

Related work. Weighted alternating automata for strings were introduced over commutative semirings by Kostolányi and Mišún [13], and then further studied by Grabolle [12]. Leveraging the fact that strings are just trees without branching, we use some of their results.

The weighted alternating parity tree automata of [2] are introduced as a means to extend Description Logics and are not given much treatment in terms of expressive power. Their notion of trees is different from ours in that they, e.g., are allowed to be infinite and consequently their model does not have all that much in common with ours.

Ghorani and Zahedi [11] define several variations of tree automata and tree grammars implementing alternation in a weighted setting, and compare them in terms of expressive power. While their most basic automaton model is defined in a way similar to ours, it employs a complete residuated lattice as a weight structure, making results largely incomparable.

Finally, an equivalent version of the automaton introduced in this paper has appeared as an ad-hoc device in the larger context of dynamically weighted tree transducers [6]. Apart from its connection to top-down weighted tree transducers with regular look-ahead, it has not been studied in any depth, and not explicitly connected to the theory of alternation.

References (14)