| { |
| "paper_id": "N03-1009", |
| "header": { |
| "generated_with": "S2ORC 1.0.0", |
| "date_generated": "2023-01-19T14:07:54.710920Z" |
| }, |
| "title": "Simpler and More General Minimization for Weighted Finite-State Automata", |
| "authors": [ |
| { |
| "first": "Jason", |
| "middle": [], |
| "last": "Eisner", |
| "suffix": "", |
| "affiliation": { |
| "laboratory": "", |
| "institution": "Johns Hopkins University Baltimore", |
| "location": { |
| "postCode": "21218-2691", |
| "region": "MD", |
| "country": "USA" |
| } |
| }, |
| "email": "jason@cs.jhu.edu" |
| } |
| ], |
| "year": "", |
| "venue": null, |
| "identifiers": {}, |
| "abstract": "Previous work on minimizing weighted finite-state automata (including transducers) is limited to particular types of weights. We present efficient new minimization algorithms that apply much more generally, while being simpler and about as fast. We also point out theoretical limits on minimization algorithms. We characterize the kind of \"well-behaved\" weight semirings where our methods work. Outside these semirings, minimization is not well-defined (in the sense of producing a unique minimal automaton), and even finding the minimum number of states is in general NP-complete and inapproximable. Recently the computational linguistics community has turned its attention to weighted automata that compute interesting functions of their input strings. A traditional automaton only returns an boolean from the set K = {true, f alse}, which indicates whether it has accepted the input. But a probabilistic automaton returns a probability in K = [0, 1], or equivalently, a negated logprobability in K = [0, \u221e]. A transducer returns an output string from K = \u2206 * (for some alphabet \u2206). Celebrated algorithms by Mohri (1997; 2000) have recently made it possible to minimize deterministic automata whose weights (outputs) are log-probabilities or strings. These cases are of central interest in language and speech processing. However, automata with other kinds of weights can also be defined. The general formulation of weighted automata (Berstel and Reutenauer, 1988) permits any weight set K, if appropriate operations \u2295 and \u2297 are provided for combining weights from the different arcs of the automaton. The triple (K, \u2295, \u2297) is called a weight", |
| "pdf_parse": { |
| "paper_id": "N03-1009", |
| "_pdf_hash": "", |
| "abstract": [ |
| { |
| "text": "Previous work on minimizing weighted finite-state automata (including transducers) is limited to particular types of weights. We present efficient new minimization algorithms that apply much more generally, while being simpler and about as fast. We also point out theoretical limits on minimization algorithms. We characterize the kind of \"well-behaved\" weight semirings where our methods work. Outside these semirings, minimization is not well-defined (in the sense of producing a unique minimal automaton), and even finding the minimum number of states is in general NP-complete and inapproximable. Recently the computational linguistics community has turned its attention to weighted automata that compute interesting functions of their input strings. A traditional automaton only returns an boolean from the set K = {true, f alse}, which indicates whether it has accepted the input. But a probabilistic automaton returns a probability in K = [0, 1], or equivalently, a negated logprobability in K = [0, \u221e]. A transducer returns an output string from K = \u2206 * (for some alphabet \u2206). Celebrated algorithms by Mohri (1997; 2000) have recently made it possible to minimize deterministic automata whose weights (outputs) are log-probabilities or strings. These cases are of central interest in language and speech processing. However, automata with other kinds of weights can also be defined. The general formulation of weighted automata (Berstel and Reutenauer, 1988) permits any weight set K, if appropriate operations \u2295 and \u2297 are provided for combining weights from the different arcs of the automaton. The triple (K, \u2295, \u2297) is called a weight", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Abstract", |
| "sec_num": null |
| } |
| ], |
| "body_text": [ |
| { |
| "text": "It is well known how to efficiently minimize a deterministic finite-state automaton (DFA), in the sense of constructing another DFA that recognizes the same language as the original but with as few states as possible (Aho et al., 1974) . This DFA also has as few arcs as possible.", |
| "cite_spans": [ |
| { |
| "start": 217, |
| "end": 235, |
| "text": "(Aho et al., 1974)", |
| "ref_id": "BIBREF0" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "Minimization is useful for saving memory, as when building very large automata or deploying NLP systems on small hand-held devices. When automata are built up through complex regular expressions, the savings from minimization can be considerable, especially when applied at intermediate stages of the construction, since (for example) smaller automata can be intersected faster. semiring and will be explained below. K-valued functions that can be computed by finite-state automata are called rational functions.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "How does minimization generalize to arbitrary weight semirings? The question is of practical as well as theoretical interest. Some NLP automata use the real semiring (R, +, \u00d7), or its log equivalent, to compute unnormalized probabilities or other scores outside the range [0, 1] (Lafferty et al., 2001; Cortes et al., 2002) . Expectation semirings (Eisner, 2002) are used to handle bookkeeping when training the parameters of a probabilistic transducer. A byproduct of this paper is a minimization algorithm that works fully with those semirings, a new result permitting more efficient automaton processing in those situations.", |
| "cite_spans": [ |
| { |
| "start": 279, |
| "end": 302, |
| "text": "(Lafferty et al., 2001;", |
| "ref_id": "BIBREF6" |
| }, |
| { |
| "start": 303, |
| "end": 323, |
| "text": "Cortes et al., 2002)", |
| "ref_id": "BIBREF4" |
| }, |
| { |
| "start": 348, |
| "end": 362, |
| "text": "(Eisner, 2002)", |
| "ref_id": "BIBREF5" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "Surprisingly, we will see that minimization is not even well-defined for all weight semirings! We will then (nearly) characterize the semirings where it is welldefined, and give a recipe for constructing minimization algorithms similar to Mohri's in such semirings.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "Finally, we follow this recipe to obtain a specific, simple and practical algorithm that works for all division semirings. All the cases above either fall within this framework or can be forced into it by adding multiplicative inverses to the semiring. The new algorithm provides arguably simpler minimization for the cases that Mohri has already treated, and also handles additional cases.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Introduction", |
| "sec_num": "1" |
| }, |
| { |
| "text": "We introduce weighted automata by example. The transducer below describes a partial function from strings to strings. It maps aab \u2192 xyz and bab \u2192 wwyz. Why? Since the transducer is deterministic, each input (such as aab) is accepted along at most one path; the corresponding output (such as xyz) is found by concatenating the output strings found along the path. \u03b5 denotes the empty string. Proceedings of HLT-NAACL 2003 a arc from state 3, and \u03c3(3, a) = wwy is that arc's output.", |
| "cite_spans": [ |
| { |
| "start": 406, |
| "end": 420, |
| "text": "HLT-NAACL 2003", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "In an automaton whose outputs (weights) were numbers rather than strings like wwy, concatenating them would not be sensible; instead we would want to add or multiply the weights along the path. In general \u2297 denotes the chosen operation for combining weights along a path.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The \u2297 operation need not be commutative-indeed concatenation is not-but it must be associative. K must contain (necessarily unique) weights, denoted 1 and 0, such that 1 \u2297 k = k \u2297 1 = k and 0 \u2297 k = k \u2297 0 = 0 for all k \u2208 K. An unaccepted input (e.g., aba) is assigned the output 0. When \u2297 is string concatenation, 1 = \u03b5, and 0 is a special object \u2205 defined to satisfy the axioms.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "If an input such as aa were accepted along multiple paths, we would have to use another operation \u2295 to combine those paths' weights into a single output for aa. But that cannot happen with the deterministic automata treated by this paper. So we omit discussion of the properties that \u2295 should have, and do not trouble to spell out its definition for the semirings (K, \u2295, \u2297) discussed in this paper. 1 We are only concerned with the monoid (K, \u2297).", |
| "cite_spans": [ |
| { |
| "start": 399, |
| "end": 400, |
| "text": "1", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The following automaton is equivalent to the previous one since it computes the same function: However, it distributes weights differently along the arcs, and states 1 and 3 can now obviously be merged (as can 2 and 4, yielding the minimal equivalent automaton). Formally we know that states 1 and 3 are equivalent because F 1 = F 3 , where F q denotes the suffix function of state q-the function defined by the automaton if the start state is taken to be q rather than 0. (Thus, F 3 (ab) = yz.) Equivalent states can safely be merged, by deleting one and rerouting its incoming arcs to the other. We will follow Mohri's minimization strategy:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "1. Turn the first automaton above into the second. This operation is called pushing (or quasi-determinization).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "Here, for instance, it \"pushed ww back\" through state 3. 2. Merge equivalent states of the second automaton, by applying ordinary unweighted DFA minimization (Aho et al., 1974, section 4.13) as if each weighted arc label such as a:yz were simply a letter in a large alphabet. 3. Trim the result, removing useless states and arcs that are not on any accepting path (defined as a path whose weight is non-0 because it has no missing arcs and its last state is final). Mohri (2000) proves that this technique finds the minimal automaton, which he shows to be unique up to placement of weights along paths. 2 We will only have to modify step 1, generalizing pushing to other semirings. Pushing makes heavy use of left quotients: we adopt the notation k\\m for an element of K such that k \u2297 (k\\m) = m. This differs from the notation k \u22121 \u2297 m (in which k \u22121 denotes an actual element of K) because k\\m need not exist nor be unique. For example, ww\\wwzzz = zzz (a fact used above) but wwy\\wwzzz does not exist since wwzzz does not begin with wwy.", |
| "cite_spans": [ |
| { |
| "start": 158, |
| "end": 190, |
| "text": "(Aho et al., 1974, section 4.13)", |
| "ref_id": null |
| }, |
| { |
| "start": 466, |
| "end": 478, |
| "text": "Mohri (2000)", |
| "ref_id": "BIBREF8" |
| }, |
| { |
| "start": 603, |
| "end": 604, |
| "text": "2", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "If F is a function, \u03b1 is a string, and k is a weight, we use some natural notation for functions related to F :", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "k \u2297 F : (k \u2297 F )(\u03b3) def = k \u2297 (F (\u03b3)) k\\F : a function (if one exists) with k \u2297 (k\\F ) = F \u03b1 \u22121 F : (\u03b1 \u22121 F )(\u03b3) def = F (\u03b1\u03b3) (standard notation)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "In effect, k\\F and \u03b1 \u22121 F drop output and input prefixes.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Weights and Minimization", |
| "sec_num": "2" |
| }, |
| { |
| "text": "The intuition behind pushing is to canonicalize states' suffix functions. This increases the chance that two states will have the same suffix function. In the example of the previous section, we were able to replace F 3 with ww\\F 3 (pushing the ww backwards onto state 3's incoming arc), making it equal to F 1 so {1, 3} could merge.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "Since canonicalization was also performed at states 2 and 4, F 1 and F 3 ended up with identical representations: arc weights were distributed identically along corresponding paths from 1 and 3. Hence unweighted minimization could discover that F 1 = F 3 and merge {1, 3}.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "Mohri's pushing strategy-we will see others-is always to extract some sort of \"maximum left factor\" from each suffix function F q and push it backwards. That is, he expresses F q = k \u2297 G for as \"large\" a k \u2208 K as possible-a maximal common prefix-then pushes factor k back out of the suffix function so that it is counted earlier on paths through q (i.e., before reaching q). q's suffix function now has canonical form G (i.e., k\\F q ).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "How does Mohri's strategy reduce to practice? For transducers, where (K, \u2297) = (\u2206 * , concat), the maximum left factor of F q is the longest common prefix of the strings in range(F q ). 3 Thus we had range(F 3 ) = {wwyz, wwzzz} above with longest common prefix ww. For the tropical semiring (R \u22650 \u222a {\u221e}, min, +), where k\\m = m \u2212 k is defined only if k \u2264 m, the maximum left factor k is the minimum of range(F q ).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "But \"maximum left factor\" is not an obvious notion for all semirings. If we extended the tropical semir-ing with negative numbers, or substituted the semiring (R \u22650 , +, \u00d7), keeping the usual definition of \"maximum,\" then any function would have arbitrarily large left factors.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "A more fundamentally problematic example is the semiring Z [ \u221a \u22125] . It is defined as ({m + n \u221a \u22125 : m, n \u2208 Z}, +, \u00d7) where Z denotes the integers. It is a standard example of a commutative algebra in which factorization is not unique. For example, 6 = 2 \u2297 3 = (1 + \u221a \u22125) \u2297 (1 \u2212 \u221a \u22125) and these 4 factors cannot be factored further. This makes it impossible to canonicalize F 2 below: What is the best left factor to extract from F 2 ? We could left-divide F 2 by either 2 or 1 + \u221a \u22125. The former action allows us to merge {1, 2} and the latter to merge {2, 3}; but we cannot have it both ways. So this automaton has no unique minimization! The minimum of 4 states is achieved by two distinct answers (contrast footnote 2).", |
| "cite_spans": [ |
| { |
| "start": 59, |
| "end": 66, |
| "text": "[ \u221a \u22125]", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "It follows that known minimization techniques will not work in general semirings, as they assume state mergeability to be transitive. 4 In general the result of minimization is not even well-defined (i.e., unique).", |
| "cite_spans": [ |
| { |
| "start": 134, |
| "end": 135, |
| "text": "4", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "Of course, given a deterministic automaton M , one may still seek an equivalentM with as few states as possible. But we will now see that even finding the minimum number of states is NP-complete, and inapproximable.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "The NP-hardness proof [which may be skipped on a first reading] is by reduction from Minimum Clique Partition. Given a graph with vertex set V = {1, 2, . . . n} and edge set E, we wish to partition V into as few cliques as possible. (S \u2286 V is a clique of the graph iff ij \u2208 E for all pairs i, j \u2208 S.) Determining the minimum number of cliques is NP-complete and inapproximable: that is, unless P=NP, we cannot even find it within a factor of 2 or 3 or any other constant factor in polynomial time. 5 Given such a graph, we reduce the clique problem to our problem. Consider the \"bitwise boolean\" semiring ({0, 1} n , OR, AND). Each weight k is a string of n bits, 4 A further wrinkle lies in deciding what and how to push; in general semirings, it can be necessary to shift weights forward as well as backward along paths. Modify the example above by pushing a factor of 2 backwards through state 2. Making F2 = F3 in this modified example now requires pushing 2 forward and then 1 + \u221a \u22125 backward through state 2. 5 This problem is just the dual of Graph Coloring. For detailed approximability results see (Crescenzi and Kann, 1998) ", |
| "cite_spans": [ |
| { |
| "start": 498, |
| "end": 499, |
| "text": "5", |
| "ref_id": null |
| }, |
| { |
| "start": 664, |
| "end": 665, |
| "text": "4", |
| "ref_id": null |
| }, |
| { |
| "start": 1107, |
| "end": 1133, |
| "text": "(Crescenzi and Kann, 1998)", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": ". denoted k 1 , . . . k n . For each i \u2208 V , define f i , k i , m i \u2208 K as follows: f i j = 0 iff ij \u2208 E; k i j = 1 iff i = j; m i j = 0 iff either ij \u2208 E or i = j. Now consider the following automaton M over the alphabet \u03a3 = {a, b, c 1 , . . . c n }.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "The states are {0, 1, . . . n, n + 1}; 0 is the initial state and n + 1 is the only final state. For each i \u2208 V , there is an arc 0 ci:1 n \u2212\u2212\u2192i and arcs i a:k i \u2212\u2212\u2192(n + 1) and i b:m i \u2212\u2212\u2192(n + 1). A minimum-state automaton equivalent to M must have a topology obtained by merging some states of V . Other topologies that could accept the same language (c 1 |c 2 | \u2022 \u2022 \u2022 |c n )(a|b) are clearly not minimal (they can be improved by merging final states or by trimming).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "We claim that for S \u2286 {1, 2, . . . n}, it is possible to merge all states in S into a single state (in the automaton) if and only if S is a clique (in the graph):", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "\u2022 If S is a clique, then define k, m \u2208 K by k i = 1 iff i \u2208 S, and", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "m i = 1 iff i \u2208 S. Observe that for every i \u2208 S, we have k i = f i \u2297 k, m i = f i \u2297 m.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "So by pushing back a factor of f i at each i \u2208 S, one can make all i \u2208 S share a suffix function and then merge them.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "\u2022 If S is not a clique, then choose i, j \u2208 S so that ij \u2208 E. Considering only bit i, there exists no bit", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "pair (k i , m i ) \u2208 {0, 1} 2 of which (k i i , m i i ) = (1, 0) and (k j i , m j i ) = (0, 1)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "are both left-multiples. So there can exist no weight pair (k, m) of which (k i , m i ) and (k j , m j ) are both left-multiples. It is therefore not possible to equalize the suffix functions F i and F j by leftdividing each of them. 6 i and j cannot be merged.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "Thus, the partitions of V into cliques are identical to the partitions of V into sets of mergeable states, which are in 1-1 correspondence with the topologies of automata equivalent to M and derived from it by merging. There is an N -clique partition of V iff there is an (N +2)-state automaton. It follows that finding the minimum number of states is as hard, and as hard to approximate within a constant factor, as finding the minimum number of cliques.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Pushing and Its Limitations", |
| "sec_num": "3" |
| }, |
| { |
| "text": "The previous section demonstrated the existence of pathological weight semirings. We now partially characterize the \"well-behaved\" semirings (K, \u2295, \u2297) in which all automata do have unique minimizations. Except when otherwise stated, lowercase variables are weights \u2208 K and uppercase ones are K-valued rational functions.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "[This section may be skipped, except the last paragraph.]", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "A crucial necessary condition is that (K, \u2297) allow what we will call greedy factorization, meaning that given f \u2297F = g \u2297G = 0, it is always possible to express F = f \u2297 H and G = g \u2297 H. This condition holds for many practically useful semirings, commutative or otherwise. It says, roughly, that the order in which left factors are removed from a suffix function does not matter. We can reach the same canonical H regardless of whether we left-divide first by f or g.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "Given a counterexample to this condition, one can construct an automaton with no unique minimization. Simply follow the plan of the Z[ \u221a \u22125] example, putting", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "F 1 = F , F 2 = f \u2297 F = g \u2297 G, F 3 = G. 7 For ex- ample, in semiring (K, \u2297) = ({x n : n = 1}, concat), put F 2 = x 2 \u2297 {(a, x 3 ), (b, x 4 )} = x 3 \u2297 {(a, x 2 ), (b, x 3 )}.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "Some useful semirings do fail the condition. One is the \"bitwise boolean\" semiring that checks a string's membership in two languages at once: (K, \u2295, \u2297) = ({00, 01, 10, 11}, OR, AND).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "(Let F 2 = 01 \u2297 {(a, 11), (b, 00)} = 01 \u2297 {(a, 01), (b, 10)}.) R 2 under pointwise \u00d7 (which computes a string's probability under two models) fails similarly. So does (sets, \u2229, \u222a) (which collects features found along the accepting path).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "We call H a residue of F iff F = f \u2297 H for some f . Write F G iff F , G have a common residue. In these terms, (K, \u2297) allows greedy factorization iff F G when F , G are residues of the same nonzero function. More perspicuously, one can show that this holds iff is an equivalence relation on nonzero, K-valued functions.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "So in semirings where minimization is uniquely defined, is necessarily an equivalence relation. Given an automaton M for function F , we may regard as an equivalence relation on the states of a trimmed version of M : 8 q r iff F q F r . Let [r] = {r 1 , . . . , r m } be the (finite) equivalence class of r: we can inductively find at least one function F [r] that is a common residue of F r1 , . . . , F rm . The idea behind minimization is to construct a machineM whose states correspond to these equivalence classes, and where each [r] has suffix function F [r] . The Appendix shows thatM is then minimal.", |
| "cite_spans": [ |
| { |
| "start": 561, |
| "end": 564, |
| "text": "[r]", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "If M has an arc q a:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "k \u2212\u2192r,M needs an arc [q] a:k \u2212\u2192[r], where k is such that a \u22121 F [q] = k \u2297 F [r] .", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "The main difficulty in completing the construction of M is to ensure each weight k exists. That is, F [r] must be carefully chosen to be a residue not only of F r1 , . . . , F rm (which ultimately does not matter, as long as F [0] is a residue of F 0 , where 0 is the start state) but also of a \u22121 F [q] . If M is cyclic, this imposes cyclic dependencies on the choices of the various F [q] and F [r] functions.", |
| "cite_spans": [ |
| { |
| "start": 300, |
| "end": 303, |
| "text": "[q]", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "We have found no simple necessary and sufficient condition on (K, \u2297) that guarantees a globally consistent set of choices to exist. However, we have given a useful nec-essary condition (greedy factorization), and we now give a useful sufficient condition. Say that H is a minimum residue of G = 0 if it is a residue of every residue of G. (If G has several minimum residues, they are all residues of one another.) If (K, \u2297) is such that every G has a minimum residue-a strictly stronger condition than greedy factorization-then it can be shown that G has the same minimum residues as any H G. In such a (K, \u2297), M can be constructed by choosing the suffix functions", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "F [r] independently. Just let F [r] = F {r1,.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "..,rm} be a minimum residue of F r1 . Now consider again M 's arc q a:k \u2212\u2192r:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "since a \u22121 F [q] a \u22121 F q F r F r1 , we see F [r] is a (minimum) residue of a \u22121 F [q]", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": ", so that a weight k can be", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "chosen for [q] a:k \u2212\u2192[r]", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": ". A final step ensures thatM defines the function F . To describe it, we must augment the formalism to allow an initial weight \u03b9(0) \u2208 K, and a final weight \u03c6(r) \u2208 K for each final state r. The weight of an accepting path from the start state 0 to a final state r is now defined to be \u03b9(0) \u2297 (weights of arcs along the path) \u2297 \u03c6(r). InM , we set \u03b9(", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "[0]) to some k such that F 0 = k \u2297 F [0] , and set \u03c6([r]) = F [r] (\u03b5).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "The mathematical construction is done.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "When Is Minimization Unique?", |
| "sec_num": "4" |
| }, |
| { |
| "text": "We now give an effective algorithm for minimization in the semiring (K, \u2297). The algorithmic recipe has one ingredient: along with (K, \u2297), the user must give us a leftfactor functional \u03bb that can choose a left factor \u03bb(F ) of any function F . Formally, if \u03a3 is the input alphabet, then we require \u03bb : (\u03a3 * \u2192 K) \u2192 K to have the following properties for any rational F : \u03a3 * \u2192 K and any k \u2208 K:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "\u2022 Shifting: \u03bb(k \u2297 F ) = k \u2297 \u03bb(F ). \u2022 Quotient: \u03bb(F )\\\u03bb(a \u22121 F ) exists in K for any a \u2208 \u03a3. \u2022 Final-quotient: \u03bb(F )\\F (\u03b5) exists in K. 9", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "The algorithm generalizes Mohri's strategy as outlined in section 2. We just use \u03bb to pick the left factors during pushing. The \u03bb's used by Mohri for two semirings were mentioned in section 3. We will define another \u03bb in section 6. Naturally, it can be shown that no \u03bb can exist in a semiring that lacks greedy factorization, such as Z[ \u221a \u22125]. The 3 properties above are needed for the strategy to work. The strategy also requires (K, \u2297) to be left cancellative, i.e., k \u2297 m = k \u2297 m implies m = m (if k = 0). In other words, left quotients by k are unique when they exist (except for 0\\0). This relieves us from having to make arbitrary choices of weight during pushing. Incompatible choices might prevent arc labels from matching as desired during the merging step of section 2.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "Given an input DFA. At each state q, simultaneously, we will push back \u03bb(F q ). This pushing construction is trivial once the \u03bb(F q ) values are computed. An arc q a:k \u2212\u2192r should have its weight changed from k to", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "\u03bb(F q )\\\u03bb(a \u22121 F q ) = \u03bb(F q )\\\u03bb(k \u2297 F r )", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": ", which is welldefined (by the quotient property and left cancellativity) 10 and can be computed as \u03bb(F q )\\(k \u2297 \u03bb(F r )) (by the shifting property). Thus a subpath q a:k \u2212\u2192r b:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "\u2212\u2192s, with weight k \u2297 , will become q a:k \u2212\u2192r b:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "\u2212\u2192s, with weight k \u2297 = (\u03bb(F q )\\(k \u2297 \u03bb(F r ))) \u2297 (\u03bb(F r )\\( \u2297 \u03bb(F s ))).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "In this way the factor \u03bb(F r ) is removed from the start of all paths from r, and is pushed backwards through r onto the end of all paths to r. It is possible for this factor (or part of it) to travel back through multiple arcs and around cycles, since k is found by removing a \u03bb(F q ) factor from all of k \u2297 \u03bb(F r ) and not merely from k.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "As it replaces the arc weights, pushing also replaces the initial weight \u03b9(0) with \u03b9(0) \u2297 \u03bb(F 0 ), and replaces each final weight \u03c6(r) with \u03bb(F r )\\\u03c6(r) (which is welldefined, by the final-quotient property). Altogether, pushing leaves path weights unchanged (by easy induction). 11 After pushing, we finish with merging and trimming as in section 2. While merging via unweighted DFA minimization treats arc weights as part of the input symbols, what should it do with any initial and final weights? The start state's initial weight should be preserved. The merging algorithm can and should be initialized with a multiway partition of states by final weight, instead of just a 2-way partition into final vs. non-final. 12 The Appendix shows that this strategy indeed finds the unique minimal automaton.", |
| "cite_spans": [ |
| { |
| "start": 280, |
| "end": 282, |
| "text": "11", |
| "ref_id": null |
| }, |
| { |
| "start": 719, |
| "end": 721, |
| "text": "12", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "It is worth clarifying how this section's effective algorithm implements the mathematical construction from the end of section 4. At each state q, pushing replaces the suffix function F q with \u03bb(F q )\\F q . The quotient properties of \u03bb are designed to guarantee that this quotient is defined, 13 and the shifting property is designed to ensure 10 Except in the case 0\\0, which is not uniquely defined. This arises only if Fq = 0, i.e., q is a dead state that will be trimmed later, so any value will do for 0\\0: arcs from q are irrelevant.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "11 One may prefer a formalism without initial or final weights. If the original automaton is free of final weights (other than 1), so is the pushed automaton-provided that \u03bb(F ) = 1 whenever F (\u03b5) = 1, as is true for all \u03bb's in this paper. Initial weights can be eliminated at the cost of duplicating state 0 (details omitted).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "12 Alternatively, Mohri (2000, \u00a74.5) explains how to temporarily eliminate final weights before the merging step.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "13 That is, \u03bb(Fq)\\Fq(\u03b3) exists for each \u03b3 \u2208 \u03a3 * . One may show by induction on |\u03b3| that the left quotients \u03bb(F )\\F (\u03b3) exist for all F . When |\u03b3| = 0 this is the final-quotient property. For |\u03b3| > 0 we can write \u03b3 as a\u03b3 , and then \u03bb(F )\\F (\u03b3) = \u03bb(F )\\F (a\u03b3 ) = \u03bb(F )\\(a \u22121 F )(\u03b3 ) = (\u03bb(F )\\\u03bb(a \u22121 F )) \u2297 (\u03bb(a \u22121 F )\\(a \u22121 F )(\u03b3 )), where the first factor exists by the quotient property and the second factor exists by inductive hypothesis.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "that it is a minimum residue of F q . 14 In short, if the conditions of this section are satisfied, so are the conditions of section 4, and the construction is the same.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "The converse is true as well, at least for right cancellative semirings. If such a semiring satisfies the conditions of section 4 (every function has a minimum residue), then the requirements of this section can be met to obtain an effective algorithm: there exists a \u03bb satisfying our three properties, 15 and the semiring is left cancellative. 16", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Simple Minimization Recipe", |
| "sec_num": "5" |
| }, |
| { |
| "text": "For the most important idea of this paper, we turn to a common special case. Suppose the semiring (K, \u2295, \u2297) defines k\\m for all m, k = 0 \u2208 K. Equivalently, 17 suppose every k = 0 \u2208 K has a unique two-sided inverse k \u22121 \u2208 K. Useful cases of such division semirings include the real semiring (R, +, \u00d7), the tropical semiring extended with negative numbers (R \u222a {\u221e}, min, +), and expectation semirings (Eisner, 2002) . Minimization has not previously been available in these.", |
| "cite_spans": [ |
| { |
| "start": 399, |
| "end": 413, |
| "text": "(Eisner, 2002)", |
| "ref_id": "BIBREF5" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "We propose a new left-factor functional that is fast to compute and works in arbitrary division semirings. We avoid the temptation to define \u03bb(F ) as range(F ): this definition has the right properties, but in some semirings including (R \u22650 , +, \u00d7) the infinite summation is quite expensive to compute and may even diverge. Instead (unlike Mohri) we will permit our \u03bb(F ) to depend on more than just range(F ).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "Order the space of input strings \u03a3 * by length, breaking ties lexicographically. For example, \u03b5 < bb < aab < aba < abb. Now define 14 Suppose X is any residue of Fq, i.e., we can write Fq = x \u2297 X. Then we can rewrite the identity Fq = \u03bb(Fq) \u2297 (\u03bb(Fq)\\Fq), using the shifting property, as x \u2297 X = x \u2297 \u03bb(X)\u2297(\u03bb(Fq)\\Fq). As we have separately required the semiring to be left cancellative, this implies that X = \u03bb(X) \u2297 (\u03bb(Fq)\\Fq). So (\u03bb(Fq)\\Fq) is a residue of any residue X of Fq, as claimed.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "15 Define \u03bb(0) = 0. From each equivalence class of nonzero functions under , pick a single minimum residue (axiom of choice). Given F , let [F ] denote the minimum residue from its class. Observe that F = f \u2297[F ] for some f ; right cancellativity implies f is unique. So define \u03bb(F ) = f . Shifting property:", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "\u03bb(k \u2297 F ) = \u03bb(k \u2297 f \u2297 [F ]) = k \u2297 f = k \u2297 \u03bb(f \u2297 [F ]) = k \u2297 \u03bb(F ). Quotient property: \u03bb(a \u22121 F ) \u2297 [a \u22121 F ] = a \u22121 F = a \u22121 (\u03bb(F ) \u2297 [F ]) = \u03bb(F ) \u2297 a \u22121 [F ] = \u03bb(F ) \u2297 \u03bb(a \u22121 [F ]) \u2297 [a \u22121 [F ]] = \u03bb(F ) \u2297 \u03bb(a \u22121 [F ]) \u2297 [a \u22121 F ] (the last step since a \u22121 [F ] a \u22121 F ). Applying right cancellativity, \u03bb(a \u22121 F ) = \u03bb(F )\u2297\u03bb(a \u22121 [F ]), showing that \u03bb(F )\\\u03bb(a \u22121 F ) exists. Final- quotient property: Quotient exists since F (\u03b5) = \u03bb(F )\u2297[F ](\u03b5).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "16 Let x, y denote the function mapping a to x, b to y, and everything else to 0. Given km = km , we have k \u2297 m, 1 = k\u2297 m , 1 . Since the minimum residue property implies greedy factorization, we can write m, 1 = f \u2297 a, b , m , 1 = g \u2297 a, b . Then f \u2297 b = g \u2297 b, so by right cancellativity f = g, whence m = f \u2297 a = g \u2297 a = m .", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "17 The equivalence is a standard exercise, though not obvious.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "\u03bb(F ) def = F (min support(F )) \u2208 K if F = 0 0 if F = 0", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "where support(F ) denotes the set of input strings to which F assigns a non-0 weight. This \u03bb clearly has the shifting property needed by section 5. The quotient and final-quotient properties come for free because we are in a division semiring and because \u03bb(F ) = 0 iff F = 0. Under this definition, what is \u03bb(F q ) for a suffix function F q ? Consider all paths of nonzero weight 18 from state q to a final state. If none exist, \u03bb(F q ) = 0. Otherwise, min support(F q ) is the input string on the shortest such path, breaking ties lexicographically. 19 \u03bb(F q ) is simply the weight of that shortest path.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "To push, we must compute \u03bb(F q ) for each state q. This is easy because \u03bb(F q ) is the weight of a single, minimumlength and hence acyclic path from q. (Previous methods combined the weights of all paths from q, even if infinitely many.) It also helps that the left factors at different states are related: if the minimum path from q begins with a weight-k arc to r, then it continues along the minimum path from r, so \u03bb(F q ) = k \u2297 \u03bb(F r ).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "Below is a trivial linear-time algorithm for computing \u03bb(F q ) at every q. Each state and arc is considered once in a breadth-first search back from the final states. len (q) and first(q) store the string length and first letter of a running minimum of support(F q ) \u2208 \u03a3 * . The runtime is O(|states|+t\u2022|arcs|) if \u2297 has runtime t. If \u2297 is slow, this can be reduced to O(t \u2022 |states| + |arcs|) by removing line 16 and waiting until the end, when the minimum path from each non-final state q is fully known, to compute the weight \u03bb(F q ) of that path. Simply finish up by calling FIND-\u03bb on each state q:", |
| "cite_spans": [ |
| { |
| "start": 171, |
| "end": 174, |
| "text": "(q)", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "FIND-\u03bb(state q): 1.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "if \u03bb(Fq) = 0 and len(q) < \u221e then", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "2. \u03bb(Fq) := \u03c3(q, first(q)) \u2297 FIND-\u03bb(\u03b4(q, first(q))) 3. return \u03bb(Fq)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "18 In a division semiring, these are paths free of 0-weight arcs. 19 The min exists since < is a well-ordering. In a purely lexicographic ordering, a * b \u2286 \u03a3 * would have no min.", |
| "cite_spans": [ |
| { |
| "start": 66, |
| "end": 68, |
| "text": "19", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "After thus computing \u03bb(F q ), we simply proceed with pushing, merging, and trimming as in section 5. 20 Pushing runs in time O(t \u2022 |arcs|) and trimming in O(|states| + |arcs|). Merging is worse, with time O(|arcs| log |states|).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Minimization in Division Semirings", |
| "sec_num": "6" |
| }, |
| { |
| "text": "The trouble with Z[ \u221a \u22125] was that it \"lacked\" needed quotients. The example on p. 3 can easily be minimized (down to 3 states) if we regard it instead as defined over (C, +, \u00d7)-letting us use any weights in C. Simply use section 6's algorithm.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "This new change-of-semiring trick can be used for other non-division semirings as well. One can extend the original weight semiring (K, \u2295, \u2297) to a division semiring by adding \u2297-inverses. 21 In this way, the tropical semiring (R \u22650 \u222a {\u221e}, min, +) can be augmented with the negative reals to obtain (R \u222a {\u221e}, min, +). And the transducer semiring (\u2206 * \u222a {\u2205}, min, concat) 22 can be augmented by extending the alphabet \u2206 = {x, y, . . .} with inverse letters {x \u22121 , y \u22121 , . . .}.", |
| "cite_spans": [ |
| { |
| "start": 187, |
| "end": 189, |
| "text": "21", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "The minimized DFA we obtain may have \"weird\" arc weights drawn from the extended semiring. But the arc weights combine along paths to produce the original automaton's outputs, which fall in the original semiring.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "Let us apply this trick to the example of section 2, yielding the following pushed automaton in which F 1 = F 3 as desired. (x \u22121 , y \u22121 , . . . are written as X, Y, . . ., and \u03bb(F q ) is displayed at each q.) For example, the z \u22121 y \u22121 zzz output on the 3 \u2192 4 arc was computed as \u03bb", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "(F 3 ) \u22121 \u2297 wwzzz \u2297 \u03bb(F 4 ) = (wwyz) \u22121 \u2297 wwzzz \u2297 \u03b5 = z \u22121 y \u22121 w \u22121 w \u22121 wwzzz.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "This trick yields new algorithms for the tropical semiring and sequential transducers, which is interesting and perhaps worthwhile. How do they compare with previous work?", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "Over the tropical semiring, our linear-time pushing algorithm is simpler than (Mohri, 1997) , and faster by a log factor, because it does not require a priority queue. (Though this does not help the overall complexity of minimization, which is dominated by the merging step.) We also have no need to implement faster algorithms for special cases, as Mohri proposes, because our basic algorithm is already linear. Finally, our algorithm generalizes better, as it can handle negative weight cycles in the input. These are useful in (e.g.) conditional random fields.", |
| "cite_spans": [ |
| { |
| "start": 78, |
| "end": 91, |
| "text": "(Mohri, 1997)", |
| "ref_id": "BIBREF7" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "On the other hand, Mohri's algorithm guarantees a potentially useful property that we do not: that the weight of the prefix path reading \u03b1 \u2208 \u03a3 * is the minimum weight of all paths with prefix \u03b1. Commonly this approximates \u2212 log(p(most probable string with prefix \u03b1)), perhaps a useful value to look up for pruning.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "As for transducers, how does our minimization algorithm (above) compare with previous ones? Following earlier work by Choffrut and others, Mohri (2000) defines \u03bb(F q ) as the longest common prefix of range(F q ). He constrains these values with a set of simultaneous equations, and solves them by repeated changes of variable using a complex relaxation algorithm. His implementation uses various techniques (including a trie and a graph decomposition) to make pushing run in time O(|states| + |arcs| \u2022 max q |\u03bb(F q )|). 23 Breslauer (1996) gives a different computation of the same result.", |
| "cite_spans": [ |
| { |
| "start": 139, |
| "end": 151, |
| "text": "Mohri (2000)", |
| "ref_id": "BIBREF8" |
| }, |
| { |
| "start": 520, |
| "end": 522, |
| "text": "23", |
| "ref_id": null |
| }, |
| { |
| "start": 523, |
| "end": 539, |
| "text": "Breslauer (1996)", |
| "ref_id": "BIBREF2" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "To implement our simpler algorithm, we represent strings in \u2206 * as pointers into a global trie that extends upon lookup. The strings are actually stored reversed in the trie so that it is fast to add and remove short prefixes. Over the extended alphabet, we use the pointer pair (k, m) to represent the string k \u22121 m where k, m \u2208 \u2206 * have no common prefix. Such pointer pairs can be equality-tested in O(1) time during merging. For k, m \u2208 \u2206 * , k \u2297 m is computed in time O(|k|), and k\\m in time O(|LCP(k, m)|) or more loosely O(|k|) (where LCP = longest common prefix).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "The total time to compute our \u03bb(F q ) values is therefore O(|states| + t \u2022 |arcs|), where t is the maximum length of any arc's weight. For each arc we then compute a new weight as a left-quotient by a \u03bb value. So our total runtime for pushing is O(|states| + |arcs| \u2022 max q |\u03bb(F q )|). This may appear identical to Mohri's runtime, but in fact our |\u03bb(F q )| \u2265 Mohri's, though the two definitions share a worst case of t \u2022 |states|. 24 Inverse letters must be eliminated from the minimized transducer if one wishes to pass it to any specialized algorithms (composition, inversion) that assume weights 23 We define |\u03b5| = 1 to simplify the O(\u2022 \u2022 \u2022) expressions. 24 The |\u03bb(Fq)| term contributed by a given arc from q is a bound on the length of the LCP of the outputs of certain paths from q. Mohri uses all paths from q and we use just two, so our LCP is sometimes longer. However, both LCPs probably tend to be short in practice, especially if one bypasses LCP(k, k) with special handling for k\\k = \u03b5. in \u2206 * . Fortunately this is not hard. If state q of the result was formed by merging states q 1 , . . . q j , define \u03c1(q) = LCS{\u03bb(F qi ) : i = 1, . . . j} \u2208 \u2206 * (where LCS = longest common suffix). Now push the minimized transducer using \u03c1(q) \u22121 in place of \u03bb(F q ) for all q. This corrects for \"overpushing\": any letters \u03c1(q) that were unnecessarily pushed back before minimization are pushed forward again, cancelling the inverse letters. In our running example, state 0 will push (xyz) \u22121 back and the merged state {1,3} will push (yz) \u22121 back. This is equivalent to pushing \u03c1(0) = xyz forward through state 0 and the yz part of it forward through {1,3}, canceling the z \u22121 y \u22121 at the start of one of the next arcs.", |
| "cite_spans": [ |
| { |
| "start": 432, |
| "end": 434, |
| "text": "24", |
| "ref_id": null |
| }, |
| { |
| "start": 600, |
| "end": 602, |
| "text": "23", |
| "ref_id": null |
| }, |
| { |
| "start": 659, |
| "end": 661, |
| "text": "24", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "We must show that the resulting labels really are free of inverse letters. Their values are as if the original pushing had pushed back not \u03bb(F qi ) \u2208 \u2206 * but only its shorter prefix\u03bb(q i ) def = \u03bb(F qi )/\u03c1(q i ) \u2208 \u2206 * (note the right quotient). In other words, an arc from q i to r i with weight k \u2208 \u2206 * was reweighted as\u03bb(q i )\\(k \u2297\u03bb(r i )). Any inverse letters in such new weights clearly fall at the left. So suppose the new weight on the arc from q to r begins with an inverse letter z \u22121 . Then\u03bb(q i ) must have ended with z for each i = 1, . . . j. But then \u03c1(q i ) was not the longest common suffix: z\u03c1(q i ) is a longer one, a contradiction (Q.E.D.).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "Negative weights can be similarly eliminated after minimization over the tropical semiring, if desired, by substituting min for LCS.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "The optional elimination of inverse letters or negative weights does not affect the asymptotic runtime. A caveat here is that the resulting automaton no longer has a canonical form. Consider a straight-line automaton: pushing yields a canonical form as always, but inverseletter elimination completely undoes pushing (\u03bb(q i ) = \u03b5). This is not an issue in Mohri's approach.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "A Bonus: Non-Division Semirings", |
| "sec_num": "7" |
| }, |
| { |
| "text": "We have characterized the semirings over which weighted deterministic automata can be minimized (section 4), and shown how to perform such minimization in both general and specific cases (sections 5, 6, 7). Our technique for division semirings and their subsemirings pushes back, at each state q, the output of a single, easily found, shortest accepting path from q. This is simpler and more general than previous approaches that aggregate all accepting paths from q.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Conclusion and Final Remarks", |
| "sec_num": "8" |
| }, |
| { |
| "text": "Our new algorithm (section 6) is most important for previously unminimizable, practically needed division semirings: real (e.g., for probabilities), expectation (for learning (Eisner, 2002) ), and additive with negative weights (for conditional random fields (Lafferty et al., 2001) ). It can also be used in non-division semirings, as for transducers. It is unpatented, easy to implement, comparable or faster in asymptotic runtime, and perhaps faster in practice (especially for the tropical semiring, where it seems preferable in most respects).", |
| "cite_spans": [ |
| { |
| "start": 175, |
| "end": 189, |
| "text": "(Eisner, 2002)", |
| "ref_id": "BIBREF5" |
| }, |
| { |
| "start": 259, |
| "end": 282, |
| "text": "(Lafferty et al., 2001)", |
| "ref_id": "BIBREF6" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Conclusion and Final Remarks", |
| "sec_num": "8" |
| }, |
| { |
| "text": "Our approach applies also to R-weighted sequential transducers as in (Cortes et al., 2002) . Such automata can be regarded as weighted by the product semiring (R \u00d7 \u2206 * , (+, min), (\u00d7, concat)). Equivalently, one can push the numeric and string components independently.", |
| "cite_spans": [ |
| { |
| "start": 69, |
| "end": 90, |
| "text": "(Cortes et al., 2002)", |
| "ref_id": "BIBREF4" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Conclusion and Final Remarks", |
| "sec_num": "8" |
| }, |
| { |
| "text": "Our new pushing algorithm enables not only minimization but also equivalence-testing in more weight semirings. Equivalence is efficiently tested by pushing the (deterministic) automata to canonicalize their arc labels and then testing unweighted equivalence (Mohri, 1997) .", |
| "cite_spans": [ |
| { |
| "start": 258, |
| "end": 271, |
| "text": "(Mohri, 1997)", |
| "ref_id": "BIBREF7" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Conclusion and Final Remarks", |
| "sec_num": "8" |
| }, |
| { |
| "text": "Let M be an automaton to minimize and F : \u03a3 * \u2192 K be the function it defines. We assume (K, \u2297) allows greedy factorization, so is an equivalence relation on nonzero functions. We first prove thatM with the properties of section 4 is the minimal automaton computing F . We will then show, following Mohri, that the algorithm of section 5 finds such anM . (Section 6 is a special case of section 5.)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Appendix: Remaining Proofs", |
| "sec_num": null |
| }, |
| { |
| "text": "We chose in advance a desired suffix function F [r] for each state [r] ofM , and used these to determine the weights ofM . To show that the weights were determined correctly, letF [r] be the actual suffix function of [r] . Claim that for all \u03b1 and r, F [r] (\u03b1) = F [r] (\u03b1). This is easily proved by induction on |\u03b1|. Our choice of initial weight then ensures thatM computes F .", |
| "cite_spans": [ |
| { |
| "start": 217, |
| "end": 220, |
| "text": "[r]", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Appendix: Remaining Proofs", |
| "sec_num": null |
| }, |
| { |
| "text": "We must now prove minimality. For", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Appendix: Remaining Proofs", |
| "sec_num": null |
| }, |
| { |
| "text": "\u03b1, \u03b2 \u2208 \u03a3 * , say \u03b1 F \u223c \u03b2 iff \u03b1 \u22121 F \u03b2 \u22121 F . Note that F \u223c is an equivalence relation on D def = {\u03b1 \u2208 \u03a3 * : \u03b1 \u22121 F = 0}. 25", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Appendix: Remaining Proofs", |
| "sec_num": null |
| }, |
| { |
| "text": "25 It is not an equivalence relation on all of \u03a3 * , since \u03b1 \u2208 D is Let M be any automaton that computes F . For \u03b1, \u03b2 \u2208 D, we say \u03b1 M \u223c \u03b2 iff \u03b4 M (0, \u03b1) = \u03b4 M < (0, \u03b2), i.e., the prefixes \u03b1 and \u03b2 lead from the start state 0 to the same state q in M .", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "Appendix: Remaining Proofs", |
| "sec_num": null |
| }, |
| { |
| "text": "M \u223c \u03b2, then \u03b1 F \u223c \u03b2, since \u03b1 \u22121 F = \u03c3(0, \u03b1) \u2297 Fq \u03c3(0, \u03b2) \u2297 Fq = \u03b2 \u22121 F . If \u03b1 F \u223c \u03b2, then \u03b1 \u22121 F \u03b2 \u22121 F , so F \u03b4 M (0,\u03b1) \u03b1 \u22121 F \u03b2 \u22121 F F \u03b4 M (0,\u03b2)", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": ", so \u03b4M (0, \u03b1) \u03b4M (0, \u03b2), so \u03b1M \u223c \u03b2 by construction ofM .", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "In short, \u03b1", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "M \u223c \u03b2 \u21d2 \u03b1 F \u223c \u03b2 \u21d2 \u03b1M \u223c \u03b2.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "So each of the three partitions of D into equivalence classes is a refinement of the next. Hence n M \u2265 nF \u2265 nM , where these are the respective numbers of equivalence classes.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "Since M \u223c has one equivalence class per useful state of M (as defined in section 2), n M is the number of states in a trimmed version of M . Similarly nM is the number of states ofM (after trimming). Since M was arbitrary,M is minimal.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "Uniqueness: If M has the same number of states asM , then the two partitions must be equal. So two prefixes reach the same state in M iff they do so inM . This gives a \u03b4-preserving isomorphism between M andM . It follows that the minimal machine is unique, except for the distribution of output labels along paths (which may depend on arbitrary choices of residues F [r] ).", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "Now we turn to section 5's effective construction, using \u03bb, of a pushed machineM and a merged versionM . The proof of minimality is essentially the same as in (Mohri, 2000) . We know thatM computes the same function as M (since pushing, merging, and trimming preserve this). So it suffices to show \u03b1 F \u223c \u03b2 \u21d2 \u03b1M \u223c \u03b2. The above proof of minimality will then go through as before.", |
| "cite_spans": [ |
| { |
| "start": 159, |
| "end": 172, |
| "text": "(Mohri, 2000)", |
| "ref_id": "BIBREF8" |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "M andM have the same states and transition function \u03b4; denote their emission functions by \u03c3 and\u03c3. Fq refers to suffix functions in M . Given \u03b1 F \u223c \u03b2 (so \u03b1, \u03b2 \u2208 D), use the definition of F \u223c to write \u03b1 \u22121 F = k\u03b1 \u2297 F and \u03b2 \u22121 F = k \u03b2 \u2297 F . Let q = \u03b4(0, \u03b1), r = \u03b4(0, \u03b2), k = \u03c3(0, \u03b1). For any a \u2208 \u03a3, write\u03c3(q, a) = \u03bb(Fq)\\\u03bb(a \u22121 Fq) = (k \u2297 \u03bb(Fq))\\(k \u2297 \u03bb(a \u22121 Fq)) = \u03bb(k \u2297 Fq)\\\u03bb(k \u2297 a \u22121 Fq) = \u03bb(\u03b1 \u22121 F )\\\u03bb(a \u22121 (\u03b1 \u22121 F )) = \u03bb(k\u03b1\u2297F )\\\u03bb(a \u22121 (k\u03b1\u2297F )) = \u03bb(F )\\\u03bb(a \u22121 F ). By symmetry,\u03c3(r, a) = \u03bb(F )\\\u03bb(a \u22121 F ) as well. Thanks to left cancellativity, left quotients are unique, so\u03c3(q, a) =\u03c3(r, a). 26 So \u03b1 F \u223c \u03b2 \u21d2 corresponding arcs from q and r inM output identical weights. Since \u03b1a F \u223c \u03b2a as well, the same holds at \u03b4(q, a) and \u03b4(r, a). So by induction, regardingM as an unweighted automaton, exactly the same strings in (\u03a3 \u00d7 K) * are accepted from q and from r. So merging will merge q and r, and \u03b1M \u223c \u03b2 as claimed. related by F \u223c to every \u03b2. This corresponds to the fact that a dead state can be made to merge with any state by pushing 0 back from it, so that the arcs to it have weight 0 and the arcs from it have arbitrary weights. Our construction ofM only creates states for the equivalence classes of D; \u03b4(0, \u03b1) for \u03b1 \u2208 D is undefined, not a dead state. 26 We must check that we did not divide by 0 and obtain a false equation. It suffices to show that k = 0 and \u03bb(Fq) = 0. Fortunately, \u03b1 \u2208 D implies both. (It implies Fq = 0, so (\u03b3 \u22121 Fq)(\u03b5) = Fq(\u03b3) = 0 for some \u03b3. Hence \u03bb(Fq) = 0 since otherwise \u03bb(\u03b3 \u22121 Fq) = 0 and \u03bb(\u03b3 \u22121 Fq)\\(\u03b3 \u22121 Fq)(\u03b5) is undefined, contradicting the final-quotient property.)", |
| "cite_spans": [ |
| { |
| "start": 590, |
| "end": 592, |
| "text": "26", |
| "ref_id": null |
| }, |
| { |
| "start": 1256, |
| "end": 1258, |
| "text": "26", |
| "ref_id": null |
| } |
| ], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "If \u03b1", |
| "sec_num": null |
| }, |
| { |
| "text": "Though appropriate definitions do exist for our examples. For example, take the \u2295 of two strings to be the shorter of the two, breaking ties by a lexicographic ordering.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "That is, any other solution is isomorphic to the one found here if output weights are ignored.3 In general we treat Fq as a partial function, so that range(Fq) excludes 0 (the weight of unaccepted strings). Left factors are unaffected, as anything can divide 0.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "This argument only shows that pushing backward cannot give them the same suffix function. But pushing forward cannot help either, despite footnote 4, since 1 n on the arc to i has no right factors other than itself (the identity) to push forward.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "Then factoring F2 allows state 2 to merge with either 1 or 3; but all three states cannot merge, since any suffix function that could be shared by 1 and 3 could serve as H.8 Trimming ensures that suffix functions are nonzero.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "To show the final-quotient property given the other two, it suffices to show that \u03bb(G) \u2208 K has a right inverse in K, where G is the function mapping \u03b5 to 1 and everything else to 0.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| }, |
| { |
| "text": "It is also permissible to trim the input automaton at the start, or right after computing \u03bb (note that \u03bb(Fq) = 0 iff we should trim q). This simplifies pushing and merging. No trimming is then needed at the end, except to remove the one dead state that the merging step may have added to complete the automaton.21 This is often possible but not always; the semiring must be cancellative, and there are other conditions. Even disregarding \u2295 because we are minimizing a deterministic automaton, it is not simple to characterize when the monoid (K, \u2297) can be embedded into a group(Clifford and Preston, 1967, chapter 12).22 Where min can be defined as in section 6 and footnote 1.", |
| "cite_spans": [], |
| "ref_spans": [], |
| "eq_spans": [], |
| "section": "", |
| "sec_num": null |
| } |
| ], |
| "back_matter": [], |
| "bib_entries": { |
| "BIBREF0": { |
| "ref_id": "b0", |
| "title": "The Design and Analysis of Computer Algorithms", |
| "authors": [ |
| { |
| "first": "A", |
| "middle": [ |
| "V" |
| ], |
| "last": "Aho", |
| "suffix": "" |
| }, |
| { |
| "first": "J", |
| "middle": [ |
| "E" |
| ], |
| "last": "Hopcroft", |
| "suffix": "" |
| }, |
| { |
| "first": "J", |
| "middle": [ |
| "D" |
| ], |
| "last": "Ullman", |
| "suffix": "" |
| } |
| ], |
| "year": 1974, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "A. V. Aho, J. E. Hopcroft, and J. D. Ullman. 1974. The Design and Analysis of Computer Algorithms. Addison-Wesley.", |
| "links": null |
| }, |
| "BIBREF1": { |
| "ref_id": "b1", |
| "title": "Rational Series and their Languages", |
| "authors": [ |
| { |
| "first": "Jean", |
| "middle": [], |
| "last": "Berstel", |
| "suffix": "" |
| }, |
| { |
| "first": "Christophe", |
| "middle": [], |
| "last": "Reutenauer", |
| "suffix": "" |
| } |
| ], |
| "year": 1988, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Jean Berstel and Christophe Reutenauer. 1988. Rational Series and their Languages. Springer-Verlag.", |
| "links": null |
| }, |
| "BIBREF2": { |
| "ref_id": "b2", |
| "title": "The suffix tree of a tree and minimizing sequential transducers", |
| "authors": [ |
| { |
| "first": "Dany", |
| "middle": [], |
| "last": "Breslauer", |
| "suffix": "" |
| } |
| ], |
| "year": 1996, |
| "venue": "Lecture Notes in Computer Science", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Dany Breslauer. 1996. The suffix tree of a tree and minimizing sequential transducers. Lecture Notes in Computer Science, 1075.", |
| "links": null |
| }, |
| "BIBREF3": { |
| "ref_id": "b3", |
| "title": "The Algebraic Theory of Semigroups", |
| "authors": [ |
| { |
| "first": "A", |
| "middle": [ |
| "H" |
| ], |
| "last": "Clifford", |
| "suffix": "" |
| }, |
| { |
| "first": "G", |
| "middle": [ |
| "B" |
| ], |
| "last": "Preston", |
| "suffix": "" |
| } |
| ], |
| "year": 1967, |
| "venue": "", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "A. H. Clifford and G. B. Preston. 1967. The Algebraic Theory of Semigroups.", |
| "links": null |
| }, |
| "BIBREF4": { |
| "ref_id": "b4", |
| "title": "Pierluigi Crescenzi and Viggo Kann. 1998. How to find the best approximation results-a follow-up to Garey and Johnson", |
| "authors": [ |
| { |
| "first": "Corinna", |
| "middle": [], |
| "last": "Cortes", |
| "suffix": "" |
| }, |
| { |
| "first": "Patrick", |
| "middle": [], |
| "last": "Haffner", |
| "suffix": "" |
| }, |
| { |
| "first": "Mehryar", |
| "middle": [], |
| "last": "Mohri", |
| "suffix": "" |
| } |
| ], |
| "year": 2002, |
| "venue": "Proceedings of NIPS", |
| "volume": "29", |
| "issue": "", |
| "pages": "90--97", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Corinna Cortes, Patrick Haffner, and Mehryar Mohri. 2002. Rational kernels. In Proceedings of NIPS, December. Pierluigi Crescenzi and Viggo Kann. 1998. How to find the best approximation results-a follow-up to Garey and Johnson. ACM SIGACT News, 29(4):90-97, December.", |
| "links": null |
| }, |
| "BIBREF5": { |
| "ref_id": "b5", |
| "title": "Parameter estimation for probabilistic finite-state transducers", |
| "authors": [ |
| { |
| "first": "Jason", |
| "middle": [], |
| "last": "Eisner", |
| "suffix": "" |
| } |
| ], |
| "year": 2002, |
| "venue": "Proc. of ACL", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Jason Eisner. 2002. Parameter estimation for probabilistic finite-state transducers. In Proc. of ACL, Philadelphia, July.", |
| "links": null |
| }, |
| "BIBREF6": { |
| "ref_id": "b6", |
| "title": "Conditional random fields: Probabilistic models for segmenting and labeling sequence data", |
| "authors": [ |
| { |
| "first": "John", |
| "middle": [], |
| "last": "Lafferty", |
| "suffix": "" |
| }, |
| { |
| "first": "Andrew", |
| "middle": [], |
| "last": "Mccallum", |
| "suffix": "" |
| }, |
| { |
| "first": "Fernando", |
| "middle": [], |
| "last": "Pereira", |
| "suffix": "" |
| } |
| ], |
| "year": 2001, |
| "venue": "Proceedings of the International Conference on Machine Learning", |
| "volume": "", |
| "issue": "", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "John Lafferty, Andrew McCallum, and Fernando Pereira. 2001. Conditional random fields: Probabilistic models for seg- menting and labeling sequence data. In Proceedings of the International Conference on Machine Learning.", |
| "links": null |
| }, |
| "BIBREF7": { |
| "ref_id": "b7", |
| "title": "Finite-state transducers in language and speech processing", |
| "authors": [ |
| { |
| "first": "Mehryar", |
| "middle": [], |
| "last": "Mohri", |
| "suffix": "" |
| } |
| ], |
| "year": 1997, |
| "venue": "Computational Linguistics", |
| "volume": "", |
| "issue": "2", |
| "pages": "", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Mehryar Mohri. 1997. Finite-state transducers in language and speech processing. Computational Linguistics, 23(2).", |
| "links": null |
| }, |
| "BIBREF8": { |
| "ref_id": "b8", |
| "title": "Minimization algorithms for sequential transducers", |
| "authors": [ |
| { |
| "first": "Mehryar", |
| "middle": [], |
| "last": "Mohri", |
| "suffix": "" |
| } |
| ], |
| "year": 2000, |
| "venue": "Theoretical Computer Science", |
| "volume": "324", |
| "issue": "", |
| "pages": "177--201", |
| "other_ids": {}, |
| "num": null, |
| "urls": [], |
| "raw_text": "Mehryar Mohri. 2000. Minimization algorithms for sequential transducers. Theoretical Computer Science, 324:177-201.", |
| "links": null |
| } |
| }, |
| "ref_entries": { |
| "FIGREF0": { |
| "uris": null, |
| "type_str": "figure", |
| "num": null, |
| "text": "and \u03c3 standardly denote the automaton's transition and output functions: \u03b4(3, a) = 2 is the state reached by the Edmonton, May-June 2003 Main Papers , pp. 64-71" |
| }, |
| "FIGREF3": { |
| "uris": null, |
| "type_str": "figure", |
| "num": null, |
| "text": "support(Fq) is \u03b5 for final q *) 4.\u03bb(Fq) := \u03c6(q) (* Fq(\u03b5) is just the final weight, \u03c6(q) *)" |
| }, |
| "FIGREF4": { |
| "uris": null, |
| "type_str": "figure", |
| "num": null, |
| "text": "Fq = 0 until we discover q *) arc q a:k \u2212\u2192r entering r such that k = 012. if len(q) = \u221e then enqueue q (* breadth-first search *) 13. if len(q) = \u221e or (len(q) = len(r) + 1 and a < first(q)) then 14. first(q) := a (* reduce min support(Fq) *) ) := k \u2297 \u03bb(Fr)" |
| } |
| } |
| } |
| } |