File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/intro/04/p04-3023_intro.xml
Size: 3,744 bytes
Last Modified: 2025-10-06 14:02:28
<?xml version="1.0" standalone="yes"?> <Paper uid="P04-3023"> <Title>On the Equivalence of Weighted Finite-state Transducers</Title> <Section position="3" start_page="0" end_page="0" type="intro"> <SectionTitle> 2 The Equivalence Testing Algorithm </SectionTitle> <Paragraph position="0"> Several algorithms testing the equivalence of two states are presented in (Watson and Daciuk, 2003), from which we will derive ours. Two states are equivalent if and only if their respective right language are equivalent. The right language of a state is the set of words originating from this state. Two deterministic finite-state automata are equivalent if and only if they recognize the same language, that is, if their initial states have the same right language. Hence, it is possible to test the equivalence of two automata by applying the equivalence algorithm on their initial states.</Paragraph> <Paragraph position="1"> In order to test the equivalence of two WFSTs, we need to extend the state equivalence test algorithm in two ways: first, it must apply to transducers, and second, it must take weights into account. Handling transducers is easily achieved as the labels of transitions defined above are equivalent to symbols in an alphabet (i.e. we consider the underlying automaton of the transducer).</Paragraph> <Paragraph position="2"> Taking weights into account means that for two WFSTs to be equivalent, they must recognize the same relation (or their underlying automata must recognize the same language), with the same weights. However, as illustrated by figure 1, two WFSTs can be equivalent but have a different weight distribution. States 1 and 5 have the same right language, but words have different costs (for example, abad has a cost of 6 in the top automaton, and 5 in the bottom one). We notice however that the difference of weights between words is constant, so states 1 and 5 are really equivalent modulo a cost rithm. Given two states p and q, it returns a true value if they are equivalent, and a false value otherwise. Remainder weights are also passed as parameters wp and wq. The last parameter is an associative array S that we use to keep track of states that were already visited.</Paragraph> <Paragraph position="3"> The algorithm works as follows: given two states, compare their signature. The signature of a state is a string encoding its class (final or not) and the list of labels on outgoing transition. In the case of deterministic transducers, if the signature for the two states do not match, then they cannot have the same right language and therefore cannot be equivalent.</Paragraph> <Paragraph position="4"> Otherwise, if the two states are final, then their weights (taking into account the remainder weights) must be the same (lines 6-7). Then, all their outgoing transitions have to be checked: the states will be equivalent if matching transitions lead to equivalent states (lines 8-12). The destination states are recursively checked. The REMAINDER function computes the remainder weights for the destination states. Given two weights x and y, it returns {-1, x[?]y[?]1} if x < y, and {x[?]1 [?]y,-1} otherwise.</Paragraph> <Paragraph position="5"> If there is a cycle, then we will see the same pair of states twice. The weight of the cycle must be the same in both transducers, so the remainder weights must be unchanged. This is tested in lines 2-4.</Paragraph> <Paragraph position="6"> The algorithm applies to deterministic WFSTs, which can have only one initial state. To test the equivalence of two WFSTs, we call EQUIV on the respective initial states of the the WFSTs with their initial weights as the remainder weights, and S is initially empty.</Paragraph> </Section> class="xml-element"></Paper>