Skip to main content
Log in

Conjunctive grammars and alternating pushdown automata

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

In this paper we introduce a variant of alternating pushdown automata, synchronized alternating pushdown automata, which accept the same class of languages as those generated by conjunctive grammars.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. Semi-extended regular expressions contain an explicit operator for intersection.

  2. We call two models equivalent if they recognize/generate the same class of languages.

  3. One-turn PDA are a sub-family of pushdown automata, where in each computation the stack height switches only once from non-decreasing to non-increasing. That is, once a transition replaces the top symbol of the stack with \(\epsilon \), all subsequent transitions may write at most one character.

  4. The languages accepted, respectively, derived, by these two models properly include the boolean closure of deterministic context-free languages.

  5. This type of formalization is standard in the field of formal verification, see [13], say.

  6. This is similar to the concept of a transition from a universal state in the standard formalization of alternating automata, as all branches must accept.

  7. Alternatively, one can extend the definition of \(A\) with a set of accepting states \(F \subseteq Q\), and define collapsing and acceptance by accepting states, similarly to the classical definition. It can readily be seen that such an extension results in an equivalent model of computation.

  8. We omit the state components of both \(A_G\) and \(\delta \).

  9. If \(X_j \in \Sigma \), then \(w_j = X_j\).

References

  • Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling, Volume I Parsing. Prentice-Hall, Englewood Cliffs (1972)

    Google Scholar 

  • Aizikowitz, T., Kaminski, M.: Conjunctive grammars and alternating pushdown automata. In: Hodges, W., de Queiroz, R. (Eds.) The 15th Workshop on Logic, Language, Information and Computation—WoLLIC’2008, Volume 5110 of Lecture Notes in Artificial Intelligence, pp. 30–41. Springer, Berlin/Heidelberg (2008)

  • Aizikowitz, T., Kaminski, M.: Linear conjunctive grammars and one-turn synchronized alternating pushdown automata. In: de Groote, P., Egg, M., Kallmeyer, L. (Eds.) Formal Grammar, 14th International Conference—FG 2009, Volume 5591 of Lecture Notes in Artificial Intelligence, pp. 1–16. Springer, Berlin/Heidelberg (2011)

  • Aizikowitz, T., Kaminski, M.: \(LR(0)\) conjunctive grammars and deterministic synchronized alternating pushdown automata. In: Kulikov, A.S., Vereshchagin, N.K. (Eds.) The 6th International Computer Science Symposium in Russia—CSR 2011, Volume 6651 of Lecture Notes in Computer Science, pp. 345–358. Springer, Berlin/Heidelberg (2011)

  • Alur, R., Madhusudan, P.: Visibly pushdown languages. In: Proceedings of the Thirty-Sixth Annual ACM Symposium on Theory of Computing, STOC ’04, pp. 202–211. ACM (2004)

  • Chandra, A.K., Kozen, D.C., Stockmeyer, L.J.: Alternation. J. ACM 28(1), 114–133 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  • Culik, K., II, Gruska, J., Salomaa, A.: Systolic trellis automata, I and II. Int. J. Comput. Math. 15 and 16, 195–212 and 3–22 (1984)

  • Ginsburg, S., Spanier, E.H.: Finite-turn pushdown automata. SIAM J. Control 4(3), 429–453 (1966)

    Article  MathSciNet  MATH  Google Scholar 

  • Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation. Addison-Wesley, Reading (1979)

    MATH  Google Scholar 

  • Jez, A.: Conjunctive grammars generate non-regular unary languages. Int. J. Found. Comput. Sci. 19, 597–615 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  • Jez, A., Okhotin, A.: Conjunctive grammars over a unary alphabet: undecidability and unbounded growth. Theory Comput. Syst. 46, 27–58 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  • Knuth, D.E.: On the translation of languages from left to right. Inf. Control 8, 607–639 (1965)

    Article  MathSciNet  Google Scholar 

  • Kupferman, O., Vardi, M.Y.: Weak alternating automata are not that weak. ACM Trans. Comput. Logic 2, 408–429 (2001)

    Google Scholar 

  • Kupferman, O., Zuhovitzky, Sh: An improved algorithm for the membership problem for extended regular expressions. In: Diks, K., Rytter, W. (Eds.) Mathematical Foundations of Computer Science, Volume 2420 of Lecture Notes in Computer Science, pp. 446–458. Springer, Berlin/Heidelberg (2002)

  • Ladner, R.E., Lipton, R.J., Stockmeyer, L.J.: Alternating pushdown and stack automata. SIAM J. Comput. 13(1), 135–155 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  • Lehtinen, T., Okhotin, A.: Boolean grammars and GSM mappings. Int. J. Found. Comput. Sci. 21, 799–815 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  • Masaru, T.: Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems. Kluwer, Norwell (1985)

    Google Scholar 

  • Okhotin, A.: Conjunctive grammars. J. Autom. Lang. Comb. 6(4), 519–535 (2001)

    MathSciNet  MATH  Google Scholar 

  • Okhotin, A.: LR parsing for conjunctive grammars. Grammars 5(2), 21–40 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  • Okhotin, A.: Conjunctive Langauges are Closed Under Inverse Homomorphism. Technical Report 2003/468, School of Computing, Queens University (2003)

  • Okhotin, A.: Efficient automaton-based recognition for linear conjunctive languages. Int. J. Found. Comput. Sci. 14(6), 1103–1116 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  • Okhotin, A.: A recognition and parsing algorithm for arbitrary conjunctive grammars. Theor. Comput. Sci. 302, 81–124 (2003)

    Article  MathSciNet  Google Scholar 

  • Okhotin, A.: On the equivalence of linear conjunctive grammars and trellis automata. RAIRO Theor. Inform. Appl. 38(1), 69–88 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  • Okhotin, A., Reitwießner, C.: Conjunctive grammars with restricted disjunction. Theor. Comput. Sci. 411, 2559–2571 (2010)

    Article  MATH  Google Scholar 

  • Wotschke, D.: Nondeterminism and boolean operations in PDA’s. J. Comput. Syst. Sci. 16(3), 456–461 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  • Yamamoto, H.: An automata-based recognition algorithm for semi-extended regular expressions. In: Nielsen, M., Rovan, B. (Eds.) Mathematical Foundations of Computer Science—MFCS 2000, 25th International Symposium, Volume 1893 of Lecture Notes in Computer Science, pp. 699–708. Springer, Berlin/Heidelberg (2000)

Download references

Acknowledgments

The authors are grateful to Nissim Francez for his remarks on the first draft of this paper. The work of Michael Kaminski was supported by the fund for promotion of research at the Technion.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Kaminski.

Appendix: Proofs of Lemmas 23 and 

Appendix: Proofs of Lemmas 23 and 

1.1 Proof of Lemma 23

The proof is by induction on the length \(k\) of the derivation

$$\begin{aligned}{}[q,X,p] \Rightarrow _L^*x [q_1,X_1,q_2] \cdots [q_m,X_m,p]. \end{aligned}$$

Basis: \(k = 0\). That is,

$$\begin{aligned}{}[q,X,p] \Rightarrow _L^0 x [q_1,X_1,q_2] \cdots [q_m,X_m,p]. \end{aligned}$$

Then \(x = \epsilon \) and \([q_1,X_1,q_2] \cdots [q_m,X_m,p] = [q,X,p]\). Trivially,

$$\begin{aligned} (q,\epsilon ,X) \vdash ^0 (q,\epsilon ,X). \end{aligned}$$

Induction Step: Assume that the implication holds for all derivations of the length at most \(k, k \ge 1\), and let

$$\begin{aligned}{}[q,X,p] \Rightarrow _L^{k+1} x [q_1,X_1,q_2] \cdots [q_m,X_m,p]. \end{aligned}$$

That is,

$$\begin{aligned}{}[q,X,p] \Rightarrow \sigma [q_1^\prime ,Y_1,q_2^\prime ] \cdots [q_\ell ^\prime ,Y_\ell ,q_{\ell + 1}^\prime ] \Rightarrow _L^{k} \sigma y [q_1,X_1,q_2] \cdots [q_m,X_m,p], \end{aligned}$$
(21)

where

$$\begin{aligned} x = \sigma y \end{aligned}$$
(22)

for some \(\sigma \in \Sigma \cup \{\epsilon \}\) and \(q_1^\prime ,\ldots ,q_{\ell +1}^\prime \in Q\).

It follows from the first step of derivation (21) that

$$\begin{aligned}{}[q,X,p] \rightarrow \sigma [q_1^\prime ,Y_1,q_2^\prime ] \cdots [q_\ell ^\prime ,Y_\ell ,q_{\ell + 1}^\prime ] \in P. \end{aligned}$$

Thus, by the definition of \(P\),

$$\begin{aligned} (q_1^\prime ,Y_1 Y_2 \cdots Y_\ell ) \in \delta (q,\sigma ,X). \end{aligned}$$
(23)

Let \(h\) be the maximal number such that in the derivation

$$\begin{aligned}{}[q_1^\prime ,Y_1,q_2^\prime ] \cdots [q_\ell ^\prime ,Y_\ell ,q_{\ell + 1}^\prime ] \Rightarrow _L^{k} y [q_1,X_1,q_2] \cdots [q_m,X_m,p] \end{aligned}$$

no rule is applied to \([q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{\ell + 2 - h}^\prime ]\). Then

$$\begin{aligned}{}[q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{\ell + 2 - h}^\prime ] \!\!\!&\cdots [q_\ell ^\prime , Y_{\ell },q_{\ell + 1}^\prime ] \nonumber \\&\,= [q_{m + 1 - h},X_{m + 1 - h},q_{m + 2 - h}] \cdots [q_m,X_{m},p] \end{aligned}$$
(24)

and

$$\begin{aligned} \begin{aligned}&[q_1^\prime ,Y_1,q_2^\prime ] \cdots [q_{\ell - h}^\prime ,Y_{\ell - h},q_{\ell + 1 - h}^\prime ]\\&\quad \Rightarrow _L^{{\le } \, k} y [q_1,X_1,q_2] \cdots [q_{m - h},X_{m - h},q_{m + 1 - h}].~~~~~~~~ \end{aligned} \end{aligned}$$
(25)

Since the derivation (25) is leftmost, there are \(y_1,y_2,\ldots ,y_{\ell - h} \in \Sigma ^*\) such that

$$\begin{aligned} y_1 y_2 \cdots y_{\ell - h} = y, \end{aligned}$$
(26)
$$\begin{aligned}{}[q_j^{\prime },Y_j,q_{j+1}^\prime ] \Rightarrow ^{{*}} y_j, \ \ \ \ \ \ \ j = 1,2,\ldots ,\ell - 1 - h, \end{aligned}$$
(27)

and

$$\begin{aligned}{}[q_{\ell - h}^\prime ,Y_{\ell - h},q_{\ell + 1 - h}^\prime ] \Rightarrow ^{{\le }\,k} y_{\ell - h} [q_1,X_1,q_2] \cdots [q_{m - h},X_{m - h},q_{m + 1 - h}]. \end{aligned}$$
(28)

By the “only if” part of [Equivalence (5.3), p. 117], it follows from (27) that

$$\begin{aligned} (q_j^\prime ,y_j,Y_j) \vdash ^*(q_{j+1}^\prime ,\epsilon ,\epsilon ), \ \ \ \ \ \ \ j = 1,2,\ldots ,\ell - 1 - h. \end{aligned}$$
(29)

It follows from (24) that \(q_{m + 1 - h} = q_{\ell + 1 - h}^\prime \). Thus, (28) is also

$$\begin{aligned}{}[q_{\ell - h}^\prime ,Y_{\ell - h},q_{\ell + 1 - h}^\prime ] \Rightarrow ^{{\le } \, k} y_{\ell - h} [q_1,X_1,q_2] \cdots [q_{m - h},X_{m - h},q_{\ell + 1 - h}^\prime ] \end{aligned}$$

and, by the induction hypothesis,

$$\begin{aligned} (q_{\ell - h}^\prime ,y_{\ell - h},Y_{\ell - h}) \vdash ^*(q_1,\epsilon , X_1 X_2 \cdots X_{m - h}). \end{aligned}$$
(30)

Now, combining (22), (23), (26), (29), and (30) we obtain

$$\begin{aligned} \begin{array}{rll} (q,x,X) = (q,\sigma y,X) &{} \vdash &{} (q_1^{\prime },y,Y_1 Y_2 \cdots Y_\ell ) = (q_1^\prime ,y_1 y_2 \cdots y_{\ell - h},Y_1 Y_2 \cdots Y_\ell )\\ &{} \vdash ^*&{} (q_2^\prime ,y_2 \cdots y_{\ell - h},Y_2 \cdots Y_\ell )\\ &{} \vdots &{}\\ &{} \vdash ^*&{} (q_{\ell - h}^\prime , y_{\ell - h},Y_{\ell - h} \cdots Y_\ell )\\ &{} \vdash ^*&{} (q_1, \epsilon , X_1 X_2 \cdots X_{m - h}Y_{\ell +1- h} \cdots Y_\ell ). \end{array} \end{aligned}$$

Since, by (24), \(Y_{\ell +1- h} \cdots Y_\ell = X_{m +1- h} \cdots X_m\), the proof is complete.

1.2 Proof of Lemma 24

The proof is by induction on the length \(k\) of the computation

$$\begin{aligned} (q,x,X) \vdash ^*(q_1,\epsilon ,X_1 \cdots X_m). \end{aligned}$$

Basis: \(k = 0\). That is,

$$\begin{aligned} (q,x,X) \vdash ^0 (q_1,\epsilon ,X_1 \cdots X_m). \end{aligned}$$

Then \(x = \epsilon \) and \(X_1 X_2 \cdots X_m = X\). Trivially,

$$\begin{aligned}{}[q,X,p] \Rightarrow ^0 [q,X,p]. \end{aligned}$$

Induction Step: Assume that the implication holds for all computations of length at most \(k, k \ge 1\), and let

$$\begin{aligned} (q,x,X) \vdash ^{k+1} (q_1,\epsilon ,X_1 \cdots X_m). \end{aligned}$$

That is,

$$\begin{aligned} (q,x,X) \vdash (q_1^\prime ,y,Y_1 \cdots Y_\ell ) \vdash ^k (q_1,\epsilon ,X_1 \cdots X_m), \end{aligned}$$

where

$$\begin{aligned} x = \sigma y \end{aligned}$$
(31)

for some \(\sigma \in \Sigma \cup \{\epsilon \}\) and

$$\begin{aligned} (q^\prime ,Y_1 \cdots Y_\ell ) \in \delta (q,\sigma ,X). \end{aligned}$$
(32)

Let \(h\) be the maximal number such that in the computation

$$\begin{aligned} (q_1^\prime ,y,Y_1 \cdots Y_\ell ) \vdash ^k (q_1,\epsilon ,X_1 \cdots X_m) \end{aligned}$$

the stack height is never less than \(h\). Then \(Y_{\ell + 2 - h}\) is never exposed as the top symbol, implying

$$\begin{aligned} Y_{\ell + 2 - h} Y_{\ell + 3 - h} \cdots Y_{\ell } = X_{m + 2 - h} X_{m + 3 - h} \cdots X_{m}. \end{aligned}$$
(33)

Thus, there are \(y^\prime ,y^{\prime \prime } \in \Sigma ^*\), \(q^{\prime \prime } \in Q\), and \(Y \in \Gamma \) such that

$$\begin{aligned} y = y^\prime y^{\prime \prime }, \end{aligned}$$
(34)
$$\begin{aligned} (q_1^\prime ,y^\prime ,Y_1 Y_2 \cdots Y_{\ell + 1 -h}) \vdash ^{{\le } \, k} (q^{\prime \prime },\epsilon ,Y) \end{aligned}$$
(35)

and

$$\begin{aligned} (q^{\prime \prime },y^{\prime \prime },Y) \vdash ^{{\le } \, k} (q_1,\epsilon ,X_1 X_2 \cdots X_{m +1 - h}). \end{aligned}$$
(36)

It follows from (35) that there are \(y_1, y_2, \ldots , y_{\ell + 1 - h} \in \Sigma ^*\) and there are,

\(q_1^\prime ,q_2^\prime ,\ldots ,q_{\ell + 1 -h}^{\prime },q\in Q\) such that

$$\begin{aligned} y^\prime =y_1 y_2 \cdots y_{\ell + 1 - h}, \end{aligned}$$
(37)
$$\begin{aligned} (q_j^\prime ,y_j,Y_j) \vdash ^{*} (q_{j+1}^{\prime },\epsilon ,\epsilon ), \ \ \ \ \ j = 1,2,\ldots ,\ell - h \, \end{aligned}$$

and

$$\begin{aligned} (q_{\ell + 1 - h}^\prime ,y_{\ell + 1 - h},Y_{\ell + 1 - h}) \vdash ^{*} (q^{\prime \prime },\epsilon ,Y). \end{aligned}$$

Therefore, by the “if” part of [Equivalence (5.3), p. 117],

$$\begin{aligned}{}[q_j^\prime , Y_j,q_{j+1}^\prime ] \Rightarrow ^*y_j, \ \ \ \ \ j = 1,2,\ldots ,\ell - h, \end{aligned}$$
(38)

and, by the induction hypothesis, for all \(q_{m + 2 - h} \in Q\),

$$\begin{aligned}{}[q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{m + 2 - h}] \Rightarrow ^*y_{\ell + 1 - h}[q^{\prime \prime },Y,q_{m + 2 - h}]. \end{aligned}$$
(39)

Also, by (36) and the induction hypothesis, if \(h \le m,\) or , by the “if” part of [Equivalence (5.3), p.117], if \(h=m+1,\) for all \(q_2,q_3,\dots ,q_{m + 1 - h} \in Q\),

$$\begin{aligned}{}[q^{\prime \prime },Y,q_{m + 2 - h}] \Rightarrow _L^*y^{\prime \prime } [q_1,X_1,q_2] \cdots [q_{m + 1 - h},X_{m + 1 - h},q_{m + 2 - h}]. \end{aligned}$$
(40)

Finally, by the definition of \(G_A\), it follows from (32) that

$$\begin{aligned}&[q,X,p] \rightarrow \sigma [q_1^\prime ,Y_1,q_2^\prime ] \cdots [q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{m + 2 - h}]\nonumber \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},Y_{\ell + 2 - h},q_{m + 3 - h}] \cdots [q_m,Y_\ell ,p] \in P. \end{aligned}$$

Thus, by (33),

$$\begin{aligned}&[q,X,p] \rightarrow \sigma [q_1^\prime ,Y_1,q_2^\prime ] \cdots [q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{m + 2 - h}]\nonumber \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},X_{m + 2 - h},q_{\ell + 3 - h}] \cdots [q_m,X_m,p] \in P \end{aligned}$$

as well, and, combining the latter rule with (38), (39), (40), (37), (34), and (31), we obtain

$$\begin{aligned}{}[q,X,p] \!\!&\Rightarrow \ \sigma [q_1^\prime ,Y_1,q_2^\prime ] [q_2^\prime ,Y_2,q_3^\prime ] \cdots [q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{m + 2 - h}]\nonumber \\&\quad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},X_{m + 2 - h},q_{\ell + 3 - h}] \cdots [q_m,X_m,p]\\&\Rightarrow ^*\sigma y_1 [q_2^\prime ,Y_2,q_3^\prime ] \cdots [q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{m + 2 - h}]\\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},X_{m + 2 - h},q_{\ell + 3 - h}] \cdots [q_m,X_m,p]\\&\ \vdots \\&\Rightarrow ^*\sigma y_1 \cdots y_{\ell - h} [q_{\ell + 1 - h}^\prime ,Y_{\ell + 1 - h},q_{m + 2 - h}]\\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},X_{m + 2 - h},q_{\ell + 3 - h}] \cdots [q_m,X_m,p]\\&\Rightarrow ^*\sigma y_1 \cdots y_{\ell - h} y_{\ell + 1- h} [q^{\prime \prime },Y,q_{m + 2 - h}]\\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},X_{m + 2 - h},q_{\ell + 3 - h}] \cdots [q_m,X_m,p]\\&\Rightarrow ^*\sigma y_1 \cdots y_{\ell - h} y_{\ell + 1 - h} y^{\prime \prime } [q_1,X_1,q_2] \cdots [q_{m + 1 - h},X_{m + 1 - h},q_{\ell + 2 - h}]\\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad [q_{m + 2 - h},X_{m + 2 - h},q_{\ell + 3 - h}] \cdots [q_m,X_m,p]\\&= \ \, \sigma y^\prime y^{\prime \prime } [q_1,X_1,q_2] \cdots [q_m,X_m,p]\\&= \, \sigma y [q_1,X_1,q_2] \cdots [q_m,X_m,p]\\&= \, x [q_1,X_1,q_2] \cdots [q_m,X_m,p].\\ \end{aligned}$$

Rights and permissions

Reprints and permissions

About this article

Cite this article

Aizikowitz, T., Kaminski, M. Conjunctive grammars and alternating pushdown automata. Acta Informatica 50, 175–197 (2013). https://doi.org/10.1007/s00236-013-0177-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-013-0177-3

Keywords

Navigation