Abstract
We consider the problem of converting a two-way alternating finite automaton (2AFA) with n states to a 2AFA accepting the complement of its language. Complementing is trivial for halting 2AFAs, by swapping the roles of existential and universal decisions and the roles of accepting and rejecting states. However, since 2AFAs do not have resources to detect infinite loops by counting executed steps, it was not known whether the cost of complementing is polynomial in n in the general case. Here we shall show that 2AFAs can be complemented by using \(O(n^7)\) states.














Similar content being viewed by others
Notes
Throughout the paper, m denotes the length of the input and n the number of states.
Sometimes, we call this tree “standard”, since other trees induced by the same configuration graph will also be used later.
This means that \({\mathsf {A}}\) must be in an accepting state when it halts; the position of the input head at this moment is not relevant; such configuration has no sons; and the entire subtree degenerates into a single node.
Both \(\langle {}d,r{}\rangle \in D{\times }Q\) and \(dr\in D{\cdot }Q\) represent an ordered pair satisfying \(d\in D\) and \(r\in Q\). We introduce a superfluous binary operator in order not to complicate notation more than necessary.
The chronological order in which \(\kappa _{\scriptscriptstyle {j_{\pi }}},\ldots ,\kappa _{\scriptscriptstyle {j_1}}\) are determined as accepting does not correspond to the order in which \({\mathsf {A}}'\) traverses from these configurations to \(\kappa \). For example, in Fig. 1, the configuration \(\langle {}q_{\scriptscriptstyle {0}},3{}\rangle \) is determined as accepting earlier than \(\langle {}q_{\scriptscriptstyle {0}},5{}\rangle \), but \(\langle {}q_{\scriptscriptstyle {1}},4{}\rangle \) is visited from \(\langle {}q_{\scriptscriptstyle {0}},5{}\rangle \) earlier than from \(\langle {}q_{\scriptscriptstyle {0}},3{}\rangle \).
It should be pointed out that \(\kappa \) can also be visited in the mode “\(\mathsf {{}from}\_{\mathsf {succ}}\)” by traversals from configurations that are not its valid sons. However, by (a.1), such visits do not modify the read–write contents in the cell.
References
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Boston, MA (1976)
Berman, L., Chang, J.H., Ibarra, O.H., Ravikumar, B.: Some observations concerning alternating turing machines using small space. Inf. Process. Lett. 25, 1–9 (1987). (Corr. ibid., 27, p. 53, 1988.)
Birget, J.-C.: Partial orders on words, minimal elements of regular languages, and state complexity. Theor. Comput. Sci. 119, 267–91 (1993)
Bovet, D.P., Crescenzi, P.: Introduction to the Theory of Complexity. Prentice Hall, Upper Saddle River, NJ (1994)
Brassard, G., Bratley, P.: Fundamentals of Algorithmics. Prentice Hall, Upper Saddle River, NJ (1996)
Chandra, A.K., Kozen, D.C., Stockmeyer, L.J.: Alternation. J. Assoc. Comput. Mach. 28, 114–33 (1981)
Geffert, V.: A speed-up theorem without tape compression. Theor. Comput. Sci. 118, 49–65 (1993)
Geffert, V.: An alternating hierarchy for finite automata. Theor. Comput. Sci. 445, 1–24 (2012)
Geffert, V.: Complement for two-way alternating automata. In: Proceedings on Computer Science Theory and Applications in Russia, Lecture Notes in Computer Science, vol. 10846, pp. 132–44. Springer (2018)
Geffert, V., Mereghetti, C., Pighizzini, G.: Complementing two-way finite automata. Inf. Comput. 205, 1173–87 (2007)
Geffert, V., Okhotin, A.: Transforming two-way alternating finite automata to one-way nondeterministic automata. In: Proceedings on Mathematical Foundations of Computer Science Part I, Lecture Notes in Computer Science, vol. 8634, pp. 291–302. Springer (2014)
Hopcroft, J., Motwani, R., Ullman, J.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, Boston, MA (2001)
Immerman, N.: Nondeterministic space is closed under complementation. SIAM J. Comput. 17, 935–38 (1988)
Kapoutsis, Ch.A.: Size complexity of two-way finite automata. In: Proceedings on Developments in Language Theory, Lecture Notes in Computer Science, vol. 5583, pp. 47–66. Springer (2009)
Kapoutsis, Ch.A.: Minicomplexity. J. Autom. Lang. Combin. 17, 205–24 (2012)
Kunc, M., Okhotin, A.: Reversibility of computations in graph-walking automata. In: Proceedings on Mathematical Foundations of Computer Science, Lecture Notes in Computer Science, vol. 8087, pp. 595–606. Springer (2013)
Ladner, R.E., Lipton, R.J., Stockmeyer, L.J.: Alternating pushdown and stack automata. SIAM J. Comput. 13, 135–55 (1984)
Liśkiewicz, M., Reischuk, R.: Computing with sublogarithmic space. In: Hemaspaandra, L., Selman, A. (eds.) Complexity Theory Retrospective II. Springer, Berlin (1997)
Papadimitriou, Ch.H.: Computational Complexity. Addison-Wesley, Boston, MA (1994)
Sakoda, W., Sipser, M.: Nondeterminism and the size of two-way finite automata. In: Proceedings on ACM Symposium Theory of Computing, pp. 275–86 (1978)
Sipser, M.: Halting space bounded computations. Theor. Comput. Sci. 10, 335–38 (1980)
Sipser, M.: Introduction to the Theory of Computation, 2nd edn. Thomson Course Technology, Boston, MA (2006)
Szelepcsényi, R.: The method of forced enumeration for nondeterministic automata. Acta Inform. 26, 279–84 (1988)
Szepietowski, A.: Turing Machines with Sublogarithmic Space. Lecture Notes in Computer Science, vol. 843. Springer, Berlin (1994)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supported by the Slovak Grant Agency for Science (VEGA) under contract 1/0056/18 “Descriptional and Computational Complexity of Automata and Algorithms” and by the Slovak Research and Development Agency under Contract APVV-15-0091 “Efficient Algorithms, Automata, and Data Structures”.
Rights and permissions
About this article
Cite this article
Geffert, V., Kapoutsis, C.A. & Zakzok, M. Complement for two-way alternating automata. Acta Informatica 58, 463–495 (2021). https://doi.org/10.1007/s00236-020-00373-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-020-00373-8