21 #ifndef AWALI_COMMON_DOCSTRING_EPSREMOVAL_HH
22 #define AWALI_COMMON_DOCSTRING_EPSREMOVAL_HH
26 namespace awali {
namespace docstring {
30 "Specification and description of the 'epsilon-removal' algorithm",
31 " Specification and description of the epsilon-removal algorithm",
36 Write `<aut> = (I, E, T)` where `I` is the vector of initial states
37 (of initial values for weighted automata), `T` the vector of final states
38 (of final values for weighted automata), and `E` the transition matrix.
39 Let `E = F + G` where `F` is 'proper', that is, its entries do not contain
40 the empty word with non zero coefficient, whereas the entries of `G` are,
41 when non zero, the empty word with a non zero coefficient. The behaviour
44 I.E^*.T = I.(F+G)^*.T = I.(G^*.F)^*.G^*.T = I.G^*.(F.G^*)^*.T
48 proper( (I,E,T), backward) = ( I, (G^*.F), (G^*.T) ) and
50 proper( (I,E,T), forward) = ( (I.G^*), (F.G^*), T ) .
55 Proper computes both `G^*.F` and `G^*.T` with a method which is similar
56 to the state elimination method. All states are visited, one after the other.
58 At state `s`, every epsilon-transition incoming to `s` is removed, giving birth
59 to one new transition for every transition outgoing from `s`. The case of an
60 epsilon-transition which is a loop on `s` with weight `k` is special.
61 If `k` is starrable, the weight of every transition outgoing from `s` is
62 multiplied by `k^*`. If `k` is not starrable, then `<aut>` is not valid and
63 the algorithm fails and stops. Hence the algorithm is also the test for the
64 'validity' of `<aut>` (see 'is-valid' function).
66 After all epsilon-transition incoming to `s` are removed, if no other incoming
67 transitions are left, state `s` is also removed.
69 Of course, being final is treated as an outgoing transition, and being initial
70 as an incoming transition.
72 More details can be found in: S. Lombardy, J. Sakarovitch: The validity of
73 weighted automata, *Int. J. of Algebra and Computation* (2013) 863--913.
static entry_t eps_removal
Definition: eps_removal.hh:28
Main namespace of Awali.
Definition: ato.hh:22