Abstract
Quotient operators have been rarely studied in the context of weighted rational expressions and automaton generation—in spite of the key role played by the quotient of words in formal language theory. To handle both left- and right-quotients we generalize an expansion-based construction of the derived-term (or Antimirov, or equation) automaton and rely on support for a transposition (or reversal) operator. The resulting automata may have spontaneous transitions, which requires different techniques from the usual derived-term constructions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
See the interactive environment, http://vcsn-sandbox.lrde.epita.fr, or the companion notebook, http://vcsn.lrde.epita.fr/dload/doc/ICTAC-2017.html.
- 2.
The (straightforward) definition of addition of expansions, \(\oplus \), will be given below.
- 3.
When lifting the quotient of a language (or series) by a word to a quotient of languages, there are two options: union vs. intersection of the quotients by words. Li et al. [12] name quotient the union-based versions and write \(s^{-1}t\) and \(st^{-1}\), and name residual the intersection-based ones, written \(s {\backslash }t\) and \(s {/}t\). In this paper, we focus only on left and right quotients, but denoted \(s {\backslash }t\) and \(s {/}t\).
- 4.
Given two expansions \(\mathsf {X}, \mathsf {Y}\), \(\mathsf {exprs}({\mathsf {X}\oplus \mathsf {Y}}) \subseteq \mathsf {exprs}({\mathsf {X}}) \cup \mathsf {exprs}({\mathsf {Y}})\), but they may be different; consider for instance \(\mathsf {X}= a \odot [\langle 1 \rangle \odot {\mathsf {1}}]\) and \(\mathsf {Y}= a \odot [\langle -1 \rangle \odot {\mathsf {1}}]\) in \(\mathbb {Z}\).
References
Allauzen, C., Mohri, M.: A unified construction of the Glushkov, follow, and Antimirov automata. In: Královič, R., Urzyczyn, P. (eds.) MFCS 2006. LNCS, vol. 4162, pp. 110–121. Springer, Heidelberg (2006). doi:10.1007/11821069_10
Angrand, P.-Y., Lombardy, S., Sakarovitch, J.: On the number of broken derived terms of a rational expression. J. Autom. Lang. Comb. 15(1/2), 27–51 (2010)
Antimirov, V.: Partial derivatives of regular expressions and finite automaton constructions. TCS 155(2), 291–319 (1996)
Brzozowski, J.A.: Derivatives of regular expressions. J. ACM 11(4), 481–494 (1964)
Champarnaud, J.-M., Ouardi, F., Ziadi, D.: An efficient computation of the equation \(\mathbb{K}\)-automaton of a regular \(\mathbb{K}\)-expression. In: Harju, T., Karhumäki, J., Lepistö, A. (eds.) DLT 2007. LNCS, vol. 4588, pp. 145–156. Springer, Heidelberg (2007). doi:10.1007/978-3-540-73208-2_16
Demaille, A.: Derived-term automata of multitape rational expressions. In: Han, Y.-S., Salomaa, K. (eds.) CIAA 2016. LNCS, vol. 9705, pp. 51–63. Springer, Cham (2016). doi:10.1007/978-3-319-40946-7_5
Demaille, A.: Derived-term automata for extended weighted rational expressions. In: Sampaio, A., Wang, F. (eds.) ICTAC 2016. LNCS, vol. 9965, pp. 351–369. Springer, Cham (2016). doi:10.1007/978-3-319-46750-4_20
Demaille, A.: Derived-term automata for extended weighted rational expressions. Technical report 1605.01530, arXiv, May 2016. http://arxiv.org/abs/1605.01530
Demaille, A., Duret-Lutz, A., Lombardy, S., Sakarovitch, J.: Implementation concepts in Vaucanson 2. In: Konstantinidis, S. (ed.) CIAA 2013. LNCS, vol. 7982, pp. 122–133. Springer, Heidelberg (2013). doi:10.1007/978-3-642-39274-0_12
Ésik, Z., Kuich, W.: Equational Axioms for a Theory of Automata. Springer, Heidelberg (2004)
Kozen, D.C.: Automata and Computability, 1st edn. Springer, Secaucus (1997)
Li, Y., Wang, Q., Li, S.: On quotients of formal power series. Comput. Res. Repos. abs/1203.2236 (2012)
Lombardy, S., Sakarovitch, J.: Derivatives of rational expressions with multiplicity. TCS 332(1–3), 141–177 (2005)
Lombardy, S., Sakarovitch, J.: The validity of weighted automata. Int. J. Algebra Comput. 23(4), 863–914 (2013)
Sakarovitch, J.: Elements of Automata Theory. Cambridge University Press, Cambridge (2009). (Corrected English translation of Éléments de théorie des automates, Vuibert, 2003)
Thiemann, P.: Derivatives for Enhanced Regular Expressions. Springer, Cham (2016)
Acknowledgments
We thank the anonymous reviewers for their very helpful comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Proofs
A Proofs
1.1 A.1 Proof of Proposition 1
This proof goes in several steps, with different constraints over s and t. From a formal point of view, it is actually “trivial”: a simple look at the proof of Sakarovitch [15, Proposition III.2.6] shows that both expressions are formally equivalent. The real technical difficulty is semantic: ensuring that all the (infinite) sums are properly defined.
We actually only need Item 4 to establish Proposition 2.
-
1.
When s and t are proper. This is a well-known consequence of Arden’s lemma [15, Proposition III.2.5].
-
2.
When \(s \in \mathbb {K}\), and t is proper. This property holds when \(\mathbb {K}\) is a strong topological semiring, and when \(s^*\) is defined [15, Proposition III.2.6].
-
3.
When \(s, t \in \mathbb {K}\). This result follows directly from the hypothesis of this property. Note however that \(s^* (ts^*)^* = (s+t)^*\) is verified in all the “usual” semirings.
-
If \(\mathbb {K}\) is a “usual numerical semiring” (i.e., \(\mathbb {Q}, \mathbb {R}\), or more generally, a subring of \(\mathbb {C}^n\)), then \(s^*\) is the inverse of \(1-s\), i.e., \((1-s)s^* = s^*(1-s) = 1\). To establish the result, we show that \(s^*(ts^*)^*\) is the inverse of \(1-(s+t)\). By hypothesis, \(s^*\) and \((ts^*)^*\) are defined. \( (1-(s+t))s^*(ts^*)^* = (1-s)s^*(ts^*)^* - ts^*(ts^*)^* = (ts^*)^* - ts^*(ts^*)^* = (1-ts^*)(ts^*)^* = 1 \), which shows that \((s+t)^*\) is defined.
-
If \(\mathbb {K}\) is a tropical semiring, say, \(\langle \mathbb {Z}\cup \{\infty \}, \min , +, \infty , 0 \rangle \), then \(s^*\) is defined iff \(s \ge 0\), and then \(s^* = 0\), hence the result trivially follows.
-
If \(\mathbb {K}\) is the \(\mathrm {Log}\) semiring, \(\langle \mathbb {R}^+\cup \{\infty \}, +_\text {Log}, +, \infty , 0 \rangle \) where \(+_\text {Log} \,:=\,x, y \mapsto -\log (\exp (-x) + \exp (-y))\). Then we get \(x^* = \log (1 - \exp (-x))\). Again, one can verify the identity.
-
-
4.
When \(s \in \mathbb {K}\) and t is any series. By hypothesis, \((ts^*)^*\) is defined, i.e., \((t_{\varepsilon }s^*)^*\) is defined, so by Item 3, \((s+t_{\varepsilon })^*\) is defined.
$$\begin{aligned} (s+t)^*&= (s+t_{\varepsilon }+t_p)^*\\&= (s+t_{\varepsilon })^*(t_p(s+t_{\varepsilon })^*)^*&\text {by Item 2,} \,\, t_p\text { proper, }(s+t_{\varepsilon })^* \text { defined}\\&= s^*(t_{\varepsilon }s^*)^* (t_ps^*(t_{\varepsilon }s^*)^*)^*&\text {by Item 3}\\&= s^*(t_{\varepsilon }s^* + t_ps^*)^*&\text {by Item 2,} \,\, t_ps^* \text { proper, }(t_{\varepsilon }s^*)^* \text { defined}\\&= s^*((t_{\varepsilon }+ t_p) s^*)^*\\&= s^*(t s^*)^* \end{aligned}$$ -
5.
When s is any series and t is proper. By hypothesis, \(s^*\) is defined, so \(s_{\varepsilon }^*\) is defined.
$$\begin{aligned} (s+t)^*&= (s_{\varepsilon }+ (s_p+ t))*\\&= s_{\varepsilon }^* ((s_p+t)s_{\varepsilon }^*)^*&\text {by Item 2, } \,\, s_p+t \text { proper}\\&= s_{\varepsilon }^* (s_ps_{\varepsilon }^*+ts_{\varepsilon }^*)^* \\&= s_{\varepsilon }^* (s_ps_{\varepsilon }^*)^*(ts_{\varepsilon }^*(s_ps_{\varepsilon }^*)^*)^*&\text {by Item 1,} \,\, s_ps_{\varepsilon }^* \text { and }ts_{\varepsilon }^* \text { are proper}\\&= (s_{\varepsilon }+ s_p)^* (t (s_{\varepsilon }+ s_p)^*)^*&\text {by Item 2 } s_{\varepsilon }^* \text { is defined,} \,\, s_p\text { is proper}\\&= s^*(ts^*)^* \end{aligned}$$ -
6.
When s and t are any series. By hypothesis, \(s^*\) is defined.
$$\begin{aligned} (s + t)^*&= (s + t_{\varepsilon }+ t_p)^*\\&= (s+t_{\varepsilon })^* (t_p(s+t_{\varepsilon })^*)^*&\text {by Item 5,} \,\, t_p\text { proper}\\&= s^*(t_{\varepsilon }s^*)(t_ps^*(t_{\varepsilon }s^*)^*)^*&\text {by Item 4,} \,\, t_{\varepsilon }\in \mathbb {K}\\&= s^*(t_{\varepsilon }s^* + t_ps^*)^*&\text {by by Item 5,} \,\, t_ps^* \text { proper}\\&= s^* (t s^*)^* \end{aligned}$$
1.2 A.2 Proof of Lemma 1
These are trivial consequences of the properties of the corresponding operations on series. For instance, let \(\mathsf {P}= \bigoplus _{i\in [m]}\langle k_i \rangle \odot {\mathsf {E}_i}, \mathsf {Q}= \bigoplus _{j\in [n]}\langle h_j \rangle \odot {\mathsf {F}_j}\), we have:
1.3 A.3 Proof of Lemma 2
The proofs are straightforward: lift semantic equivalences, such as those of Propositions 3 and 4, to syntax.
We prove for instance the case of the left quotient. However, we will use (5) rather than (4) for two reasons: not only is the proof more compact, it is also more general as it provides support for expressions and automata whose labels are words (e.g., “abcd”), not just letters or \(\varepsilon \). In that case, one can verify that .
The proof is as follows.
1.4 A.4 Proof of Proposition 6
A simple induction on \(\mathsf {E}\) proves \( [\! [d(\mathsf {E}) ]\! ] = [\! [\mathsf {E} ]\! ]\), see the details in Demaille [7]. To handle transpose, we add the following case:
1.5 A.5 Proof of Theorem 1
This proof shares large parts with the corresponding proof in Demaille [8, Appendix C], itself being based on the work from Lombardy and Sakarovitch [13]. As in the former we introduce \(\mathrm {PD}(\mathsf {E})\), the proper derived terms of \(\mathsf {E}\), rather than \(\mathsf {TD}(\mathsf {E})\), the true derived terms of \(\mathsf {E}\), as in the latter.
We will manipulate sets of expressions. To simplify notations, operations on expressions are lifted additively on sets of expressions. For instance:
Definition 10
(Derived Terms). Given an expression \(\mathsf {E}\), its proper derived terms is the set \(\mathrm {PD}(\mathsf {E})\) defined as follows:
The derived terms of an expression \(\mathsf {E}\) is \(\mathrm {D}(\mathsf {E}) \,:=\,\mathrm {PD}(\mathsf {E}) \cup \{\mathsf {E}\}\).
Lemma 3
For any expression \(\mathsf {E}\), \(\mathrm {D}(\mathsf {E})\) is finite.
Proof
Follows from the finiteness of \(\mathrm {PD}(\mathsf {E})\), which is a direct consequence from Definition 10: finiteness propagates during the induction. \(\square \)
Lemma 4
(Proper Derived Terms and Single Expansion). For any expression \(\mathsf {E}\), \(\mathsf {exprs}({d(\mathsf {E})}) \subseteq \mathrm {PD}(\mathsf {E})\).
Proof
Established by a simple verification of Definition 7. \(\square \)
The derived terms of derived terms of \(\mathsf {E}\) are derived terms of \(\mathsf {E}\). In other words, repeated expansions never “escape” the set of derived terms.
Lemma 5
(Proper Derived Terms and Repeated Expansions). Let \(\mathsf {E}\) be an expression. For all \(\mathsf {F}\in \mathrm {PD}(\mathsf {E})\), \(\mathsf {exprs}({d(\mathsf {F})}) \subseteq \mathrm {PD}(\mathsf {E})\).
Proof
This will be proved by induction over \(\mathsf {E}\).
-
Case \(\mathsf {E}= \mathsf {0}\) or \(\mathsf {E}= \mathsf {1}\) . Trivially true, since there is no such \(\mathsf {F}\), as \(\mathrm {PD}(\mathsf {E}) = \emptyset \).
-
Case \(\mathsf {E}= a\) . Then \(\mathrm {PD}(\mathsf {E}) = \{\mathsf {1}\}\), hence \(\mathsf {F}= \mathsf {1}\) and therefore \(d(\mathsf {F}) = d(\mathsf {1}) = \langle 0_{\mathbb {K}} \rangle \), so \(\mathsf {exprs}({d(\mathsf {F})}) = \emptyset \subseteq \mathrm {PD}(\mathsf {E})\).
-
Case \(\mathsf {E}= \mathsf {G}+ \mathsf {H}\) . Then \(\mathrm {PD}(\mathsf {E}) = \mathrm {PD}(\mathsf {G}) \cup \mathrm {PD}(\mathsf {H})\). Suppose, without loss of generality, that \(\mathsf {F}\in \mathrm {PD}(\mathsf {G})\). Then, by induction hypothesis, \(\mathsf {exprs}({d(\mathsf {F})}) \subseteq \mathrm {PD}(\mathsf {G}) \subseteq \mathrm {PD}(\mathsf {E})\).
-
Case \(\mathsf {E}= \langle k \rangle {\mathsf {G}}\) . Then if \(\mathsf {F}\in \mathrm {PD}(\langle k \rangle {\mathsf {G}}) = \mathrm {PD}(\mathsf {G})\), so by induction hypothesis \(\mathsf {exprs}({d(\mathsf {F})}) \subseteq \mathrm {PD}(\mathsf {G}) = \mathrm {PD}(\langle k \rangle {\mathsf {G}}) = \mathrm {PD}(\mathsf {E})\).
-
Case \(\mathsf {E}= \mathsf {G}\cdot \mathsf {H}\) . Then \(\mathrm {PD}(\mathsf {E}) = \{\mathsf {G}_i\cdot \mathsf {H}\mid \mathsf {G}_i \in \mathrm {PD}(\mathsf {G})\} \cup \mathrm {PD}(\mathsf {H})\).
-
– If \(\mathsf {F}= \mathsf {G}_i\cdot \mathsf {H}\) with \(\mathsf {G}_i \in \mathrm {PD}(\mathsf {G})\), then \(d(\mathsf {F}) = d(\mathsf {G}_i\cdot \mathsf {H}) = d_p(\mathsf {G}_i)\cdot \mathsf {H}\oplus \langle d_{\$}(\mathsf {G}_i) \rangle {d(\mathsf {H})}\).
Since \(\mathsf {G}_i \in \mathrm {PD}(\mathsf {G})\) by induction hypothesis \(\mathsf {exprs}({d_p(\mathsf {G}_i)}) = \mathsf {exprs}({d(\mathsf {G}_i)}) \subseteq \mathrm {PD}(\mathsf {G})\). By definition of the product of an expansion by an expression, \(\mathsf {exprs}({d_p(\mathsf {G}_i)\cdot \mathsf {H}}) \subseteq \{\mathsf {G}_j \cdot \mathsf {H}\mid \mathsf {G}_j \in \mathrm {PD}(\mathsf {G})\} \subseteq \mathrm {PD}(\mathsf {G}\cdot \mathsf {H}) = \mathrm {PD}(\mathsf {E})\).
-
– If \(\mathsf {F}\in \mathrm {PD}(\mathsf {H})\), then by induction hypothesis \(\mathsf {exprs}({d(\mathsf {F})}) \subseteq \mathrm {PD}(\mathsf {H}) \subseteq \mathrm {PD}(\mathsf {E})\).
-
-
Case \(\mathsf {E}= \mathsf {G}^*\) . If \(\mathsf {F}\in \mathrm {PD}(\mathsf {E}) = \{\mathsf {G}_i\cdot \mathsf {G}^* \mid \mathsf {G}_i \in \mathrm {PD}(\mathsf {G})\}\), i.e., if \(\mathsf {F}= \mathsf {G}_i\cdot \mathsf {G}^*\) with \(\mathsf {G}_i \in \mathrm {PD}(\mathsf {G})\), then \(d(\mathsf {F}) = d(\mathsf {G}_i\cdot \mathsf {G}^*) = d_p(\mathsf {G}_i)\cdot \mathsf {G}^* \oplus \langle d_{\$}(\mathsf {G}_i) \rangle {d(\mathsf {G}^*)}\), so \(\mathsf {exprs}({d(\mathsf {F})}) \subseteq \mathsf {exprs}({d_p(\mathsf {G}_i)\cdot \mathsf {G}^*}) \cup \mathsf {exprs}({d(\mathsf {G}^*)})\).Footnote 4 We will show that both are subsets of \(\mathrm {PD}(\mathsf {E})\), which will prove the result.
Since \(\mathsf {G}_i \in \mathrm {PD}(\mathsf {G})\), by induction hypothesis, \(\mathsf {exprs}({d_p(\mathsf {G}_i)}) = \mathsf {exprs}({d(\mathsf {G}_i)}) \subseteq \mathrm {PD}(\mathsf {G})\), so by definition of a product of an expansion by an expression, \(\mathsf {exprs}({d_p(\mathsf {G}_i) \cdot \mathsf {G}^*}) \subseteq \{\mathsf {G}_j \cdot \mathsf {G}_j^* \mid \mathsf {G}_j \in \mathrm {PD}(\mathsf {G})\} = \mathrm {PD}(\mathsf {E})\).
By Lemma 4 \(\mathsf {exprs}({d(\mathsf {G}^*)}) \subseteq \mathrm {PD}(\mathsf {G}^*) = \mathrm {PD}(\mathsf {E})\).
-
Case \(\mathsf {E}= \mathsf {G}{\backslash }\mathsf {H}\) . (1) and (4) show that for all expansions \(\mathsf {X}, \mathsf {Y}\),
(8)Let \(\mathsf {F}\in \mathrm {PD}(\mathsf {E}) = \mathrm {PD}(\mathsf {G}) {\backslash }\mathrm {PD}(\mathsf {H})\), i.e., let \(\mathsf {F}= \mathsf {G}_i{\backslash }\mathsf {H}_j\) with \(\mathsf {G}_i \in \mathrm {PD}(\mathsf {G}), \mathsf {H}_j \in \mathrm {PD}(\mathsf {H})\), then
$$\begin{aligned} \mathsf {exprs}({d(\mathsf {F})})&= \mathsf {exprs}({d(\mathsf {G}_i {\backslash }\mathsf {H}_j)}) \\&= \mathsf {exprs}({d(\mathsf {G}_i) {\backslash }d(\mathsf {H}_j)})&\text {by (7)} \\&\subseteq \mathsf {exprs}({d(\mathsf {G}_i)}) {\backslash }\mathsf {exprs}({d(\mathsf {H}_j)})&\text {by (8)}\\&\subseteq \mathrm {PD}(\mathsf {G}) {\backslash }\mathrm {PD}(\mathsf {H})&\text {by induction hypothesis}\\&= \mathrm {PD}(\mathsf {G}{\backslash }\mathsf {H})&\text {by Definition 10}\\&= \mathrm {PD}(\mathsf {E})&\end{aligned}$$
\(\square \)
Lemma 6
(Derived Terms and Repeated Expansions). Let \(\mathsf {E}\) be an expression. For all \(\mathsf {F}\in \mathrm {D}(\mathsf {E})\), \(\mathsf {exprs}({d(\mathsf {F})}) \subseteq \mathrm {PD}(\mathsf {E})\).
Proof
Immediate consequence of Lemmas 4 and 5, since \(\mathrm {D}(\mathsf {E}) = \mathrm {PD}(\mathsf {E}) \cup \{\mathsf {E}\}\). \(\square \)
We may now prove Theorem 1.
Theorem 1
1 For any expression \(\mathsf {E}\), \(\mathcal {A}_\mathsf {E}\) is finite.
Proof
The states of \(\mathcal {A}_\mathsf {E}\) are members of \(\mathrm {D}(\mathsf {E})\) (Lemma 6), which is finite (Lemma 3). \(\square \)
1.6 A.6 Proof of Theorem 2
The Definition 8 shows that each state \(q_\mathsf {F}\) of the \(\mathcal {A}_\mathsf {E}\) has the following semantics:
Besides:
(9) and (10) define the same system of linear equations, hence \( [\! [\mathcal {A}_\mathsf {E} ]\! ] = [\! [\mathsf {E} ]\! ]\). \(\square \)
1.7 A.7 Proof of Proposition 8
Commutativity may be replaced by a weaker condition: \(\forall u, v\in A^*, t(uv) \cdot s(u) = s(u) \cdot t(uv)\).
The right-quotient is treated similarly.
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Demaille, A., Michaud, T. (2017). Derived-Term Automata of Weighted Rational Expressions with Quotient Operators. In: Hung, D., Kapur, D. (eds) Theoretical Aspects of Computing – ICTAC 2017. ICTAC 2017. Lecture Notes in Computer Science(), vol 10580. Springer, Cham. https://doi.org/10.1007/978-3-319-67729-3_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-67729-3_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-67728-6
Online ISBN: 978-3-319-67729-3
eBook Packages: Computer ScienceComputer Science (R0)