Lably
Skip to content

Weighted automaton

Finite-state machine where edges carry weights

  • 5 min read
  • 4 chapters

Related on Lably

Through Finite-state machine, Real number and Integer

The definition of a weighted automaton is generally given over an arbitrary semiring R, an abstract set with an addition operation ⊕ and a multiplication operation ⊗. The automaton consists of a finite set of states, a finite input alphabet of characters Σ and edges which are labeled with both a character in Σ and a weight in R. The weight of any path in the automaton is defined to be the product of weights along the path, and the weight of a string is the sum of the weights of all paths which are labeled with that string. The weighted automaton thus defines a function from Σ∗ to R.

Weighted automata generalize deterministic finite automata (DFAs) and nondeterministic finite automata (NFAs), which correspond to weighted automata over the Boolean semiring, where addition is logical disjunction and multiplication is logical conjunction. In the DFA case, there is only one accepting path for any input string, so disjunction is not applied. When the weights are real numbers and the outgoing weights for each state add to one, weighted automata can be considered a probabilistic model and are also known as probabilistic automata. These machines define a probability distribution over all strings, and are related to other probabilistic models such as Markov decision processes and Markov chains.

Weighted automata have applications in natural language processing where they are used to assign weights to words and sentences, as well as in image compression. They were first introduced by Marcel-Paul Schützenberger in his 1961 paper On the definition of a family of automata. Since their introduction, many extensions have been proposed, for example nested weighted automata, cost register automata, and weighted finite-state transducers. Researchers have studied weighted automata from the perspective of learning a machine from its input-output behavior (see computational learning theory) and studying decidability questions.

Definition

A commutative semiring (also known as a rig) is a set R equipped with two distinguished elements 0 and 1 and addition and multiplication operations ⊕ and ⊗ such that ⊕ is commutative and associative with identity 0, ⊗ is commutative and associative with identity 1, ⊗ distributes over ⊕, and 0 is an absorbing element for ⊗.

A weighted automaton over R is a tuple A=(Q,Σ,Δ,I,F) where:

  • Q is a finite set of states.
  • Σ is a finite alphabet.
  • Δ⊆Q×Σ×R×Q is a finite set of transitions (q,σ,w,q′), where σ is called a character and w is called a weight.
  • I:Q→R is an initial weight function.
  • F:Q→R is a final weight function.

A path on input w∈Σ∗ is a finite path in the graph, where the concatenation of the character labels equals w. The weight of the path q0,q1,…,qn is the product (⊗) of the weights along the path, additionally multiplied by the initial and final weights I(q0)⊗F(qn). The weight of the word w is the sum (⊕) of the weights of all paths on input w (or 0 if there are no accepting paths). In this way the machine defines a function [[A]]:Σ∗→R.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication