Minimal and Reduced Reversible Automata? (Extended Abstract) Giovanna J. Lavado, Giovanni Pighizzini, and Luca Prigioniero Dipartimento di Informatica, Università degli Studi di Milano, Italy {lavado,pighizzini}@di.unimi.it, luca.prigioniero@studenti.unimi.it Abstract. A condition characterizing the class of regular languages which have several nonisomorphic minimal reversible automata is pre- sented. The condition concerns the structure of the minimum automaton accepting the language under consideration. It is also observed that there exist reduced reversible automata which are not minimal, in the sense that all the automata obtained by merging some of their equivalent states are irreversible. Furthermore, it is proved that if the minimum deterministic automaton accepting a reversible language contains a loop in the “irreversible part” then it is always possible to construct infinitely many reduced reversible automata accepting such a language. 1 Introduction A device is said to be reversible when each configuration has exactly one pre- decessor and one successor, thus implying that there is no loss of information during the computation. On the other hand, as observed by Landauer, logical irre- versibility is associated with physical irreversibility and implies a certain amount of heat generation [7]. In order to avoid such a power dissipation and, hence, to reduce the overall power consumption of computational devices, the possibility of realizing reversible machines looks appealing. A lot of work has been done to study reversibility in different computational devices. Just to give a few examples, in the case of general devices as Turing machines Bennet proved that each machine can be simulated by a reversible one [2], while Lange, McKenzie, and Tapp proved that each deterministic machine can be simulated by a reversible machine which uses the same amount of space [8]. As a corollary, in the case of a constant amount of space, this implies that ? Paper presented at the 18th International Conference on Descriptional Complexity of Formal Systems, DCFS 2016. In LNCS 9777, pp. 168-179, 2016. DOI: 10.1007/978- 3-319-41114-9_13 Copyright c by the paper’s authors. Copying permitted for private and academic pur- poses. V. Biló, A. Caruso (Eds.): ICTCS 2016, Proceedings of the 17th Italian Conference on Theoretical Computer Science, 73100 Lecce, Italy, September 7–9 2016, pp. 234–239 published in CEUR Workshop Proceedins Vol-1720 at http://ceur-ws.org/Vol-1720 Minimal and Reduced Reversible Automata 235 each regular language is accepted by a reversible two-way deterministic finite automaton. Actually, this result was already proved by Kondacs and Watrous [4]. However, in the case of one-way automata, the situation is different.1 In fact, as shown by Pin, the regular language a∗ b∗ cannot be accepted by any reversible automaton [10]. So the class of languages accepted by reversible automata is a proper subclass of the class of regular languages. Actually, there are some different notions of reversible automata in literature. In 1982, Angluin intro- duced reversible automata in algorithmic learning theory, considering devices having only one initial and only one final state [1]. On the other hand, the de- vices considered in [10], besides a set of final states, can have multiple initial states, hence they can take a nondeterministic decision at the beginning of the computation. An extension which allows one to consider nondeterministic transi- tions, without changing the class of accepted languages, has been considered by Lombardy [9], introducing and investigating quasi reversible automata. Classical automata, namely automata with a single initial state and a set of final states, have been considered in the works by Holzer, Jakobi, and Kutrib [5,3,6]. In par- ticular, in [3] the authors obtained a characterization of regular languages which are accepted by reversible automata. This characterization is given in terms of the structure of the minimum deterministic automaton. Furthermore, they provide an algorithm that, in the case the language is acceptable by a reversible automaton, allows one to transform the minimum automaton into an equivalent reversible automaton, which in the worst case is exponentially larger than the given minimum automaton. In spite of that, the resulting automaton is minimal, namely there are no reversible automata accepting the same language with a smaller number of states. However, the minimal automaton is not necessarily unique, in fact there could exist different reversible automata with the same number of states accepting the same language. We continue the investigation of minimality in reversible automata and we will refer to the following notions. Let C be the family of reversible automata accepting a given language L and A ∈ C: – The automaton A is reduced in C if every automaton obtained from A by merging some equivalent states does not belong to C. – The automaton A is minimal in C if each automaton in C has at least as many states as A. – The automaton A is the minimum in C if it is the unique (up to isomorphism) minimal automaton in C. Our first result is a condition that characterizes languages having several different minimal reversible automata. This condition is on the structure of the transition graph of the minimum automaton accepting the language under consideration. As a special case, we show that whenever the “irreversible part” of the minimum automaton contains a loop, it is possible to construct at least two different minimal reversible automata. 1 From now on, we will consider only one-way automata. Hence we will omit to specify “one-way” all the times. 236 Giovanna J. Lavado, Giovanni Pighizzini, and Luca Prigioniero We also observe that there exist reversible automata that are reduced, but not minimal. Investigating this phenomenon in detail, we were able to find a language for which there exist arbitrarily large, and hence infinitely many, reduced reversible automata. Furthermore, we obtained a general construction that allows to obtain arbitrarily large reversible automata for each language accepted by a minimum deterministic automaton satisfying the structural condition given in [3] and such that the “irreversible part” contains a loop. We know that this is also possible in other situations, namely that our condition is not necessary. Now we introduce a few preliminary notations and notions. A deterministic automaton (d f a) is a tuple A = (Q, Σ, δ, qI , F ) with the usual meaning. We allow the transition function δ to be partial and througthout the paper, we assume that all states are useful, namely they are used to accept some word. This implies that a d f a does not contain any dead state. We denote by δ R the reverse transition function that associates with each state r ∈ Q and letter a ∈ Σ the set of states from which r can be reached by reading a, i.e., δ R (r, a) = {q ∈ Q | δ(q, a) = r}. A state r is said to be irreversible when there are at least two transitions on the same letter entering r, i.e., #δ R (r, a) ≥ 2, otherwise r is reversible. A d f a is said to be reversible (r e v - d f a) when each state is reversible. A language is reversible when there exists a r e v - d f a accepting it. A d f a A can be split in two parts: the reversible part and the irreversible part. Roughly speaking, the irreversible part consists of all states that can be reached with a path which starts in an irreversible state, and of all transitions connecting those states. The reversible part consists of the remaining states and transitions, namely the states that can be reached from the initial state by visiting only reversible states, and their outgoing transitions. The above mentioned algorithm [3] for converting a minimum irreversible d f a A into an equivalent minimal r e v - d f a A0 , if possible, keeps the same reversible part of A and creates some copies of states and transitions in the irreversible part. However, different equivalent minimal r e v - d f as might exist. (See Figure 1). 2 Minimal Reversible Automata In this section we present a characterization of the languages having several differ- ent minimal reversible automata. From now on, let us fix a reversible language L and the minimum d f a M = (Q, Σ, δ, qI , F ) accepting it. Theorem 1. The following statements are equivalent: 1. There exists a state q ∈ Q in the irreversible part such that δ R (q, a) 6= ∅, δ R (q, b) 6= ∅, for two symbols a, b ∈ Σ, with a 6= b. 2. There exist at least two minimal nonisomorphic r e v - d f as accepting L. As a consequence of Theorem 1 we have the following characterization of reversible languages having a unique minimal (hence a minimum) r e v - d f a: Minimal and Reduced Reversible Automata 237 a a a qI p qI p qI p a a a b b b b b b a q q0 q 00 q0 q 00 a a a a Fig. 1. A minimum d f a accepting the language L = (aa)∗ + a∗ ba∗ , with two minimal nonisomorphic r e v - d f as. In the d f a on the left the reversible part consists of the states qI and p, while the irreversible one of the state q. The r e v - d f a in the center is obtained by the algorithm in [3]. Corollary 2. There exists a unique (up to isomorphism) minimal r e v - d f a accepting L if and only if for each state p ∈ Q in the irreversible part, all the transitions entering in p are on the same symbol. We proved that when the minimum d f a accepting a reversible language contains a loop in the irreversible part the condition in Corollary 2 is always false, hence there exist at least two minimal nonisomorphic r e v - d f as. As a consequence, considering Corollary 2, we can observe that when a reversible language has a unique minimal r e v - d f a, all the loops in the minimum d f a accepting it should be in the reversible part. However, the converse does not hold, namely there are languages whose minimum d f a does not contain any loop in the irreversible part, which does not have a unique minimal r e v - d f a. Indeed, in [3] an example with a finite language is presented. 3 Reduced Reversible Automata In this section, we consider reduced r e v - d f as. There exist r e v - d f as which are reduced but not minimal. Furthermore, there exist reversible languages having arbitrarly large reduced r e v - d f as and, hence, infinitely many reduced r e v - d f as. In Figure 2 a reduced r e v - d f a equivalent to the d f as in Figure 1 is depicted. If we try to merge two states in the loop, then the loop collapses to a single state, so producing the minimum d f a, which is irreversible. Actually, this example can be modified by using a loop of N states: if (and only if) N is prime, we get a reduced automaton. This is a special case of the construction we obtained to prove the following: Theorem 3. If M contains a state q in the irreversible part such that the lan- guage accepted by computations starting from q is infinite, then there exist in- finitely many nonisomorphic reduced r e v - d f as accepting L. 238 Giovanna J. Lavado, Giovanni Pighizzini, and Luca Prigioniero a qI p a b b a q0 q1 a a q4 q2 q3 a a Fig. 2. A reduced r e v - d f a equivalent to d f as in Figure 1. The condition in Theorem 3 is not necessary. In fact, we found an example where the minimum d f a does not contain any loop in the irreversible part, but it is possible to construct infinitely many equivalent reduced r e v - d f as. References 1. Angluin, D.: Inference of reversible languages. J. ACM 29(3), 741–765 (1982) 2. Bennett, C.: Logical reversibility of computation. IBM Journal of Research and Development 17(6), 525–532 (1973) 3. Holzer, M., Jakobi, S., Kutrib, M.: Minimal reversible deterministic finite automata. In: Potapov, I. (ed.) Developments in Language Theory - 19th International Con- ference, DLT 2015, Liverpool, UK, July 27-30, 2015, Proceedings. Lecture Notes in Computer Science, vol. 9168, pp. 276–287. Springer (2015) 4. Kondacs, A., Watrous, J.: On the power of quantum finite state automata. In: FOCS. pp. 66–75. IEEE Computer Society (1997) 5. Kutrib, M.: Aspects of reversibility for classical automata. In: Calude, C.S., Freivalds, R., Kazuo, I. (eds.) Computing with New Resources - Essays Dedicated to Jozef Gruska on the Occasion of His 80th Birthday. Lecture Notes in Computer Science, vol. 8808, pp. 83–98. Springer (2014) 6. Kutrib, M.: Reversible and irreversible computations of deterministic finite-state devices. In: Italiano, G.F., Pighizzini, G., Sannella, D. (eds.) Mathematical Foun- dations of Computer Science 2015 - 40th International Symposium, MFCS 2015, Milan, Italy, August 24-28, 2015, Proceedings, Part I. Lecture Notes in Computer Science, vol. 9234, pp. 38–52. Springer (2015) 7. Landauer, R.: Irreversibility and heat generation in the computing process. IBM Journal of Research and Development 5(3), 183–191 (1961) 8. Lange, K., McKenzie, P., Tapp, A.: Reversible space equals deterministic space. J. Comput. Syst. Sci. 60(2), 354–367 (2000) 9. Lombardy, S.: On the construction of reversible automata for reversible languages. In: Widmayer, P., Ruiz, F.T., Bueno, R.M., Hennessy, M., Eidenbenz, S., Conejo, Minimal and Reduced Reversible Automata 239 R. (eds.) Automata, Languages and Programming, 29th International Colloquium, ICALP 2002, Malaga, Spain, July 8-13, 2002, Proceedings. Lecture Notes in Com- puter Science, vol. 2380, pp. 170–182. Springer (2002) 10. Pin, J.: On reversible automata. In: Simon, I. (ed.) LATIN ’92, 1st Latin Amer- ican Symposium on Theoretical Informatics, São Paulo, Brazil, April 6-10, 1992, Proceedings. Lecture Notes in Computer Science, vol. 583, pp. 401–416. Springer (1992)