Math 2.0

Computer science Definition

Weighted automaton

Builds on SemiringAlphabetStringNondeterministic finite automaton

Definition

Let (K,⊕,⊗,0,1)(K, \oplus, \otimes, 0, 1) be a semiring and let Σ\Sigma be an alphabet. A weighted automaton over KK and Σ\Sigma is a tuple A=(Q,λ,μ,γ)A = (Q, \lambda, \mu, \gamma) where:

  1. QQ is a finite set of states;
  2. λ ⁣:Q→K\lambda \colon Q \to K gives the initial weights;
  3. μ ⁣:Σ→KQ×Q\mu \colon \Sigma \to K^{Q \times Q} gives, for each letter aa, a Q×QQ \times Q matrix μ(a)\mu(a) of transition weights;
  4. γ ⁣:Q→K\gamma \colon Q \to K gives the final weights.

Extend μ\mu to strings by μ(a1⋯an)=μ(a1)⋯μ(an)\mu(a_1 \cdots a_n) = \mu(a_1) \cdots \mu(a_n), a product of matrices over KK, with μ(ε)\mu(\varepsilon) the identity matrix. The weight of w∈Σ∗w \in \Sigma^* is fA(w)=⨁p,q∈Qλ(p)⊗μ(w)p,q⊗γ(q).f_A(w) = \bigoplus_{p, q \in Q} \lambda(p) \otimes \mu(w)_{p, q} \otimes \gamma(q). The map fA ⁣:Σ∗→Kf_A \colon \Sigma^* \to K is a formal power series with coefficients in KK and noncommuting variables in Σ\Sigma.

Remarks

Equivalently, fA(w)f_A(w) is the sum over all paths labelled ww of the product of the initial weight, the transition weights and the final weight along the path. Example: over the semiring (ℕ,+,⋅)(\N, +, \cdot) with Σ={a,b}\Sigma = \set{a, b}, take Q={1,2}Q = \set{1, 2}, λ=(1,0)\lambda = (1, 0), γ=(0,1)\gamma = (0, 1), μ(a)=(1101)\mu(a) = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} and μ(b)\mu(b) the identity matrix. Since μ(a)k=(1k01)\mu(a)^k = \begin{pmatrix} 1 & k \\ 0 & 1 \end{pmatrix}, the weight of ww is μ(w)1,2\mu(w)_{1,2}, the number of aa's in ww. Non-example: a device with infinitely many states, such as one that tracks the exact count of aa's minus bb's, fails clause 1. Over the Boolean semiring ({0,1},∨,∧)(\set{0, 1}, \lor, \land), a weighted automaton is an NFA, possibly with several initial states, and its weight function is the indicator function of its language. Commutativity of ⊗\otimes is not required.

Reading path

To understand this page from the ground up, read these 5 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Alphabet concept
  2. Nondeterministic finite automaton concept
  3. Semiring concept
  4. String concept
  5. Weighted automaton definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Weighted_automaton
About this page
TagNG9P5YKNPC
URIm2://NG9P5YKNPC
Kinddefinition
WritingW0 stub
MSC68Q45, 16Y60
DefinesWeighted automaton
UsesSemiring, Alphabet, String, Nondeterministic finite automaton
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.