Weighted Automata
   HOME

TheInfoList



OR:

In
theoretical computer science computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory. It is difficult to circumscribe the ...
and
formal language theory In logic, mathematics, computer science, and linguistics, a formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules. The alphabet of a formal language consists of symb ...
, a weighted automaton or weighted finite-state machine is a generalization of a
finite-state machine A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
in which the edges have weights, for example
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
s or
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
s. Finite-state machines are only capable of answering
decision problem In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm wheth ...
s; they take as input a string and produce a Boolean output, i.e. either "accept" or "reject". In contrast, weighted automata produce a
quantitative Quantitative may refer to: * Quantitative research, scientific investigation of quantitative properties * Quantitative analysis (disambiguation) * Quantitative verse, a metrical system in poetry * Statistics, also known as quantitative analysis ...
output, for example a count of ''how many'' answers are possible on a given input string, or a
probability Probability is the branch of mathematics concerning numerical descriptions of how likely an event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and 1, where, roughly speakin ...
of ''how likely'' the input string is according to a probability distribution. chs.1-4, pp.3-26, 69-71, 122-126. They are one of the simplest studied models of quantitative automata. The definition of a weighted automaton is generally given over an arbitrary
semiring In abstract algebra, a semiring is an algebraic structure similar to a ring, but without the requirement that each element must have an additive inverse. The term rig is also used occasionally—this originated as a joke, suggesting that rigs ar ...
R, an abstract set with an addition operation + and a multiplication operation \times. The automaton consists of a finite set of states, a finite input alphabet of
characters Character or Characters may refer to: Arts, entertainment, and media Literature * ''Character'' (novel), a 1936 Dutch novel by Ferdinand Bordewijk * ''Characters'' (Theophrastus), a classical Greek set of character sketches attributed to The ...
\Sigma and edges which are labeled with both a character in \Sigma and a weight in R. The weight of any
path A path is a route for physical travel – see Trail. Path or PATH may also refer to: Physical paths of different types * Bicycle path * Bridle path, used by people on horseback * Course (navigation), the intended path of a vehicle * Desire p ...
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 Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
from \Sigma^* to R. Weighted automata generalize
deterministic finite automata In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite acceptor (DFA), deterministic finite-state machine (DFSM), or deterministic finite-state automa ...
(DFAs) and
nondeterministic finite automata In automata theory, a finite-state machine is called a deterministic finite automaton (DFA), if * each of its transitions is ''uniquely'' determined by its source state and input symbol, and * reading an input symbol is required for each state tr ...
(NFAs), which correspond to weighted automata over the
Boolean semiring In abstract algebra, a semiring is an algebraic structure similar to a ring, but without the requirement that each element must have an additive inverse. The term rig is also used occasionally—this originated as a joke, suggesting that rigs a ...
, where addition is
logical disjunction In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor ...
and multiplication is
logical conjunction In logic, mathematics and linguistics, And (\wedge) is the truth-functional operator of logical conjunction; the ''and'' of a set of operands is true if and only if ''all'' of its operands are true. The logical connective that represents thi ...
. 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 A statistical model is a mathematical model that embodies a set of statistical assumptions concerning the generation of sample data (and similar data from a larger population). A statistical model represents, often in considerably idealized form, ...
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 Marcel-Paul "Marco" Schützenberger (24 October 1920 – 29 July 1996) was a French mathematician and Doctor of Medicine. He worked in the fields of formal language, combinatorics, and information theory.Herbert Wilf, Dominique Foata, ''et al.' ...
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 In computer science, computational learning theory (or just learning theory) is a subfield of artificial intelligence devoted to studying the design and analysis of machine learning algorithms. Overview Theoretical results in machine learning m ...
) and studying decidability questions.


Definition

A commutative semiring (or rig) is a set ''R'' equipped with two distinguished elements 0 \ne 1 and addition and multiplication operations \oplus and \otimes such that \oplus is
commutative In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
and associative with identity 0, \otimes is commutative and associative with identity 1, \otimes distributes over \oplus, and 0 is an
absorbing element In mathematics, an absorbing element (or annihilating element) is a special type of element of a set with respect to a binary operation on that set. The result of combining an absorbing element with any element of the set is the absorbing element i ...
for \otimes. A weighted automaton over R is a tuple \mathcal = (Q, \Sigma, \Delta, I, F) where: * Q is a finite set of states. * \Sigma is a finite alphabet. * \Delta \subseteq Q \times \Sigma \times R \times Q is a finite set of transitions (q, \sigma, w, q'), where \sigma is called a character and w is called a weight. * I: Q \to R is an initial weight function. * F: Q \to R is a final weight function. A path on input w \in \Sigma^* is a finite path in the graph, where the concatenation of the character labels equals w. The weight of the path q_0, q_1, \ldots, q_n is the product (\otimes) of the weights along the path, additionally multiplied by the initial and final weights I(q_0) \otimes I(q_n). The weight of the word w is the sum (\oplus) 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 ![_\mathcal_!.html"_;"title="\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!">\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!_\Sigma^*_\to_R. The_underlying_NFA_of_\mathcal_is_an_ ![_\mathcal_!.html"_;"title="\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!">\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!_\Sigma^*_\to_R. The_underlying_NFA_of_\mathcal_is_an_Nondeterministic_finite_automaton">NFA_formed_by_removing_all_transitions_with_weight_0_and_then_erasing_all_of_the_weights_on_the_transitions_\Delta,_so_that_the_new_transition_set_lies_in_Q_\times_\Sigma_\times_Q._The_initial_states_and_final_states_are_the_set_of_states_q_such_that_I(q)_\ne_0_and_F(q)_\ne_0,_respectively.


__Variations_

*_A_weighted_automaton_is_Deterministic_finite_automaton.html" ;"title="Nondeterministic_finite_automaton.html" ;"title="\mathcal_">!
![_\mathcal_!">\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!_\Sigma^*_\to_R. The_underlying_NFA_of_\mathcal_is_an_Nondeterministic_finite_automaton">NFA_formed_by_removing_all_transitions_with_weight_0_and_then_erasing_all_of_the_weights_on_the_transitions_\Delta,_so_that_the_new_transition_set_lies_in_Q_\times_\Sigma_\times_Q._The_initial_states_and_final_states_are_the_set_of_states_q_such_that_I(q)_\ne_0_and_F(q)_\ne_0,_respectively.


__Variations_

*_A_weighted_automaton_is_Deterministic_finite_automaton">deterministic_if_the_underlying_NFA_is_deterministic_and_ ![_\mathcal_!">\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!_\Sigma^*_\to_R. The_underlying_NFA_of_\mathcal_is_an_Nondeterministic_finite_automaton">NFA_formed_by_removing_all_transitions_with_weight_0_and_then_erasing_all_of_the_weights_on_the_transitions_\Delta,_so_that_the_new_transition_set_lies_in_Q_\times_\Sigma_\times_Q._The_initial_states_and_final_states_are_the_set_of_states_q_such_that_I(q)_\ne_0_and_F(q)_\ne_0,_respectively.


__Variations_

*_A_weighted_automaton_is_Deterministic_finite_automaton">deterministic_if_the_underlying_NFA_is_deterministic_and_Unambiguous_finite_automaton">unambiguous_ Ambiguity_is_the_type_of__meaning_in_which_a_phrase,_statement_or_resolution_is_not_explicitly_defined,_making_several_interpretations__plausible._A_common_aspect_of_ambiguity_is_uncertainty._It_is_thus_an_attribute_of_any_idea_or_statement__...
_if_the_underlying_NFA_is_unambiguous._In_these_cases,_there_is_always_exactly_one_accepting_path,_so_the_\oplus_operation_is_never_applied_and_can_be_omitted_from_the_definition. *_It_is_possible_to_extend_the_definition_to_allow_epsilon_transition_(disambiguation).html" ;"title="Unambiguous_finite_automaton.html" "title="\mathcal_!.html" ;"title="\mathcal_.html" ;"title="! ![_\mathcal_!">\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!_\Sigma^*_\to_R. The_underlying_NFA_of_\mathcal_is_an_Nondeterministic_finite_automaton">NFA_formed_by_removing_all_transitions_with_weight_0_and_then_erasing_all_of_the_weights_on_the_transitions_\Delta,_so_that_the_new_transition_set_lies_in_Q_\times_\Sigma_\times_Q._The_initial_states_and_final_states_are_the_set_of_states_q_such_that_I(q)_\ne_0_and_F(q)_\ne_0,_respectively.


__Variations_

*_A_weighted_automaton_is_Deterministic_finite_automaton">deterministic_if_the_underlying_NFA_is_deterministic_and_Unambiguous_finite_automaton">unambiguous_ Ambiguity_is_the_type_of__meaning_in_which_a_phrase,_statement_or_resolution_is_not_explicitly_defined,_making_several_interpretations__plausible._A_common_aspect_of_ambiguity_is_uncertainty._It_is_thus_an_attribute_of_any_idea_or_statement__...
_if_the_underlying_NFA_is_unambiguous._In_these_cases,_there_is_always_exactly_one_accepting_path,_so_the_\oplus_operation_is_never_applied_and_can_be_omitted_from_the_definition. *_It_is_possible_to_extend_the_definition_to_allow_epsilon_transition_(disambiguation)">epsilon_transitions_(q,_\epsilon,_w,_q'),_where_\epsilon_is_the_empty_string._In_this_case,_one_must_then_require_that_there_are_no_ ![_\mathcal_!">\mathcal_.html"_;"title="![_\mathcal_">![_\mathcal_!_\Sigma^*_\to_R. The_underlying_NFA_of_\mathcal_is_an_Nondeterministic_finite_automaton">NFA_formed_by_removing_all_transitions_with_weight_0_and_then_erasing_all_of_the_weights_on_the_transitions_\Delta,_so_that_the_new_transition_set_lies_in_Q_\times_\Sigma_\times_Q._The_initial_states_and_final_states_are_the_set_of_states_q_such_that_I(q)_\ne_0_and_F(q)_\ne_0,_respectively.


__Variations_

*_A_weighted_automaton_is_Deterministic_finite_automaton">deterministic_if_the_underlying_NFA_is_deterministic_and_Unambiguous_finite_automaton">unambiguous_ Ambiguity_is_the_type_of__meaning_in_which_a_phrase,_statement_or_resolution_is_not_explicitly_defined,_making_several_interpretations__plausible._A_common_aspect_of_ambiguity_is_uncertainty._It_is_thus_an_attribute_of_any_idea_or_statement__...
_if_the_underlying_NFA_is_unambiguous._In_these_cases,_there_is_always_exactly_one_accepting_path,_so_the_\oplus_operation_is_never_applied_and_can_be_omitted_from_the_definition. *_It_is_possible_to_extend_the_definition_to_allow_epsilon_transition_(disambiguation)">epsilon_transitions_(q,_\epsilon,_w,_q'),_where_\epsilon_is_the_empty_string._In_this_case,_one_must_then_require_that_there_are_no_Cycle_(graph_theory)">cycles_of_epsilon_transitions._This_does_not_increase_the_expressiveness_of_weighted_automata._If_epsilon_transitions_are_allowed,_the_initial_weights_and_final_weights_can_be_replaced_by_initial_and_final_sets_of_states_without_loss_of_expressiveness. *_The_transition_function_can_be_given_as_a_matrix_ring.html" ;"title="Cycle_(graph_theory).html" ;"title="\mathcal ">![ \mathcal !">\mathcal_.html" ;"title="![ \mathcal ">![ \mathcal ! \Sigma^* \to R. The underlying NFA of \mathcal is an Nondeterministic finite automaton">NFA formed by removing all transitions with weight 0 and then erasing all of the weights on the transitions \Delta, so that the new transition set lies in Q \times \Sigma \times Q. The initial states and final states are the set of states q such that I(q) \ne 0 and F(q) \ne 0, respectively.


Variations

* A weighted automaton is Deterministic finite automaton">deterministic if the underlying NFA is deterministic and Unambiguous finite automaton">unambiguous Ambiguity is the type of meaning in which a phrase, statement or resolution is not explicitly defined, making several interpretations plausible. A common aspect of ambiguity is uncertainty. It is thus an attribute of any idea or statement ...
if the underlying NFA is unambiguous. In these cases, there is always exactly one accepting path, so the \oplus operation is never applied and can be omitted from the definition. * It is possible to extend the definition to allow epsilon transition (disambiguation)">epsilon transitions (q, \epsilon, w, q'), where \epsilon is the empty string. In this case, one must then require that there are no Cycle (graph theory)">cycles of epsilon transitions. This does not increase the expressiveness of weighted automata. If epsilon transitions are allowed, the initial weights and final weights can be replaced by initial and final sets of states without loss of expressiveness. * The transition function can be given as a matrix ring">matrix \Delta_\sigma \in R^ with entries in R for each \sigma, rather than a set of transitions. The entry of the matrix at (q, q') is the sum of all transitions labeled (q, \sigma, q'). * Some authors omit the initial and final weight functions I and F. Instead, I and F are replaced by a set of initial and final states. If epsilon transitions are not present, this technically decreases expressiveness as it forces ![ \mathcal !](\varepsilon) to depend only on the number of states that are both initial and final. * Some authors restrict to specific semirings, such as \mathbb or \mathbb, particularly when studying decidability results. * The requirement that there is a zero element for \oplus is sometimes omitted; in this case the machine defines a
partial function In mathematics, a partial function from a set to a set is a function from a subset of (possibly itself) to . The subset , that is, the domain of viewed as a function, is called the domain of definition of . If equals , that is, if is de ...
from \Sigma^* to R rather than a total function.


See also


References

{{reflist Finite automata