ALGEBRAIC AND STRUCTURAL AUTOMATA THEORY
ANNALS OF DISCRETE MATHEMATICS
44
General Editor: Peter L. HAMMER Rutgers University, New Brunswick, NJ, U.S.A
Advisory Editors: C. BERGE, Universite de Paris, France R.L. GRAHAM, AT&T Bell Laboratories, NJ, U.S.A. M.A. HARRISON, University of California, Berkeley, CA, U.S.A. V. KLEE, University of Washington, Seattle, WA, U.S.A. J.H. VAN LINT California Institute of Technology, Pasadena, CA, U.S.A. G.C. ROTA, Massachusetts Institute of Technology, Cambridge, M.A., U.S.A. T: TROTTER, Arizona State University, Tempe, AZ, U.S.A.
NORTH-HOLLAND -AMSTERDAM 0 NEW YORK
0
OXFORD
0
TOKYO
ALGEBRAIC AND STRUCTURAL AUTOMATA THEORY
L. BEYGA T. GAJEWSKI Z. MlADOWlCZ P. SIWAK J. STOKLOSA
J. BERGANDY B. MIKOLAJCZAK Computer and Information ScienceDepartment Southeastern Massachusetts University North Dartmouth, MA, U.S.A.
Computer Science Center Technical University of Poznan Poznan, Poland
Edited by
Boleslaw MIKOLAJCZAK
1991 NORTH-HOLLAND -AMSTERDAM
NEW YORK
OXFORD
TOKYO
Published by:
ELSEVIER SCIENCE PUBLISHERS B.V P.O. Box 103 1000 AC Amsterdam The Netherlands Sole distributors for the U S A and Canada
ELSEVIER SCIENCE PUBLISHING COMPANY, INC 655 Avenue of the Americas New York, N Y 10010 USA This volume is a translation of Algebraiczna i Strukturalna Teoria Automatow Copyright by PWN - Panstwowe Wydawnictwo Naukowe, Warszawa, 1985
L i b r a r y o f C o n g r e s s Cataloging-in-Publication
Data
Algeb-aiczna i strukturalna teoria automatow. English Algebraic and structural automata theory / edired by Boleslaw Mikolajczak. p. c m . -- ( A n n a l s o f d i s c r e t e m a t h e m a t i c s 441 T-anslation o f Algebraiczna i strukturalna teoria automatow. Bibliography p I n c l u d e s index ISBN 0-444-87458-5 : MikoYaJczak. Boleslaw. 1. S e q u e n t i a l m a c h i n e t h e o r y i i T i t l e . 111. S e r i e s . Q A 2 6 7 . 5 S 4 A 5 4 1 3 .1991 511 3 - - d c 2 0 89-93c3
.
CIP
ISBN: 0 444 87458 5 Elsevier Science Publishers B.V., 199 1 All rights reserved. No part of this publication may be reproduced, stored in a retrievals ystem or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publisher, Elsevier Science Publishers B.V. (Physical Sciences and Engineering Division), l?O. Box 103, 1000 AC Amsterdam, The Netherlands. Special regulations for readers in the U.S.A.- This publication has been registered with the Copyright Clearance Center lnc. (CCC), Salem, Massachusetts. Information can be obtained from the CCC about conditions under which photocopies of parts of this publication may be made in the U.S.A. All other copyright questions, including photocopying outside of the U.S.A., should be referred to the publisher.
No responsibility is assumed by the Publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein.
PRINTED IN THE NETHERLANDS
Introduction
The subject of research in automata theory is a design of mathematical models describing methods of information transformation in digital systems. Automata theory is especially concerned with abstract models of systems working by means of discrete signals, known as digital signals. Special emphasis has been put on digital computers, digital systems of control for technological processes, and digital systems of data transmission. On the other hand, automata theory as one of the branches of general system theory, gives tools needed for formulation and solution of general problems, which can be applied for solving known problems, and also for solving problems in the future. Automata theory is in fact a part of computability theory which covers problems of computer systems, software, activity of nervous systems (neural networks), and processes of live organisms development. Automaton, in particular a finite automaton, is an abstract mathematical concept, a computability model or a model of some process. In the research in automata theory one uses general algebra and graph theory. Some algebraic concepts have their origin in computer systems. These concepts in their formal fonns are analyzed and transformed to new forms more convenient for optimization. Finally, during synthesis process, abstract concepts are converted to digital schema, or a flow diagram to be implemented in software. This denotes that automata theory teaches how conceptually and computationally one can consider problems in computer science growing up with respect to magnitude and complexity. Simultaneously, automata theory underlines elements of creativity, because thinking process is of heuristic nature in this branch of computer science. The development of automata theory in sixties and seventies has been stimulated by two complementary tendencies: i) design of models closely related to existing hardware and software ii) definition of appropriate mathematical tools (mathematical languages) by means of which one can describe computational processes. During this period there was a tremendous increase in the use of digital computers in different branches of manufacturing, as well as in research on
vi
Introduction
utilization methods, analysis and synthesis of digital systems to control technological processes taking into account the scale of integration and functional complexity of digital blocks. Historically, automata theory is a branch of computer science strongly related to mathematical linguistics, discrete mathematics, and engineering of digital systems. This relationship results from the nature of the automaton concept; i.e. automaton can be understood as the acceptor of languages, abstract algebra, oriented graph, digital signal transducer, and mathematical model of digital systems. These facts indicate the interdisciplinary character of automata theory, and also its cognitive value with respect to modeling of technical processes. In the fifties and the first half of sixties the major emphasis in automata theory was placed on problems related to mathematical linguistics. In the second half of the sixties and seventies the focus was moved to structural automata theory, and also this part of algebraic automata theory concerned with problems of automata analysis and synthesis. In seventies automata theory is strongly influenced by computational analysis. The concept of time-varying automata is developed as a convenient mathematical model for many computational and technological processes. Significant is the influence of automata theory on the development of foundations of the digital technology, design and utilization of computer hardware, expressed in formulation of many new designing methods implanted into engineer’s practice and into academic cumcula. This book presents these methods according to their significance taking into consideration especially the last decade of research in structural automata theory, and in time-varying automata. The main goal of this book is a monographic presentation of principal results of research conducted by the Group in Automata Theory and Computability, at Technical University of Poznan, Poland, obtained in seventies and in the first half of eighties. The work of the Group concentrated on problems of algebraic and structural automata theory, such as: - computation of functions preserving operations of finite automata with state
-
-
transformations and state-input transformations talung into account the complexity aspect, research on time-varying automata, research on various types of automata transformations with special emphasis on periodic transformations, investigations of aufomata realizability, especially realizability in cellular networks, research on shift registers defined on the field of real numbers,
Introduction
Vii
- investigations of local properties of automata, especially input subautomata associated with the change of operating time, investigations of relationships between semigroups and automata, - investigations of cellular networks properties, - investigations of nondeterministic automata, - investigations of congruence lattices for different classes of automata, - investigations of syntactic properties of sequences.
-
The above-mentioned problems lay in the main stream of automata theory and belong to the following main areas of this discipline: automata morphisms, timevarying automata, automata realizations, and relationships between automata and semigroups. It should be emphasised that problems of morphisms and automata realization are of major importance for technical applications. Authors undertook a difficult task to select and present their own results in the context of results obtained by other research groups, and give this book a form acceptable for a graduate level text. From amongst over one hundred papers written by members of the Group, the Authors selected and presented in this monograph the following problems: functions preserving operations, time-varying automata and their transformations, automata realizations, linear automata, input subautomata, cellular networks. The monograph is composed of eleven chapters, comprehensive list of references, name and notation indices, and vocabulary of important concepts. We assume that the reader is familiar with basic concepts of algebra and graph theory. Therefore chapter 0 should be treated as an overview of concepts and notations used in the monograph. It contains definitions and notations of fundamental mathematical concepts from set theory, graph theory, abstract algebra and selected algebraic systems. The book uses a formal algebraic approach to problems of analysis and synthesis with occasional discussion of practical significance of achieved results. The monograph presents transducer’s approach to finite automata with terminology (concepts and notations) typical and commonly used in this area of computer science. Chapter 0 contains definitions of basic mathematical conepts and notations used in the book. The goal of this chapter is to provide a review of mathematical preliminaries at a glance. The definitions refer to logic, set theory, algebra and graph theory. In Chapter 1 the notions of formal grammars and formal languages are introduced. The tape automaton is defined and classification of tape automata is presented. Turing machine, linear bounded automaton, pushdown automaton and
... Vlll
Introduction
two-way acceptor are investigated. Definitions concerning computational complexity and classification of problems are given. Chapter 2 is an introduction to algebraic and structural automata theory. The chapter provides an in-depth exploration of such fundamental concepts as determinism, nondeterminism, completeness and incompleteness. The following notions are introduced and thoroughly studied: functions preserving operations of automata, the direct sum and the direct product of automata, semigroups, characteristic monoid, subautomata and connectivity of automata. The equivalence of Mealy’s and Moore’s models for both complete and incomplete automata is discussed. The last part of this chapter focuses on the relationship between finite automata and regular languages. A complete characterization of regular languages is presented. In Chapter 3 the problems of minimization of finite automata are described. For complete automata two algorithms of quadratic and O(n log n) time complexity are presented. For incomplete automata the IW-completeness of this problem is proved. The chapter also addresses the problems of equivalence of deterministic and nondeterministic automata.
Chapter 4 deals with the input subautomata whose input alphabet is a subset of the free semigroup of a given automaton. The class of input subautomata contains the multichannel automata and the subautomata associated with the change of operating time. The input subautomata are defined for complete deterministic finite automata. In the chapter algorithms for constructing multichannel analogs of automata and ordinary analogs of multichannel automata are presented. Particular results of the chapter refer to the equivalence and similarity of states in input subautomata and to the equivalence of input subautomata. Some structural properties of input subautomata (like connectivity, retrievability and controllability) are also studied. Chapter 5 examines some fundamental properties of functions preserving operations of automata. The problems of representing and simulating a set of automata by a single automaton are formulated and investigated in detail. Algorithms for computing state homomorphisms and generalized homomorphisms are provided. The time complexity of these algorithms is also evaluated. In Chapter 6 some formal notions of realization are recalled and compared. Then, the definition of the structure of realization is introduced and discussed together with the classical description of information flow in the realizing automaton. The state assignment problem is considered for the binary and m-ary cases and its relations to complexity of the structure of realization is demonstrated. At the end the idea of determining the minimum of preceding information for an abitrarily chosen component automaton is given.
Introduction
ix
In Chapter 7 the realizability problem of automata is considered. First, loopfree parallel and serial realizations are recalled. Then the realizability with the help of shift register is analyzed. Certain generalization of SP partition is introduced together with the formal definition of the realizing net with asynchronously cooperating component automata. The method for realizing such net is given. Then a regular structure for the realizing net is considered in the context of the Garden-of-Eden problem. The problem is shown to be reducible to the path problems on some directed graphs. At the end the existence of minimum amount of feedback in any homomorphic realization is mentioned. Chapter 8 is devoted to the study of time-varying automata. The concept of a time varying automaton is defined as a generalization of an ordinary automaton. Consequently, many notions and problems introduced in the preceding chapters are restated here in more general form. The chapter addresses two main subjects: properties of various types of time-varying automata, and relations between timevarying and ordinary automata. Both structural and algebraic approaches to timevarying automata are considered. Special emphasis is given to the class of periodic automata which have a wide range of practical applications. The problem of constructing a periodic representation for an ordinary automaton is thoroughly studied, and appropriate algorithms are provided.
In Chapter 9 the concept of transformation of automaton is introduced. In technical sense, the operation of transformation is equivalent to the operation of adding combinatorid transducer at the input or at the output of the automaton. This enables simulation of a set of automata by a single automaton. The chapter presents an in-depth coverage of various problems related to transformations of automata. Chapter 10 covers a broad spectrum of problems related to periodic sums of automata. The relationship between periodic sums, periodic extensions and input subautomata is studied. Some structural properties of the periodic sums of automata are investigated. Emphasis is placed on the problems of connectivity, controllability, state independence and invariance. Algebraic properties of the periodic sums are also discussed. The concept of the state periodic sum of automata is introduced and carefully analyzed. Chapter 11 deals with linear automata. The theorem on realizability of finite automata with the help of linear automaton defiied over the field of characteristic 0 is proved. The sufficient condition for a finite automaton to have the linear realization over a field of characteristic p (p is prime) is also proved. Linear shift registers defined over the field of real numbers and generating cyclic sequences are investigated. The results deal with decompositions and periodic representations of finite automata approximating cyclic sequences generated by finite and infinite linear shift registers.
Introduction
X
For reader’s convenience Fig.1 shows the diagram of chapters’ dependencies. Additionally at the end of the book the indices of notions, concepts, and notations have been provided. The book is addressed to scientists and professionals working in various fields of computer science and discrete mathematics. Parts of the book (especially chapters 1-7) can be used in graduate courses in computer science, electronics, telecommunication, and control engineering.
c
Fig.1. Diagram of chapter dependency
Introduction
xi
This monograph has been prepared by members of the Poznan Group in Automata Theory and Computability at the Technical University of Poznan, Poland, and contains the results of over ten years of research. Up to the 1980 Professor Grzymala-Busse was the Chairman of this Group, and many results presented here came out of his inspiration. Results presented in this monograph have been achieved in cooperation with the Institute of Foundations of Computer Science, Polish Academy of Sciences, and have been partially sponsored in 197276 under the grant 06.1.1 “Development of mathematical methods and their applications, especially for numerical methods, theory of algorithms, probability theory, and mathematical statistics”, and additionally in years 197682 under the grant M R 1.3 “Mathematical foundations of computer science”, and also in cooperation with the Institute of Foundations of Computer Science, Polish Academy of Sciences. Results presented in the book have been achieved and conducted in cooperation with many scientists and institutions, and especially in cooperation of East-European countries, agreement 25.1.1 “Development of automata theory and its applications to the design of digital systems”, in bilateral cooperation with Technical University in Dresden, Frederic Schiller University in Jena, The Kansas State University in Lawrence, and Cornell University in Ithaca. The Authors would like to express their acknowledgments to all these institutions and especially to Professors Zamir Bavel, Juris Hartmanis, John Hopcroft, Joachim Metz, Wolfgang Wechler, and Gerd Wechsung. This book could not be edited without the help and encouragement of different persons and institutions. The Authors would like to express their acknowledgments especially to Professor Grzymala-Busse for his inspiration, and many years of leadership of our Group. Special words of acknowledgments are addressed to Professors Zdzislaw Pawlak, Antoni Mazurkiewicz, Andrzej Blikle, and Jozef Winkowski from the Institute of Foundations of Computer Science, Polish Academy of Sciences in Warsaw for establishing the direction of this research. We express also our deep thanks to the reviewer for his careful reading of the book and comments. Special acknowledgments we express to our families for their patience and support in the time of writing this monograph. Authors
This Page Intentionally Left Blank
Preface
This monograph is the English Translation of the Polish Edition by the Polish Scientific Publishers, 1985. The translation and camera-ready form of the text has been completely prepared by the Authors partially in Poland and partially in the USA. The final version of the book has been prepared by the Editor using personal computer COMPAQ 386 with wordprocessor MICROSOFT 3.0 from Microsoft Corporation. The Authors and the Editor would like to express their thanks to the Computer and Information Science Department, Southeastern Massachusetts University for making available all necessary computer facilities allowing preparation of the camera-ready form of this monograph.
This Page Intentionally Left Blank
Zeno from Elea - mathematician - calculated that our world is unique and steady under the Sun. He figured out this in such a manner that he cut first the Sun into pieces, then these pieces cut into even smaller ones to this extent that they were not radiant in his palms anymore. Frightened Zen0 rubbed his eyes in panic and then he put all the particles back together again, and they all inflamed into an indivisible Sun. H.Poswiatowska, Extractions from History of Philosophy
This Page Intentionally Left Blank
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
V
0 Basic mathematical concepts
...............................
1
1 Automata and languages (by Janusz Stoklosa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
(by Tadeusz Gajewski)
.
1.1. Languages and grammars generating them . . . . . . . . . . . . . . . . 1.1.1. Natural languages . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2. Language and formal grammar . . . . . . . . . . . . . . . . . . 1.2. Tape automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1. Definition and classification . . . . . . . . . . . . . . . . . . . . . 1.2.2. Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3. Algorithms and their computational complexity . . . . . . . . 1.2.4. Linear bounded automata . . . . . . . . . . . . . . . . . . . . . 1.2.5. Pushdown automata. . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.6. Two-way acceptor . . . . . . . . . . . . . . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
2 Finite automata (by Lech Beyga) 2.1.
2.2.
...................................
Definitions of automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1. Deterministic automata . . . . . . . . . . . . . . . . . . . . . . . 2.1.2. Nondeterministic automata . . . . . . . . . . . . . . . . . . . . . 2.1.3. Comparison of Moore and Mealy types models . . . . . . . Automata without outputs . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1. Functions preserving operations . . . . . . . . . . . . . . . . . . 2.2.2. Partitions and covers with the substitution property . . . . . 2.2.3. Sets of generators . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4. Subautomata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5. The direct sum and the direct product of automata . . . . .
7 7 9 15 15 18 23 25 27 31 33 34
35 35 35 40 41 46 47 49 52 53 54
xviii
Contents
2.2.6. Connectedness of automata . . . . . . . . . . . . . . . . . . . . 2.2.7. Autonomous automata . . . . . . . . . . . . . . . . . . . . . . . 2.2.8, The characteristic semigroup of an automaton . . . . . . . . 2.2.9. Selected classes of automata . . . . . . . . . . . . . . . . . . . 2.2.10. Pair-type notation of automata . . . . . . . . . . . . . . . . . . 2.3. Acceptors of regular languages . . . . . . . . . . . . . . . . . . . . . . . 2.3.1. Rabin-Scott automata . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2. Synthesis and analysis of Rabin-Scott automata . . . . . . . 2.3.3. Two-way automata . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.4. Decidability of regular languages . . . . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
54
57 58 62 63 64 64 68 72 78 81 82
3 Minimization of automata
(by Boleslaw Mikolajczak)
............................
83
3.1. Equivalence of automata . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3.2. Minimization of deterministic complete automata . . . . . . . . . . . 85 3.2.1. Classical algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 85 3.2.2. Hopcroft's algorithm . . . . . . . . . . . . . . . . . . . . . . . . 91 3.2.3. Computational complexity of complete deterministic automaton minimization problem . . . . . . . . . . . . . . . . . 94 3.3. Minimization of deterministic incomplete automata . . . . . . . . . . 102 3.3.1. Minimization algorithm . . . . . . . . . . . . . . . . . . . . . . . 102 3.3.2. Computational complexity of minimization of incomplete automata . . . . . . . . . . . . . . . . . . . . . . . . . 111 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
.
4 Input subautomata
(by Jan Bergandy and Zdzislaw Miadowicz) . . . . . . . . . . . . . . . . 119
4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2. Equivalence of states and equivalence of 'automata . . . . . . . . . . 4.3. Connectedness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4. Other properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
119 125 128 146 150 153
xix
Contents
.
5 Automata homomorphisms (by Boleslaw Mikolajczak)
............................
State homomorphisms of automata . . . . . . . . . . . . . . . . . . . . . 5.1.1. Properties of state homomorphisms . . . . . . . . . . . . . . . 5.1.2. Computation of state homomorphisms of automata . . . . . 5.1.3. Automata representation problems . . . . . . . . . . . . . . . . 5.2. Generalized homomorphisms of automata . . . . . . . . . . . . . . . . 5.2.1. hoperties of generalized homomorphisms . . . . . . . . . . . 5.2.2. Computation of generalized automata homomorphisms . . . 5.2.3. Automata set simulation problems . . . . . . . . . . . . . . . . 5.3. Comparison of automata properties with respect to functions preserving operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4. Complexity of computing generalized automata homomorphisms . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.
.
155 155 155 163 171 173 173 181 186 189 191 194 195
.
6 Realizations of automata State assignment (by Pawel Siwak) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1. The concepts of realizations . . . . . . . . . . . . . . . . . . . . . . . . . 6.2. Structure of realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3. Partition pairs and information flow in automata . . . . . . . . . . . . 6.3.1. Mm partition pairs of an automaton . . . . . . . . . . . . . . . 6.3.2. The flow of information in an automaton . . . . . . . . . . . 6.4. Binary state assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1. The binary coding with delay elements . . . . . . . . . . . . . 6.4.2. Determining the state assignment which minimizes the structure complexity . . . . . . . . . . . . . . . . . . . . . . . 6.4.3. Binary state assignment with arbitrary components . . . . . 6.5. m-ary assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6. Minimal control information for a component . . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
197 197 203 207 208 212 213 214 215 220 223 226 227 228
.
7 Realizations of automata Structures of nets (by Pawel Siwak) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1. 7.2. 7.3. 7.4. 7.5.
Loop-free realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Serial and parallel decompositions of automata . . . . . . . . . . . . . Realization with a shift register . . . . . . . . . . . . . . . . . . . . . . Asynchronous cooperation of components . . . . . . . . . . . . . . . . Problem of a predecessor in cellular structure . . . . . . . . . . . . .
229 230 236 240 246 257
xx
Contents
7.6. Realizations with the minimal amount of feedback . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
265 267 268
.
8 Time-varying automata (by Tadeusz Gajewski) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.1. Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2. Equivalence of time-varying automata . . . . . . . . . . . . . . . . . . 8.3. Languages accepted by time-varying automata . . . . . . . . . . . . . 8.4. Periodic automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5. Automorphisms of periodlc automata . . . . . . . . . . . . . . . . . . . 8.6. Periodic representations of automata . . . . . . . . . . . . . . . . . . . . 8.7. Extended periodic representations of automata . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
9 Transforms and extensions of automata (by Lech Beyga) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.1. Transforms of automata . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1.1. Basic properties of transforms . . . . . . . . . . . . . . . . . . 9.1.2. Transforms of controllable permutation automata . . . . . . . 9.1.3. Transforms of automata with a total input subautomaton . . 9.2. Extensions of automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
269 269 272 276 281 287 291 293 298 298
301 302 302 305 309 312 317
.
10 Periodic sums of automata (by Zdzislaw Miadowicz) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2. Connections of the periodic sum with the periodic extension and with input subautomata . . . . . . . . . . . . . . . . . . . . . . . . . 10.3. Structural properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3.1. Strong connectedness, reuievability. controllability . . . . . . 10.3.2. Operation preserving functions . . . . . . . . . . . . . . . . . . 10.4. Periodic sums with input mappings . . . . . . . . . . . . . . . . . . . . Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
319 319 321 329 329 337 341 345 346
xxi
Contents
.
11 Linear automata (by Janusz Stoklosa)
................................
11.1. Introducing remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2. Linear realizations of finite automata . . . . . . . . . . . . . . . . . . . 11.3. Linear shift registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliographic note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bibliography Index
..................................
347 347 352 358 366 369
. . . . . 371
............................................
387
This Page Intentionally Left Blank
0. Basic mathematical concepts
This chapter provides a survey of basic mathematical concepts to be used throughout this book. We present some fundamental definitions and properties, and explain the adopted notation and terminology. A systematic exposition of this subject can be found in Rasiowa [l]. We shall use the following basic notation: the negation of p the conjunction of p and q the disjunction of p and q the implication of p and q the equivalence of p and q the universal quantifier the existential quantifier the set of elements sl, ..., s,, the set of all s such that W[s) s is an element of S the cardinality of S the empty set the union of S and T the intersection of S and T the difference of S and T S is a subset of T S is a propex subset of T the Cartesian product of S and T the n-th Cartesian product of S the power set of S the set P,(S)\0 the union of sets Si the intersection of sets Si the set (1, 2. ...) the set (0, 1, ...) the field of integers modulo p the field of rational numbers the field of real numbers a is congruent to b modulo n
2 a(mod n) g.c.d.(a,, ..., a,) g.c.d.(S) 1.c.m. [a,, ..., a,) l.c.m.(S) max[a,, ..., a,) m=(S> min(a,, ..., a,) min(S) LxJ
rxi
A = [ac]
0 A-1
A” det(A)
0. Basic mathematical concepts
the remainder of a on division by n the greatest common divisor of a,, ..., a, the greatest common divisor of numbers in S the least common multiple of a,, . .., a,, the least common multiple of numbers in S the greatest number among a,, ..., a, the greatest number in S the least number among a,, ..., a, the least number in S the greatest integer less than or equal to x the least integer greater than or equal to x a matrix the zero matrix the inverse matrix of A the n-th power of a matrix A the determinant of a matrix A
Let S,, . .., S, be sets. The elements of the set S, x . . .xS, are called ordered n-tuples and denoted by (s,, ..., s,,). Any subset R r S, x . .. x S, is called an n-ary relation in S, x...xS,. If n = 2 then R is a binary relation. Instead of (s,, s2) E R we shall write also s,Rs2. Let R c S x T be a binary relation. We shall use the following symbols: R(s) = { t I sRt) for any s E S, and R(S’)= ( t I sRt and S E S’) for any S’ cS. The set ( s l ( 3 t E T)[sRt]),called the domain of R , will be denoted by Dom(R), and the set ( t I (3s E S)[sRf]),called the range of R , will be denoted by Ran(@. The relation R-’= ( ( t , s) I (s, f ) E R ) is called the inverse relation of R. If sRt and sRt’ implies t = t’ for any S E S and t, t’ E T , then R is a partial function. We denote this by writing R: S+T. If in addition Dom(R) = S then we call R a total function or shortly a function. If R is a function and sRt then instead of R(s) = { t ) we shall write R(s) = t. Functions will be denoted usually by lower case letters and written as left-hand operators. Thus, if fi: S,+S2 and f2: S2+S3 then the superposition f2f,: S,+S3 is the function defined as follows: f2fl(s)=f2(f,(s)) for all S E S,. The identity mapping of a set S is denoted by id, or id if the set S is fixed. In accordance with notation introduced for relations, the set v(s) I S E S’) will be denoted by AS’) for any S’ r S. Thereby, every function S+T has been extended to the domain SuP,(S), with the extension denoted also by f. Let S be a set. A family C = {B,, B,, ..., B,) of non-empty subsets of S is a cover of S if B,uB2u...uB, = S. Given a cover C of S, the cover ( B E CI (VB’ E C ) [ B ’ a B ’ ] )will be denoted by max(C). A cover C is an irredundant cover if max(C)=C. Let C be an irredundant cover of a set S. The relation R,= ((s, s’)I (3B E C)[(s, s’} c B ] ) c S 2 will be called the relation induced by C . The relation R, is a compatibility relation in S (i.e., R, is reflexive and
0. Basic mathematical concepts
3
symmetric). Let R be a compatibility relation in a set S. The cover CR= { B CS I B 2 r R and (Vs@ B)[B+R(s)l) of S will be called the cover induced by R . The cover CR is irredundant. Let C and C’ be covers of a set S . We shall write C I C ‘ iffor each B E C there is B ’ E C’ such that B r B ’ . A cover R = ( B , , B,, ..., B,) of a set S is a partition of S if B,nBj=IJ for any i, j~ (1, 2, ..., n) such that i # j . Let x be a cover of S. The relation R, induced by R is an equivalence relation (Le., R , is reflexive, symmetric and transitive). Let R be an equivalence relation in a set S. The cover C, of S induced by R is the partition defined as follows: C, = {R(s) I s E S}. This partition will be called the quotient set of S with respect to R , and denoted by SIR. The cardinality of the set SIR is called the index of R. If x is a partition of a set S then instead of (s, s’) E R we shall also write s = s’(x), and instead of R,(s) we shall also use the symbol B,(s). Given a set S, the partition ( S ) will be denoted by l,, and the partition ((s} I s E S ) will be denoted by 0,. Let x and x’ be partitions of a set S. The partition xax’, called the product of x and x’, is defined as follows: s=s’(x.x’) if s = s ’ ( x ) and s = s ’ ( x ’ ) . The partition x+n’, called the sum of x and n’, is defined as follows: s = s ’ ( x + x ’ ) if there exists a sequence s = sl, s2, ..., s, =s’ such that for every i E (1, 2, ..., n- 1) either si=si+,(n) or ~i s ~ + , ( R ’ )holds. Let A be a nonempty set. A function f: A”+A will be called an m-ary operation in A. By 0-ary operation in A we mean any element f e A . Let A’ EA. The subset A’ is closed under an m-ary operation f if f ( a , , ..., a,,,) E A’ for all (a,, ..., a,,,) E (A’)”. An algebraic system is an ordered sequence A = (A, f,,. .., f,,, R,, ..., R b where A is a nonempty set, J;. is an m(i)-ary operation in A for all i e (1, 2, ..., n), and Rj is an no)-ary relation in A for all j~ { l , 2, ..., k ) . An algebraic system A = ( A , f,, ..., fJ is called an algebra. An algebra A‘ = (A’, h’, ..., f,,’) is a subalgebra of an algebra A = ( A , f,,..., fJ if A’ L A and for every i E (1, 2, ..., n) the function f,’ is either the restriction off, to (A’)m(i)if m(i)>O, or fi’ E A’ if m(i) = 0. Let A , be a nonempty subset of A . The set A , is said to be a set of generators of A if the smallest subalgebra of A containing A, is equal to A . We shall also say that A , generates A . Algebras A = (A, f,, ..., f,J and B = ( B , g,, ..., gk) are similar if n = k and for is equal to the arity of gi. Let A = ( A , fl, any i E (1, 2, ..., n ) the arity of ..., fJ and B = (B, g,, ..., g& be similar algebras. A function h: A+B is a homo= gi(h(al), ..., h(am0) for all i E ( 1 , 2, morphism of A into B if h(f,(a,, ..., ..., n) and (a,, ..., urn(,,)E Am(’). A homomorphism h is an epimorphism (resp. a monomorphism, an isomorphism) if h is surjective (resp. injective, bijective). A homomorphism (resp. an isomorphism) of an algebra A into A is called an endomorphism (resp. an automorphism) of A . Let A = (A, f,, ..., fJ be an algebra. An equivalence relation R c A x A is called a congruence in A if a,Rb,, ..., am(i+bm(i) imply f , ( a l , . .., a,(,))Rf,(b,, . . ., bmcs)for all i E (1, 2, ..., n) and a,, ..., b,, ..., bm(ilE A. The factor
0. Basic mathematical concepts
4
algebra of an algebra A with respect to a congruence R is defined to be the algebra AIR = (A/R, fl*, ..., fn*) where fJR(al), ..., R(a,,,(&) = R ( f ( a , , ..., am(ll)) for all i E (1, 2, ..., n ) and (al, ..., a,(l,) E Am(’).The natural epimorphism of an algebra A onto the factor algebra AIR is the function h: A+AIR defined as follows: h(a) = R (a ) for all a E A . Let A = ( A , fl’, ..., f n ’ ) and B = ( B , f,”, ..., f,,”)be similar algebras. The product of A and B is defined to be the algebra A x B = ( A x B , f,,..., f , where L((a1, bl), -.., (~,,,(~l~ b m ( g ) ) = ( f ; ’ ( a 1 , ..., am(l$,f , ” ( b l , ..., b,($ for all i E (1, 2, ..., n ) and (al, bl), ..., (am($.,bmcll)E A x B . Let . be a binary operabon in a set A . The operation . is commutative if a . b = b a for all a, b~ A . The operation . is associative if ( a e b ) . c = a - ( b .c) for all a, 6, c E A . If the operation . is associative then by an we shall denote the n-th power of a, defined to be the product a - a . ..:a ( n times). An element e E A is an identity if e + a= a . e = a for any a E A . An element a E A is an idempotent if a2 = a . An element a-1 E A is an inverse of a E A if a .a-’ = a-l . a = e. A groupoid is an algebra ( G , .) where . is a binary operation. A semigroup is a groupoid ( G , .) such that the operation . is associative. A monoid is a semigroup containing an identity. A semigroup ( G , -) is commutative (abelian) if the operation is commutative. A group is a monoid whose every element has an inverse. A group ( G , .) is commutative if the operation . is commutative. A group (G’, .) is said to be a subgroup of a group (G, -) if G’ E G . We shall often call the set G alone a group (resp. a semigroup, a monoid, a groupoid) assuming that an operation in G is defined. Let X be a nonempty subset of the set G . The subgroup generated by X , denoted by <x>, is the intersection of all subgroups of G containing X . If cX> = G then the set X is a set of generators of G. A group G is a cyclic group if G = <X> for some U E G . If a group G’ is a subgroup of a group G then we shall write G’ 5 G . Let H be a subgroup of a group G, and let a E G . The set Ha = {ba 1 b E H ) is called a right coset of H in G , and the set aH = (ab I b E H ] is called a left coset of h in G . A subgroup H of a group G is said to be a normal subgroup of G if Ha = aH for every a E G . Let H be a normal subgroup of G . The set of all cosets of H in G is a partition of G , and the relation induced by this partition is a congruence. The factor group of G with respect to the congruencce induced by a normal subgroup H of G will be denoted by GIH. Let h: G+G’ be a homomorphism of a group G onto a group G’, and let e’ be the identity of G ’ . The set Kh = { a E G I h(a) = e’) is said to be the kernel of h. The kernel of h is a normal subgroup of G, and the factor group GIK, is isomorphic to the group G’. Let G and G’ be groupoids. A function f: G+G’ is called an anti-isomorphism of G onto G’ i f f is a bijection and f(ab) =f(b)f(a) for all a, b e G . The groupoids G and G’ are said to be anti-isomorphic. Let f be an m-ary operation in a set A . The operation f is associative if fCf(a,, ... a,,,), Urn+2’ ... uzrn-1)=... ... .. aJ, am+,, a2,-1) = f ( qf(a2, ,
-
.9
...I
P
>
=&,,
I
5
0. Basic muthematical concepts
a,-,, flu,,,, ..., a,-l)) for all al, %, ..., %,,-, E A. An m-adic semigroup is an algebra (A, j) where f is an associative m-ary operation. An m-adic group is an m-adic semigroup (A, j) with the following property: given any m elements from a,, a,, ..., a,,, E A, the equation flu,, a,, ..., a,,,) =a,,,+, has a unique solution in A for the remaining element. Let X = {x,, ..., xu) be a finite set. By x‘ we shall denote the set of all finite sequences of elements in A. The sequences in x‘ will be written without parentheses and without commas separating any adjacent elements. The length of a sequence w, denoted by I w l , is defined to be the number of elements in w. For any X E X we shall denote by ithe sequence xx..x of length n. The sequence of length 0, containing no elements, will be called the empty sequence and denoted by e. We shall define now the operation of the concatenation of sequences over X. The concatenation of sequences x , ’ . . ~ ~ and ’ x , ” . . ~ ; ’ is the sequence xl’..~p’xl”..~q”. For any X , c x ‘ and X,E;X’ we shall denote by X1X2the set (wIw2Iw, E X, and W,E X,). The concatenation of sequences is an associative operation. The set x‘ together with the operation of the concatenation forms a monoid, called the free monoid over X. A ring is an algebra (P.+, .) where + and - are binary operations such that (1) (P,+) is an abelian group, (2) the operation - is distxibutive over the operation +. A field is a ring (F, +, .) such that (F \ {e), -) is a group, where e is an identity element with respect to the operation +. A simple field is a field which contains no proper subfield. Let K be a simple subfield of a field F. The characteristic of F, denoted by char F, is defined as follows: char F=O if K is isomorphic to Q, and char F = p if K is isomorphic to Tp. By F[x] we shall denote the ring of polynomials in the variable x over F. Let K be a subfield of a field F. An element U E F is said to be irreducible over the field K if a is not a root of any nonzero polynomial in K[x]. Let F be a field of numbers. The set of all sequences (al, a,, ..., a& of elements in F is called a vector space F,, over F, and the sequences are called vectors in F,,. An algebra (L, m, u), where and u are binary operations, is called a lattice if for any u, b, C E L the following axioms hold: (1) a n b = n a aub=bua, (2)
(3)
an(bnc)=(amb)-c am(bua) = a
au(buc)=(aub)uc, aw(b,a) = a .
An algebraic system (L, I ) is called a partially ordered system if the relation l is a partial ordering on L, i.e., the relation I is reflexive, transitive and antisymmetric, Let X c L. An element a E L is an upper bound of X .if x 5 a for all X E X. An element U E L is a lower bound of X if a l x for all X E X. The least
upper bound of X is called the supremum of X, and is denoted by sup X. The greatest lower bound of X is called the infimum of X, and is denoted by inf X.
6
0. Basic mathematical concepts
We shall present now the relationship between a lattice and a partially ordered system. Let (L, I) be a partially ordered system such that for any a, b~ L there are the supremum of the set (a, b), denoted by a d , and the infimum of the set [a, b), denoted by anb. Then (L, n, u) is a lattice. Suppose now that (L, n, U) is an arbitrary lattice. Let I be the relation defined by any of the following two equivalent conditions: (1) a l b if a n b = a, (2) a l b if aub = b. Then the relation 5 is a partial ordering such that a ~ isb the supremum of the set ( a , b ) and a n b is the infimum of the set ( a , 6 ) . A lattice (L. n, u) is distributive if for any a, 6 , C E L the following conditions hold: an(buC)=(umb)u(anc) and a u ( b m c ) = (a ub)n(a u c ) . A graph is an ordered pair G = (V, E) where V is a set, called the set of vertices of G, and E c Vx V is a relation, called the incidence relation of G. The number of vertices in a graph is called the order of the graph. A graph G = (V, E) is called an undirected graph if the relation E is symmetric; otherwise G is called a directed graph. We shall represent the set V by means of points (vertices) drawn on a plane. If G is a directed graph then each ordered pair (u,W ) E E is represented by a directed line (an arc) drawn from the vertex u to the vertex w. If G is an undirected graph then each unordered pair (u, w ) such that (u, W ) E E is represented by an undirected line (an edge) joining the vertices u and w. A graph G = (V, E) is complete if E = V x V. A graph G = (V, E ) is k-colorable if there is a surjective function f: V + [ 1, 2, ..., k) such that (u, w)E E implies flu) #f(w) for any u, w E V. A graph G' =(I",E') is a subgraph of a graph G = ( V , E) if V ' r V and E' c E. If furthermore G' # G then G' is a proper subgraph of G. A complete subgraph G' = ( V ' , E') of a graph G = ( V , E) is a clique of G if there is no complete subgraph G" = (V", E") of G such that V' c V". The number card(V') is said to be the order of G'. Let G = (V, E) be a graph. A sequence d = (v,, v2, ..., v " + ~of) vertices in G is called a path of length n in G if (vi, vi+,)E E for all i e (1, 2, ..., n ) . A path d is a proper path in G if (vi. vi+Jf(vj, v ~ , ~for ) all i, j E [ 1, 2, ..., n) such that i # j . A path d is a simple path in G if (vi, vi+,)f (vj. v ~ + for ~ ) all i, j~ (1, 2, ..., n ) such that i # j . A path d is a cycle if v1 = v , , + ~A. tree is an undirected graph which has no simple cycles. A graph G = (V, E ) is isomorphic to a graph G' = ( V ,E') if there exists a bijection f: V+V' such that (u, w)E E if and only if (f(u),f(w))~E for all u, W E V.
1. Automata and languages
Issues presented in this chapter (and to be continued partially in the next one) intend to situate finite automata in the universum of automata We start with the introductory remarks on languages and grammars, at fiist in their natural aspects, and then with their formal presentation. We will introduce the notion of tape automata and will classify them. We will consider the special cases of tape automata such as: Turing machine, linear-bounded automaton, pushdown automaton and two-way acceptor. Theorems on the equivalence of languages generated by grammars and accepted by respective automata will be given. I . I . Languages and grammars generating them I .I .I. Natural languages A language is a collection of signs typical for a given human group. It can be characterized by two important properties: - it exists in spoken and written forms, - the creative character of language is manifested in the ability of native user to generate and understand infinitely many sentences, even those which never, up to the present, were by anybody used or heard. A grammar is a tool serving to the description of a language. The language described by a grammar is the collection of all sentences generated by it. The grammar systematizes and investigates rules which serve to the native user to express his thoughts in sentences. These rules exist objectively in the sense that a man using them may not be aware of using them, however he can (usually without difficulty) use them correctly. We assume that the reader is familiar with parsing rules of sentences. Let us take for example the sentence “The young boy marches quickly”. It consists of two groups (phrases): the noun phrase - “The young boy” and the verb phrase - “marches quickly”. This sentence construction can be written with the help of grammar rule:
<noun phrase> + <noun phrasexverb phrase>
(1.1)
8
1 , Automata and languages
The noun phrase consists of the noun “boy” modified by the article “The” and the adjective “young”. The following rules hold <noun phrase> + <articlexnoun phrase> <noun phrase> -+
For the verb phrase we have the rule:
+ ,
because “marches” is the verb and “quickly” is the adverb. To finish the parsing of the sentence we must add another five rules: a r t i c l e -+ The + young <noun> -+ boy -+ marches + quickly Rules (1.1) - (1.9) form the grammar of the language consisting sentence. Its structural description is illustrated in the t r e diagram of Figure 1.1. Following this scheme we can produce a lot of sentences changing only Rules (1.5) - (1.9) or making additions to them. In Rule (1.6) instead of “young” one can use “leggy”. “handsome”, “beautiful” or select one of these adjectives. Then Rule (1.6) will be written as follows: ::= young I leggy I handsome I beautiful
(1.10)
which is the abbreviated notation of the alternative of rules in the shape of (1.6). Similar changes can be applied the other rules, e.g. <noun> ::= boy I girl
(1.11)
::= marches I runs I goes
(1.12)
::= quickly I slowly
(1.13)
Rules (1.1) - (1.5) and (1.10) - (1.13) form the grammar of another language consisting of 48 sentences.
9
I .l. Languages and grammars generating them
< verb phrase )
(noun phrase)
( v e r b ) (adverb)
c
young
The
1
boy
c
marches
I
quickly
Fig.1 . I . Structural description of a sentence
Considering the finite number of rules one can doubt whether it is possible to generate a language of infinite number of sentences with finite number of rules. It appears that it can be done because some rules can be used many times in the generation process of the sentence, e.g. This is the book which I saw in the show window which was in the bookstore which was in the city which,.. In the description of a language and a grammar generating it we assumed that - the vocabulary was finite, - the number of rules generating sentences was also finite, - we used some auxiliary symbols, - we made use of some terminal symboIs which were the words of the vocabulary. We are now ready to develop a formal characterization of a language and a grammar. 1.I .2. Language and formal grammar
Let us assume that X is a finite set called an alphabet (or vocabulary). Then the symbol x‘ denotes the set of all finite sequences of elements from X. Instead of “finite sequence” we shall also interchangeably use “word” or “sentence”. By a subword we will mean a finite subsequence. We assume that the empty word e, i.e. the word which does not contain any element, belongs to x‘. Formally, m
x‘ =
u X(k),
k= 0
I . Automata and languages
10
where so) = ( e ) , X(B =XX("') for k 2 1, and XY denotes the concatenation of the set X and the set Y. We assume that X+=X'\(e). Now, let us define the function I. I: X' +& in such a way that
Ixl=
{
n ifx=x,+.x,,
0 ifx=e The integer Ixl is called the length of the word x. The function R: x' +x' of mirror-image is defined as follows: eR=e
( o x ) ~ = xfor ~ o(TE X and X E x'. The word 3 is said to be the mirror-image of the word x. By a language L in the alphabet X (or simply a language) we understand any subset of x', L rx*. The basic operations on languages are the operations of union, aference, concatenation and closure. Let L, L, and L, be languages. Then - the language L, uL, is the union of L, and L,, - the language L,\L2 is the difference of L, and L,, - the language L1L2 is the concatenation of L , and 4, - by the closure of the language L we mean the language
where L(0) = ( e ), and L(B is the k-fold concatenation of L. The empty language 0 is the .language that contains no elements. Let us notice that 0 # (e) and, furthermore for any language L L0=0L=0 and ( e } L = L { e ) = L . A regular language is a special type of a language. We shall define it with the help of the notion of regular expression. Given the disjoint alphabets V and V = (+, *, 0, (, )) the word a in the alphabet V u V is said to be a regular expression in V if and only if (a) a € V or a=0 or a = e or (b) a is of the form (P+y), (py) or p', where p and y are regular expressions in the alphabet V. (The parentheses are omitted if the notation is not confusing). Every regular expression a defines a regular language L(a) in the following manner: (a) L(0)=0, (b> L ( 4 = { e l , (c) Wa E V"(a) = 01, (d) if a and p are regular expressions in the alphabet V then L ( a + p ) = L(a)u L @ ) , Uap) = L(a)L(P), L(a*)= L*(a).
I . I . Languages and grammars generating them
11
If two regular expressions a and p define the same language, they are considered to be equivalent. Formally, if a and p are regular expressions then
a=pwL(a)=L(p). Theorem 1.1. Let a, p, y be regular expressions. Then (a) a@+ Y) = aP + ay, (b) (a')'=a',
(c)
u*a=m',
(4 a(pa)*= (ap)'a, (e) (f)
a'a + e = a*, (a+ p)'= (a' + p')" = (a'r)'= a'(j3ay.
Proof. Follows directly from the properties of union, concatenation and closure of sets.
Example 1.1. Let V = (0, 1). Then the regular expressions ((0+1)10)*(0+1) and (0+ 1) (10(0+ 1))' define the same language L = (0, 1, 0100, 1100, 0101, 1101, 0100100, 1100100, 0100101, 1100101. 0101100, 1101100, 0!01101, 1101101, ...).
Now, let us introduce a definition of a formal grammar. A 4-tuple G = (N, T, P , R ) is said to be a formal grammar if: N is a finite set of nonterminal symbols, T is a finite set of terminal symbols, N n T = 0, P c (Nu T)+ x (NU T)' is a finite set of productions, R E N is an auxiliary symbol called initial symbol. If (p, q) is a production, then we write p + q and we say that p derives 4 directly. For a sequence of words p , , p2. ...,p , such that p 1 + p 2 + ...+ p , we say that p , is derivable from p , or there exists a derivation of p, from p1 and we write PI+Pn* The above defined formal grammar is often called a phrase-structure grammar. The language L(G) generated by a formal grammar G is a set of sequences of terminal symbols derivabJe from E: L(G)={xIX€ T ' A R + X ) .
For X E L(C) we say that x is a sequence, a word or a sentence in the language generated by G. Example 1.2. Let G = ( N , T, P, a) be a grammar such that N = ( R ) , T = ( a ) , and P = +m,R +aam). The language generated by G is L(G) = {a3, In E N).
{R
12
1. Automata and languages
The grammar we have defined is called a type 0 grammar and the language generated by it a type 0 language (or recursively enumerable language). By introducing restrictions in the definition of a grammar we introduce three other types of grammars and languages corresponding to them. A formal grammar G = ( N , T , P, le) such that all its productions are of the form x a y +=y, (1.14) where x , y , z E (N v T)*, z e e and a E N , is type 1 (context-sensitive) grammar. It can be proved that Rule (1.14) is equivalent to the following ones: a + j3 and la1I IPl, where a,p E (NuT)*. If G is a type 1 grammar, then L(G) is a type 1 (context-sensitive) language. Example 13. A grammar G = ( N , T, P, R) defined in such a way that N = (a,p, y, T = [ a , b, c, ) and P consists of the following productions: @+a bp -+ bb
a + aaPy a+aby
le),
rP+PY
by-) bc cy-+cc
is the context-sensitive grammar. The derivation of the word a2b2c2is presented on Figure 1.2. The language generated by G is the set of all words of the form un6"cn, for each n E N,and only these words. z+ap
cr+lwc.x.
z+ba
B-+b
F i g . l . 2 . Derivation of the word a2bzCz generated by the grammar G of Example 1.3
I .I. Languages and grammars generating them
13
A formal grammar C = ( N , T, P, a) such that all its productions are of the form a+x, where a~ N and X E (NUT)', is a type 2 (context-free) grammar. A language generated by a type 2 grammar is a type 2 (context-free) language.
Context-free grammars are used to specify artificial languages, especially programming languages.
I Fig.I.3. Derivation tree of Example I .4 Example 1.4.
Let us consider a context-free grammar G = (N,T, P, a) for which N = (a,p, a),T = (a, b ] and P consists of the following productions: a+ap a +baa a+ba P+b
a+aa a+m
p+ba
P + aPP
The language L(G) is the set of words with the same number of a's and b's. The derivation tree for the word abaaabbabb is shown on Figure 1.3. Type 3 (regular) grammars form a special subclass of context-free grammars in which the right-hand side of a production may contain at most a single nonterminal symbol.
I. Automata and languages
14
A context-free grammar G = ( N , T, P, a) is right linear if each of its productions is of the form:
a + a or a+ap, where a, P E N and a € 7'". A context-free grammar G = ( N , T, P, a) is left linear if each of its productions is of the form:
a + a or a+pa, where a, P E N and a € T'. Left and right linear grammars are also known as type 3 (regular) grammars. A language generated by a type 3 grammar is called type 3 (regular) language. Example 1.5. Consider the left linear grammar G, = ( N , T , P,, a) and the right linear grammar G , = (N,T, P,, a) such that N = (a, p, a),T = (0,1) and P1: a + pl p2: R-+lf3 R+l a+l a+pl a-+lp
P+aO a+l
p+oa
a-+l
Then L(G,) = L(l(01)') = L((10)'l) = L(G3. If we let Gi to denote the class of grammars of type i and we use the notation Li to indicate the class of languages generated by grammars in Gi, then we have G3 c Gz c GI c Go
and therefore from the respective definitions it follows that
It can be proved that the stronger condition: L 3 c L 2 c L 1 c L ois true.
15
I .2. Tape automata 1.2. Tape automata I .2.1. Definition and classification
Input tape
Control
J s t o r h g e tape
Figure 1.4 presents a tape automaton consisting of a control unit which will be called a frnite automaton, an input tape, an output tape, a storage tape, and movable heads that can read symbols from or write them on the tapes. The input tape holds an input word which can be scanned by the head. On the output tape the automaton can write symbols from the alphabet. We permit to read symbols from the storage tape and write them on this tape. Each tape (Fig.l.5) consists of a sequence of cells and has the leftmost cell but is infinite to the right. In the leftmost cell there is the sharp (#) symbol which indicates a blank cell. The next n consecutive cells contain a word. The remaining infinity of cells hold the sharps. The tape automaton operates in discrete moments of time (in steps). Each step consists of three actions: - the movement of a given head one cell to the right or to the left along its tape; the other heads do not move, - the reading of the symbol in the new cell or the erasing of it and the writing of a new one, - the change of internal conditions of the finite automaton, i.e. the transition of the finite automaton to a new state. We say that the tape automaton has executed a move if it has executed all three actions.
16
1. Automata and languages
Fig.15. Tape containing the word tlb...t,,
Formally, a tape automaton is a 5-tuple A = (S, C, 3, so, F), where S is a finite set of states, C=C, u I;u % and C, I;, I; are alphabets used on input, storage and output tapes, respectively; we assume that # belongs to each of these alphabets, a c S x X c , x ~ x ( HL, , R ) 3 x S x q x % and {H, L, R ] is the set of the possible movements of a head such that H denotes the immobility of the head, L the movement to the left and R to the right; 8 is said to be the transition relation, S is a distinguished state called an initial state, F c S is a set of final states. Though the relation 3 is 9-ary we interpret it as a binary relation a c X x Y, where X = S x C , x G x { H , L, and Y = S x q x & . Let M i € ( H , L, R ] for i = 0, 1, 2. The domain of 2, Dom(3) = {(s, ol,02, M,, M,,M J I s E S, 0,E C,, o2E C, and if M iE ( L , R ) , then M(i+l)(mod3) = M(i+2)(,a3) =HI, and (s, q.(32. Mo, M,,M ~ ) Dom(8) E denotes that the automaton being in the state S E S performed the movement Mi of a head ( M , indicates the movement of the input tape head, M , the movement of the storage tape head and M, the movement of the output tape head) and if it has executed the movement, then it reads the symbol Q , E C, from the input tape, if M , then it reads o , I; ~ or wrote o , I; ~ on the storage tape, and at last if M,E ( L , R ) , then the symbol o’ E C, was written on the output tape. After the execution of these actions the automaton goes to the state s’. In this situation
Ran@) = ((s’, o;,
03*) I s’E
s,
The above defined automaton is said to be nondeterministic. An automaton is deterministic incomplete if a is a partial function. If 3 is a total function then such a tape automaton is called deterministic complete. Other special cases of the tape automaton can be obtained by projection of the
17
I .2. Tape automata
9-ary relation a, on the respective set. In view of the above considerations we can give the classification of tape automata. Considering their structural properties we can classify the tape automata taking into account (1) functions of automata - in this group we distinguish - transducers (they have input and output tapes; the automaton on Figure 1.4 is a transducer), - acceptors (no output tape), - generators (no input tape); presence or absence of a storage tape: (2) - automata with a storage tape, - automata without a storage tape. Considering their behavior we can classify the tape automata taking into account (1) type of operation - in this group we distinguish - deterministic automata, - nondeteministic automata; (2) motion of input tape head - one-way (the tape head moves from left to right), - tweway (arbitrary motion); Table 1. I . Languages and automata accepting them
I
Type of language
Type of accepter
Remarks
0
Turing machine
One storage tape of unrestricted access
1 (context-sensitive)
Linear bounded
One linear automaton storage tape nondeterministic operation
2 (context-free)
I
Pushdown automaton
I
One pushdown storage
Two-way acceptor One input tape
3 (regular) Rabin-Scott automaton
(3)
storage tape access restrictions:
- unrestricted access, - pushdown storage (last in, first out), - arbitrary access within a region whose length is bounded linearly by the length of input.
I. Automata and languages
18
For each of the four classes of languages defined in Section 1.1.2 we define a class of tape automata accepting these languages. The relationships are given in Table 1.1. In the sequel of this section we discuss Turing machine, linear bounded automaton and pushdown automaton. Two-way acceptor and Rabin-Scott automaton will be presented in Section 2. I .2.2. Turing machine
A deterministic Turing machine is a single tape automaton A = (S, C, a, so, F) such that
a: S X C X [I;, R ) +SxC. Figure 1.6 illustrates the definition. The transition function of Turing machine can be described in the form of a diagram using the symbols presented on Figure 1.7. Let us recall that the notation a(s, a, M ) = (s’, a’), where s, s’ E S, 0,o’E C and M E (LR ) , means that the machine being in a state s moves the head in the direction M , replaces a letter o by a’,and reaches the state s’. The diagram of a Turing machine’s transition function will be used in place of the formal definition and will be called simply a diagram of the Turing machine.
automaton Fig.l.6. Turing machine
A configuration of the Turing machine is a 4-tuple (s, x, (3, y) such that X E C* is a word written to the left of the head, and Y E C’ is such a word written to the right of the head that the rightmost symbol of y is not #. The Turing machine presented on Figure a,,0~+~0~+~...(3~). 1.6 is in the configuration (s, #0102...0i-1r As a result of one move the Turing machine being in the configuration (s, x , a, y) goes to the configuration (s’, x ’ , a’,y’) if a(s, 0,M ) = ( s ’ , a’);we denote this fact (s, x , a,y) 3 (s’,x ’ , a’,y’).
s E S, a E C is a tape symbol scanned by the head,
The notation
19
1.2. Tape automata
d(s,6, R ) = (s; 6’)
Fig.l.7. Diagrams of a Turing machine’s transition function: (a) general case, (b) simplified form when the symbol written on the tape does not change
means that there exists a sequence of configurations (s, X , ..., (s,,, x,,, on,yJ such that
0,y), ( ~ 1 , X I ,
alp~ 1 1 ,
If a machine that is in a given configuration has no moves because it is in the final state S ~ FE or the head is located over the leftmost cell and it ought to move left, then such a configuration will be called dead. Any configuration of the form (so, #, o,x ) is said to be initial, and a configuration (sF,x , #, y) is said to be final. If a machine is in an initial or final configuration, then the tape is called initial or final tape, respectively. Let X be an alphabet. Function 9:X‘ +X* is Turing reaiizable if there exists a Turing machine A = (S, C, so, F) such that (so, e, #, x ) 9 (s’, z, #, y) and the configuration is dead if and only if cp(x) = y. If for an input word #x the machine does not reach a finite configuration starting from initial the configuration, then q(x) is undefined. Figure 1.8 illustrates the definition of Turing realizable function.
a,
Fig.I.8. Illustration of the definition of Turing realizable function
20
I . Automata and languages
I s4
I \
Fig.l.9. Diagram of a Turing machine accepting language L = (a%%" I n E W]
If in the definition of a Turing machine we allow a to be a relation, a c S x ( L , R ) x S X C , then such a machine is called nondeterministic. Let X be an alphabet. We say that a relation R cX*x T is Turing realizable if xRy implies the existe2ce of nondeterministic Turing machine A = (S, C, a, so, F) such that (so, e, #, x ) (s', z , #, y) .and the configuration (s', z, #, y) is dead.
-
A language L is accepted by deterministic (nondeterministic) Turing machine if it is the domain of some Turing realizable function (relation).
Example 1.6. Figure 1.9 shows the diagram of a deterministic Turing machine which accepts the language L = {an&" I n E N). Now, we shall demonstrate that each language accepted by a nondeterministic Turing machine is also accepted by a deterministic one.
Theorem 1.2. The domain of a Turing realizable relation is a language accepted by deterministic Turing machine.
1.2. Tape automata
21
Proof. It suffices to show that a deterministic Turing machine can simulate a denote a nondeterministic machine that realizes a nondetenninistic one. Let relation R. Furthermore, let for k E M
A
a k = (ai, k l q , k = ( S i , kt x i , kv b i , ks y i ,
&, i=
2, *..,
nk)
be the set of all configurations of & . reachable from the initial configuration after the k-th move. We shall construct a machine A which for a set ak of configurations makes a set of configurations reachable by A in k+ 1 moves. The set a, of configurations separated by symbols $ on the tape of deterministic machine is presented on Figure 1.1Oa. For the given list ak the machine constructs the list a k + l in the manner shown on Figure 1.1Ob using the empty region of the tape to the right of ak($ denotes the end of one and the beginning of the next list). For each configuration ai,k E a, the machine computes the successor configuration in each possible move of the machine A and appends it to the new list. When the machine A finishes computing all next configurations for am,k E a k , it starts processing the new list in the same way. This illustrates how a deterministic machine can construct the list of next configurations after doing by A a finite number of steps. The machine operates in this manner that it halts when the dead configuration is found on the tape. Therefore we have shown how the deterministic Turing machine can simulate the nondeterministic machine. Q.E.D. The next theorem gives us the relation between languages accepted by Turing machines and languages generated by type 0 grammars.
Fig.1 .I 0. Configurations of nondeterministic machine on a tape of deterministic machine
22
I . Automata and languages
Theorem 1.3. A language L is generated by a type 0 grammar if and only if it is accepted by a Turing machine. Proof. (e) Let us assume that L is accepted by a Turing machine A = (S, C, 3, so, F) and that C consists of two disjoint sets r and A. We construct a grammar G which nondeterministically generates two copies of the same word in C* and then simulates the action of the Turing machine on one copy. If A accepts the word x, then the grammar G transforms the second copy to a final word. If A does not accept x , then the derivation never results in a final word. We shall assume that for each S E F and each O E C the transition function d(s, a, M), M E ( L , R ) , is undefined. We shall assume also that Z= (al, a,, ..., a,,). Let G = ( N , T, P, re), where T = C , N = ( ( C u ( e ] x A ) u S u , (a,zl, and P consists of the following productions: (a) ~ e + s ~ z ~ , (b) %+(a, o)Rz for each G E C, (c) 'CL-)Xl. (d) n1-+ (e, #)qr (e) z1+e, (f) s(a, y) 3 (a,n)s for each a E C u (e) and each s E S and Y E A, such that 86,Y. R ) = ( s , 9). &)(a, Y) for each q, Y. a,a, Y E X u {el and S E S, (g) (6, E)S(G, Y)-+~(L such that d(s, y, L) = (s, q), (h) for each O E Zu (el, Y E A, S E F - (6, y)s+sos, s(a, y)-+sos, s + e . Using productions (a) and (b) we have
If A accepts the word a102.. .on, then it uses not more than m (m E w) cells to the right of the input word. Taking production (c), production (d) m times and at last production (e) we obtain
From now on only productions (f) and (g) can be used until a final state is generated.
23
1.2. Tape automata
where
=
= en+,= #.
= ... = a,,+, = e, 6,, 62,..., 6,+, E A and 6q+l = 6q+2 =
...
If S E F, then by (h) we have
Thus the grammar G generates the word ( T ~ C T ~ . under . ~ , condition that this*word is accepted by the machine A. It can be also proved by induction that ce + x if and only if the word x is accepted by A. (*) Let C = ( N , T, P, ce) be a type 0 grammar such that L = L ( G ) . We give informal description of a Turing machine A accepting L. Let A = ( S , C, a, so, F), where Z = N u T u (#, e, $) and symbols #, e. $ are the members neither of N nor of T. A word x is on the tap of A together with the word #e to its left and the word $a$ to its right. The machine simulates nondeterministically the derivation in G starting from (t: and placing the results between two termind symbols e. If a certain sequence of moves leads to a fmal word, then the received word is compared with x; if they are the same, then x is accepted. It follows from the simulation 2f derivations in G that there is the word #$x$w$ on the tape provided that E + W . Q.E.D. 1.2.3. Algorithms and their computational complexity
This subsection will start with a definition of Turing computable function. + (#, 1) be such a coding of vectors of nonnegative Let for k E M\ ( 1) , c: integers into words in the alphabet (#, 1) that
Kk
c(n,, n2,
..., nd = 1ni + 1#1& + I#. ..#1nk
+
1.
If k = 1, then we assume that c(n) = la+'. A function 9: N$+& is Turing computable if there exists a Turing machine (#, I ) * + { 11.. where that realizes the function
v:
~ ( 1 ~ 1#1~2+ 1+ l#...#lXn+ ')=
lY+l, if cp(x,, 3,..., x, = )y undefined if Hx,, 3,..., XJ is undefined
By a problem we understand a general question to be answered, usually having several parameters, whose values are left unspecified. An instance of a problem is obtained by specifying particular values for all the problem parameters. A decision problem is a pair x = ( D , , YJ such that D, is a set of instances and Y, ED, is a set of instances with "yes" answers.
24
1. Automata and languages
Intuitively an algorithm can be defined as a specific set of rules to perform a task. Partial recursive functions, Turing computable functions, Markov computable functions give formal representation for the intuitive notion of an algorithm. The time needed for the execution of an algorithm expressed as a function of the size of a problem is said to be the time complexity of the algorithm. Analogously we can define the space complexity of the algorithm. Let $ &+& and g: &,+& be functions. We say that f is O(g(n)) whenever there exist constants R E M and m E & such that An) Ikg(n) for all n 2 m. An algorithm of the polynomial time complexity or shortly a polynomial algorithm is an algorithm of the complexity O(p(n)), where p(n) is a polynomial and n denotes the size of the problem (For example, as the size of a problem the number of vertices of a graph, the dimension of a matrix etc. can be taken). An algorithm whose complexity cannot-be bounded in such a way is said to be an algorithm of exponential time complexity, or shortly an exponential algorithm. The analogous definitions deal with the space complexity. Let us assume that with each problem IC we associate a coding c representing a mapping of instances of x into words in an alphabet C. If the coding c is oneto-one, then the problem x is represented uniquely by a language L in C.
DIFFJCUL T PRO01 EMS
PROBLEMS
NP PRO61EMS
Fig.1.11. Classification of problems under the assumption thal P Z N P
1.2. Tape automata
25
A language accepted by a Turing machine which halts for each input word is called recursive. Each context-sensitive language is recursive but the converse is not true. Similarly, each recursive language is of type 0 but not conversely.
Figure 1.11 illustrates the simplified classification of problems. Unsolvable problems are problems such that languages representing them are not recursive. The class of difficult problems consists of exponential time complexity problems and the class P of feasible problems contains only problems of the polynomial time complexity. The class NP includes all feasible problems as well as problems whose status is less certain because only exponential time algorithms are known for them, but it has not been proved that polynomial time algorithms do not exist. The class NP consists of problems solvable by nondeterministic Turing machines of polynomial time complexity, i.e. of problems that languages representing them are recursive and the acceptance need O(p(n)) time, where p(n) is a polynomial. We accept the conjecture that P#NP. We distinguish in NP a subset of problems called NP-complete. They have a special property: if any of them could be solved by polynomial algorithm, then all other problems in the NP class could be solved by polynomial algorithms. is said to be a polynomial transformation from A total function f: ?* + language L,G C,' to language L, c;%*, if (i) x E L , if and only if f l x ) E L,, (ii) there exists a deterministic Turing machine that computes f using p ( n ) amount of time. If there is a polynomial transformation from L, to L,, we write L,aL,. A language is NP-complete if L E NP and iaL for each L E NP. Let NPC denote the class of NP-complete languages. Then the class NPI of NP-intermediate languages is defined as follows:
NPI = NP\ (Pu NPC). The class of NP-complete and NP-intermediate problems can be defied in the similar way. We can now return to considerations concerning the tape automata. 1.2.4. Linear bounded automata
A linear bounded automaton is a special case of a Turing machine which is characterized by the property that if a word x is on its tape, the machine never leaves the cells containing x. Let us assume that the alphabet C besides # contains one more distinguished symbol, say $. These symbols will be useful to mark the left and right ends, respectively, of the word placed on the tape. A configuration is defined here differently than in the case of Turing machine.
I . Automata and languages
26
A configuration of a linear bounded automaton is a mple (s, a102..o,, i) such that s E S, a, E C (r= 1, 2, ..., n), and i denotes the actual position of the head, 1l i l n . Let us consider the case of a nondeterministic automaton. If (s’, o, L) E a(s, oi> and 1 < i < n , then as a consequence of this move the automaton reaches the configuration (s’, ~1c52...~i~1aai+1...on, i ) from the configuration (s, olo 2...on, i+l); this situation is denoted by
However, if (s’, a, R ) E a(s, ai), 1 < i l n , then the automaton reaches the ~ -.on, ~ a i) a ~from + (s, 0102..a,, i - l ) , which is configuration (s’, < ~ ~ a ~ . . . a l.. denoted by (s, Q ~ O ~ . . . ~ i, ,- , l)*(s’,
0102...oi-1~q+l...on, i).
The notation (sl. xl, il)S(sk, x k , id means that there exists a sequence of configurations (sl, xl, i l ) , (sz, x2, i2), ..., ( s k t xk, i3 such that
The language accepted by a linear bounded automaton A = (S, C, set
a, so, F) is the
The interest in linear bounded automata follows from the fact that nondeterministic automata accept context-sensitive languages and only these languages. Theorem 1.4. A language is context-sensitive if and only if it is accepted by a nondeterministic linear bounded automaton.
Fig.1 .I 2. 2-track tape of linear bounded automaton accepting the word x generat-
ed by a context-sensitive grammar
I .2. Tape automata
27
Proof. (a)Only an outline of the proof will be given because a detailed description of linear bounded automaton accepting a context-sensitive language is rather complicated. Let G = ( N , T, P, re) be a context-sensitive grammar. We construct a linear bounded automaton accepting L(G). Let the storage tape of the automaton consists of two tracks (Fig.l.12). It can be proved by the simulation of a 2-track automaton by a 1-track automaton that the language accepted by the 2-track automaton is also accepted by the 1-track automaton. On the first track we place the word #x$, and the second track is used for computation. The automaton operates in such a way that at first it places the word #re in the leftmost cells of the second track, and next it enters a subroutine which performs thz following steps: Step 1: The subroutine selects succesive subsequences of symbols a from the second track, such that a + p is a production in P; Step 2: The subsequence a is replaced by p in such a way that all symbols which are to the right of a are shifted right if necessary to make a gap between # and the shifted f i t symbol big enough to accomodate p. and only p. The machine halts if Ipl> hi; Step 3: The subroutine nondeterministically chooses either to go back to Step 1 or to exit. If the execution of the subroutine is finished, the first track contains the yord x with end markers and the second one contains some word #r such that say, where IyiILxl which follows directly from the definition of context-sensitive grammar. The automaton compares corresponding symbols on both tracks and in the case of any difference it halts without accepting. Otherwise it halts and accepts. If X E L(G) then there exists a sequence of moves in which the automaton constructs x on the second track and accepts the input word. Hence, for each word having a derivation in G there exists corresponding a sequence of moves of the automaton and for each sequence of moves there exists a derivation of x from re in G. (e) To prove that a language accepted by a nondeterministic linear bounded automaton is context-sensitive it suffices to construct a context-sensitive grammar simulating the automaton. It can be done in the analogous way to this presented in the proof of Theorem 1.3. Q.E.D. 1.25. Pushdown automata
A pushdown automaton (Fig.l.13) is a tape automaton consisting of a finite automaton equipped with two heads, one acting with the input tape and second with the storage tape. The organization of the access to the storage tape is as
28
I . Automata and languages
follows: if there is a symbol which ought to be placed on the tape, then this symbol will occupy the ‘‘top’’position, i.e. it will be in a cell currently occupied by the leftmost symbol & denoting the “top” of the storage. The symbol & will be moved to the next cell. If a symbol is to be removed from the “top” cell, then the rightmost symbol different from & is replaced by &. A configuration of a pushdown automaton is a triple (s, x , y), such that s is a state of automaton, x is a read subword of input word, and y is a word placed on the pushdown tape. The automaton presented on Figure 1.13 is in the configuration (s, fo, 2&).
i Fmi fe au toma ton
Fig.l.13.Pushdown automaton
Now we introduce the fonnal definition of a pushdown automaton. A deterministic pushdown automaton is a 5-tuple (S, C, a, so, F), such that S is a fiiite set of states, C = C 1 u C,,where C, is an input alphabet and is a pushdown alphabet; we assume that & is a special symbol of &, a: Sx C, x I ; x ( H , R ) x ( H , L, R ) +Sx C, is a transition function defined as follows: Let s, s’ E S, o1E C,, 0 2 e q.Then (a) a(s, ol,&, R , H ) = ( s ’ , &) in case of reading the input tape, (b) a(s, q, &, H , L ) = (s’, &Iin case of reading the storage tape, (c) a ( s , o l , & , H p R ) = ( s l , & ) in the case of writing on the storage tape, a ( s , , ol, &, H , L) = (s2, od a(+ ~Jl,oz, H , R ) = 03. &) so€ S is the initial state, F ES is a set of final states. Figure 1.14 shows three kinds of moves executed by a pushdown automaton together with the resulting changes of configurations and with diagrams describing them.
1
I .2. Tape automata
29
30
1. Automata and languages
Fig.l.14. Moves of pushdown automaton and their graphic illustration Before introducing the definition of a language accepted by a pushdown automaton some auxiliary definitions will be given. The configuration (so, e, &) is called initial. A configuration (sF. x , &) such that S ~ FE and x is a prefix of a word w written on the input tape (i.e. there exists such a word Y E C,' that w =xy) is said to be final. If there exists a sequence of configurations (sl, xl, yl), (s,, x,, yz), ..., (s,, x,, y,,) such that (sl, ... + (s,, x,,, y,,), where * denotes one of the relations s, XI? Y l ) 3 (s19 X2P Y,) + or a R(see Fig.l.l4), then we write
*
(SIP
~ 1 ~, 1 3 ) (sn* xn,
~3.
Now, we are ready to define a language L accepted by a pushdown automaton:
Example 1.7. The pushdown automaton shown in the form of the diagram on Figure 1.15 accepts the language
1.2. Tape automata
31
Fig.I J.5. Pushdown automaton accepting the language from Example I .7
For a nondeterministic pushdown automaton we assume that d is a relation. The class of languages accepted by nondeterministic pushdown automaton is more extensive than the class of languages accepted by deterministic one, e.g. the language (XXR / x E C) is accepted by a nondeterministic pushdown automaton, but not by a deterministic one. Theorem 15. A language is accepted by a nondeterministic pushdown automaton if and only if it is context-free. Proof. See e.g. Chomsky [l], Denning, Dennis, Qualitz [l], Hopcroft, Ullman [l]. 1.2.6. Two-way acceptor
A two-way acceptor consists of a finite state control unit and a tape that extends infinitely to the right. A head moves along the tape, one cell at a time, to the right or to the left (Fig.l.17). Formally, a nondeterministic two-way acceptor is a tape automaton (S, C , 8, so, F) such that a G S x C x ( L , R ) x S and # E C. The relation d will be presented graphically using symbolic representation shown on Figure 1.17.
32
I . Automata and languages
fi'ni te automa ion Fig.1 .I 6. Two-way acceptor
Fig.1 .I 7. Graphic representation of the relation
a for a two-way ucceptor
Fig.l.18. Diagram of the two-way acceptor to Example I .8
33
I .2. Tape automata
Example 1.8. Let n,(x) denote the numbers of symbols i, i E 0, l ) , in the word x. Furthermore, let L = {x I x E L((0 + 1)’) A n,(x) = O(mod 2) A nl(x) = O(mod 3)).
The diagram of the two-way acceptor that accepts L is presented on Figure 1.18.
As it was said before, two-way acceptors accept regular languages, and only these languages. A language is accepted by such an automaton if and only if it is accepted by a Rabin-Scott automaton. Problems that deal with the acceptance of languages by Rabin-Scott automata will be discussed in the next chapter. Exercises
1.1. Construct a formal grammar that generates: (a) L = Ca2n-1 Ia E N) , (b) L = {anb2m-1I m, n E N), (c) L = {xex Ix E L((0 + 1)’)). 1.2. Prove that the language generated by the grammar G presented in Example 1.4 is the set of all words consisting of an equal number of a’s and b’s.
Hint. Prove it by induction on the length of
XE
T.
1.3. Prove that the operation of the tape automaton presented on Figure 1.4 can be simulated with the help of the Turing machine from Figure 1.6. Hint. Use the same technique as in the proof of Theorem 1.2. 1.4. Construct a Turing machine that computes: (a) f ( x , Y) = x + y ,
Y> = X ’ Y ,
(b)
f(X
(c)
ms Y ) ” Ax, Y>=
{
i
0 ifx=o
x-1 ifx21, 0 ifx=o
1 ifx>o, for x, Y E N,,.
1.5. Prove that each context-free language is accepted by a deterministic linear bounded automaton.
34
1. Automata and languages
1.6. Any context-free language can be generated by a grammar G = ( N , T, P, R ) in which all productions have the form a+ Py or a+u, where a, p, Y E N and U E T (Chomsky normal form theorem). Let G be a grammar in normal form. Furthermore, let for X E L(G) exist a derivation in k steps. Justify how long is the word. 1.7. Give a diagram of the one-way acceptor (S, C, 2, so, F'), where 2:s x C' that accepts the language L((a + b)*).
-+
S,
Bibliographic note The notion of a grammar and the classification of grammars presented in this chapter are due to Chomsky [l]. The language of regular expressions was introduced by Kleene 111. The first description of a tape automaton was presented by Turing [l]. Since Turing's work, the great number of tape automata was proposed and studied. Two-way acceptors appear for the first time in the works of Rabin and Scott [l], as well as Shepherdson [l]. Deterkinistic linear bounded automata have been introduced by Myhill [l], and nondeterministic by Kuroda [l] who proved their equivalence to context-sensitive grammars. Pushdown automata appear as formal construction in Oettinger [l] and Schutzenberger [l]. Their relation to context-free languages was presented independently by Chomsky L21 and Evey Ell. In addition to the automata presented in this chapter the literature contains the concepts of other types of tape automata, namely: a two-way multihead automaton (Ibarra [l]), a generalized pushdown acceptor (van Leeuwen [l]), an auxiliary pushdown machine (Cook [I]), a vector machine (Pratt and Stockmeyer [ll), an alternating Turing machine (Chandm and Stockmeyer [l]), a parallel random access machine (Fortune and Wyllie [l]) and others. These works mostly deal with the complexity of computations done by introduced models. Problems of computational complexity are presented for example in the monographs by Garey and Johnson [ll, Hartmanis 131, Machtey and Young [ll, Mikolajczak and Stoklosa [l]. Some ideas developed in this section are taken from Denning, Dennis and Qualitz [l] and Hopcroft and Ullman [l].
2. Finite automata
This chapter is an introduction to algebraic and structural theory of finite automata. The basic notions pertaining to automata theory are discussed here. The following types of automata are defined: deterministic and nondeterministic, complete and incomplete, Mealy’s and Moore’s types. The equivalence of the above models is shown. In the second part of this chapter the idea of an automaton without outputs is discussed. The definitions of functions preserving operations in finite automata, partitions and covers with substitution property, sets of generators and minimal sets of generators, sum and simple products of finite automata, connectivity of automata, characteristic subgroup and monoid of an automaton, and classification of subautomata are presented. A model of an automaton without outputs defined as a pair (S, J), where S is a set of states, and J is a set of functions in S, is discussed. The definitions of special types of automata used in the chapters are given. The description of Rabin-Scott automaton and topics related to recognition of regular languages are covered in the last part of this chapter. It is shown that the regular languages are equivalently defined by Rabin-Scott automata, regular expressions, and regular grammars. Moreover, it is proved that the class of languages recognizable by two-way automata is identical with the class of regular languages. 2.1. Definitions of automata
Basic notions pertaining to finite automata are introduced in this section. Deterministic and nondeterministic as well as complete and incomplete automata are defined. All definitions are for Moore and Mealy types of automata. The extensions of state transition and output functions are given. Methods of automata representations are discussed. In the last part the constructions transforming Moore’s and Mealy’s models are described. 2.1 .I. Deterministic automata Finite deterministic automaton of Moore type is a 5-tuple (S, C, 2, !2, h), where s is a nonempty finite set of states, C is a nonempty finite set of input symbols called also an input alphabet, a: S x C + S is a state transition
2. Finite automata
36
function called also transition function, R is a nonempty finite set of output symbols called also an output alphabet, and k S + R is an output function. Finite deterministic automaton of Mealy type is a 5-tuple (S, C, a, R, F), where S, C, a, R are defined in the same way as for finite deterministic Moore type automaton, P is an output function with domain SxC, so that p: S x C + R . In order to simplify a formal description of automata properties we shall use the abbreviation DFA instead of term “finite deterministic automaton”. Moreover, the output function of Moore type DFA will be denoted by symbol h, and the output function of Mealy type DFA will be denoted by symbol p; we shall allow using both superscripts and subscripts together with the output functions symbols. The convention above lets to recognize the type of automaton (Moore or Mealy) if we will write for example: let A = (S, C, 3, R, A) be a DFA. In case the automaton’s type is immaterial we will use symbol y for the output function. It is convenient to use further abbreviations if a 5-tuple defining an automaton is not explicitly given. We shall assume that DFA-R specifies Moore type DFA, and DFA-L specifies Mealy type DFA. In the practical applications as well as in a theoretical research often the function a is not defined for every element from the set s x C, that is Dom(3) c s x C . Such a DFA is said to be an input-incomplete DFA. Similarly an outputincomplete DFA is defined. A DFA-R is an output-incomplete DFA if Dom(h)cS; respectively a DFA-L is an output-incomplete DFA if Dom(P)c sxC. A DFA is incomplete if it is either input-incomplete or output-incomplete or both. We assume that Dom(P) L Dom(a) for any DFA-L, that is if for some pair (s, a)€ S x C the output function is defined, then the transition function is defined too. Let A = ( S , C, 2, R, A) be a DFA. We will demonstrate now, how to define elements of a 5-tuple (S, C, a, R, h). Notice that in order to define the whole DFA it is necessary to specify all elements from the sets S, C, C2 and then to specify the respective values of the transition function 3 and the output function
h. Example 2.1. Let S = {sl, s,, s3, s4, ss}, C = (o,,0 2 ) ,R = (al, 0.J be the set of states, the input alphabet, and the output alphabet, respectively of some Moore type automaton A = (S,C, a, R, A). Let us assume:
QJ = s2.
acs,, 02)= s4,
a(s,,
d(s2, 02)= s4,
a<s,, a,)= s,,
qs,, 02)= $ 5 ,
a@,, a,)= s,,
a(s4,
h(s,) = w1,
h(s4)= 0 2 .
a(s,,
02 = s1.
acs,,
01)
= S3’
01)= s2.
h(sJ = q,
h(s,) = 0 1 .
2.1. Definitions of automata
37
The transition function a is not defined for the pair (s,, 02) from the set S X C , and the output function X is not defined for the state s3 from the set S. Thus A is an incomplete DFA-R. In the above example first the elements of S, C, Q have been explicitly specified, and then the transition and output functions have been defined by the lists of respective equations. However, one can see that the set of states, the input alphabet and the output alphabet can be constructed using simply the equations lists of a and h functions. Writing specification of an automaton as in the Example 2.1 is cumbersome in practice. Therefore in the sequel we shall rather use either table or graphic representation of an automaton. Table 2.1 presents the table representation of the automaton A from the Example 2.1. Table 2.1. Transition and output table of the automaton A from the Example 2.1
A table which defines the transition and output functions of an automaton we shall call a transition and output table. Table 2.2. Transition and output table of a Mealy type automaton (an example)
I Table 2.2 defines the transition and output functions of some Mealy type automaton. The columns headed with input symbols specify states a(s, (3) as well as outputs p<s,0).
38
2. Finite automata
A graphic representation of an automaton A = ( S , C, a, Q, y) is a dlagram of graph Y(A) of automaton transitions together with labels corresponding to input and output symbols. Formally, Y(A)= ( S , Y(a)), where Y(a) G S x S and (s, s’)E Y(a) if ( 3 0 C)[a(s, ~ 0 ) =s’l. Below we describe a construction of a of automaton A: The set of nodes is the set S. If (s, S’)E Y(8) then there is an arrow on the diagram from the node s to the node s’. Labels of arrows (s, s’)E Y@): (a) DFA-R: all 6 E C satisfying a(s, 0 ) = s’, (b) DFA-L: all pairs (6, p(s, 6))E C x SZ such that a(s, 6)= s’ ~ ( s 6) , E Dom(p), and all pairs (6, -) such that a(s, o)=s’ A (s, 6)E Dom(p). Labels of nodes S E S (a) DFA-R: h(s), if s E Dom(h) or “-” if s c Dom(h), (b) DFA-L: the nodes are not labeled. On Figure 2.1 are presented diagrams of automata defined by Table 2.1 and Table 2.2.
Fig.2.1. ( a ) Diagram of automaton from Table 2.1, (b) Diagram of automaton from Table 2.2
2.1. Definitions of automata
39
Now, we shall extend the transition and output functions. If an automaton is in a state s and the current input symbol is a letter a such that (s, a)€ Dom(8) then the state d(s, a) is said to be a next state and the state s a current state of the automaton. We shall extend a transition function such that it will point to the next state not only for single letters of an alphabet C, but also for words from C,so that SxC*+S. For any s in S we define:
a:
(1) a(s, e) = s, where e is the empty word, (2) W x E C*)Wa E C)[(s, x ) E Dom(3) A a((s, x), a) E Dom(2) W s , XI. @I.
a(s, xa) =
Notice, that the domain of an extended transition function has been defined recursively. Now for every state S E S we define the set of input-valid words: Dom,(d) = ( x E C*I(s, x) E Dom(3)). In many applications we need to know the set of next states for a given subset of current states and a given subset of input words. Thus we define a function 8: P,(s) xP,(C) +P&) in the following manner: for a given transition function a and (VR E P,(s)), (VXE P,(C*)) we have: (1) &R, x)= (a(r, X ) R A X E x). Additionally we extend the function 8 such that X ) , where s E S, X E P,(C*), (2) s(s, X ) = &R, x) = 8(R, { x ) ) , where R E P,(S), x E Z*. (3) In a similar manner we extend the output functions p and h. For any S E S, x E C*,a E C we assume: (1) For DFA-L: (a) P(s, el = e, (b) (s,x) E Dom(a)~a((s,x), a) E Dom(p)* P(s. xa)= P(a(s, x), a). (2) For DFA-R: (a) s E Dom(h) a (s, e) E Dom(h) A h(s, e) = X(s), (b) (s, x ) E Dom(a) A a(s, x ) E Dom(h) h(s, x ) = h(d(s, x)). The definition above describes recursively the extended domain of functions p and h. Moreover it makes possible to determine the output symbol for given a state and an input word. Similarly as for a transition function we define the set of output-valid words that depends on an automaton state:
a(($},
Dom,(h) = ( x E C*I (s, x ) E Dom(y)), where S E S and y is an output function p or h. Now it is easy to see that from our earlier assumption Dom@)EDom(d) it follows Dom,(p) E Dom,(d). Similar inclusion for DFA-R follows directly from the definitions of transition and output functions extensions.
2. Finite automata
40
Often, when we analyze an automaton behavior we need to know not only the last output symbol which is yield out after the whole input word is processed, but also entire sequence of output symbols associated with that input word. Let X = C T , ( T ~ . . . ~ , , , be an input word, We can find the corresponding sequence of output symbols for a given state s E S if for every xi= 0 , ~ ..oi, ~ . where i E (1, 2, ..., m ) , the value of function y(s, xi) is defined, that is if x i € Dom,(y). We shall say that such x is valid for the state s. Now we formally define a function SxZ+!2' (T represents here either the symbol fi or the symbol depending on type of the automaton for which the function is made) in the following way: if x = 0,02...omis a valid word for a state s E S then: (1) x E Dam,(% (2) xs, x)=y(s, o,)y(s, 0,o&...y( s, o pz...O,>. For a Moore type automaton we introduce additionally the function &,, which adds the output symbol associated with a current state to the output sequence yield by the function k. We assume'that: (1) ko(s, e)=h(s), (2) (x f e) A (s E Dom(h)) 3 ko(s,x ) = h(s)k(s,x ) . Notice, that Dom(xo)c Dom(2).
x
2.1.2. Nondeterministic automata
Nondeterminism in finite automata theory is associated mainly with the state transition functions. Replacing a transition function with a relation makes easier synthesizing a deterministic automaton and proving some theorems concerning finite automata. In Section 2.3 we shall show that the class of languages recognizable by nondeterministic automata is the same as the class of languages recognizable by deterministic automata. It is possible to use the nondeterminism for the output functions as well, however it finds no practical applications. We shall discuss therefore the nondeterminism of transitions only. A nondeterministic automaton denoted shortly by NDFA is a 5-tuple (S, C, R,y), where: S is a nonempty finite set called a set of states, C is a nonempty finite set called an input alphabet, d r ( S x C ) x S is a relation called a transition relation, !2 is a nonempty finite set called an output alphabet, y is a function such that either ?/: S + Q or ?/: SxCxS-+C2 (in the first case we say that an NDFA is of Moore type and we write NDFA-R, in the second - that a NDFA is of Mealy type and we write NDFA-L). According to a convention explained in Chapter 0 by a(s, a) we shall mean now the set (s' E S I (s, 0)ds'). In an NDFA-R the output function is denoted by h, and in an NDFA-L the output function is denoted by p; moreover we make the following assumption:
a,
(s, 0,S ' ) E Dom(p)* s' E &s,
0).
2.1. Definitions of automata
41
Now, we extend a transition relation similarly as we have extended the transition functions of deterministic automata. Let A = @ , C, a, SZ, y) be an NDFA. We extend the transition relation a such that: VSE S, VOE C, V X EC*, VR E Po($, V X E P,(C*) we have: (1)
a(s, e) = ( s ) , where e is the empty word in C*,
(2)
a(s, xO)=
(3)
&R, X ) =
u 8(S’O), s’E a(& x )
u
u a(s, x),
XEX SER
The output functions p and h for NDFA-L and NDFA-R, respectively we extend to a domain SxC’ such that VSE S, V ~ C, E V X EC* we have:
(2) (3)
+ e * p(s, XO) = (p(s’, O)I s’E a(s, x ) ) , h(s, x) = (h(s’)I s’E a(& x ) ) .
x
2.1.3. Comparison of Moore and Mealy types models
From the definitions of Moore and Mealy types of DFA it follows that both models differ as to the domain of output function only. In a Moore type automaton the current output is uniquely defined by the current internal state. In a Mealy type automaton the current output depends additionally on the current input. Notice however that if we exclude an input word of length equal to 0, then we are able to compare behavior of both types. Let A =(SA, C, a,, SZ, A) be a Moore type automaton, and let B = (S,, C, a,, SZ, p) be a Mealy type automaton. We assume that both automata are deterministic and that their input and output alphabets are respectively equal. We say that the Moore type automaton A is equivalent to the Mealy type automaton B if there exist functions fA: SA -+ S, and f,: S, -+S, such that for any word x E C+ we have:
(2)
0’s’ E S,)[S’, x ) E Dom(p) p(s’, x ) = h(fs(s’),x)].
2. Finite automata
42
Let two automata be equivalent in the sense of the above definition. For every state of either automaton there exists a state in the other automaton such that if we apply the same arbitrary input word to both corresponding states then as a result we get the same output symbol from both automata (if the one is defined). It is obviously possible to compare behavior of automata of the same type. This concerns a problem of automata construction such that automata with different number of states show the same output behavior. Here we do not specify precisely what an output behavior is, leaving it to one’s intuition. Formal definitions as well as methods of minimizing the number of states of deterministic complete and incomplete automata will be given in Chapter 3. Now we shall present mutual transformations of Moore and Mealy types of automata such that conditions contained in the definition of automata equivalence will be satisfied. Transformation of Mealy type automaton into Moore type automaton Let A =(SA, C, aA, Q, p) be a Mealy type deterministic automaton. An equivalent Moore type deterministic automaton B = (S,, C, a,, a, h) is constructed as follows: (1)
The set of states S, = S,,
(3)
The output function h: S, --+a: (s, w) E S ,, * (s, w) E Dom(h) A h(s, w) = a, s E S,, 3 s e Dom(h).
u S,,
2,
where:
2.1. Definitions of automata
43
Informally the set of states in automaton B is constructed such that every state s from S , is replaced with a number of states corresponding to all arrows, entering s on the diagram G(A). Figure 2.2 illustrates the method.
’W Fig.2.2. Part of diagram of Mealy type automaton and equivalent part of diagram of Moore type automaton
Transformation of Mealy model into Moore model of automaton usually increases the number of states. There are created states with the same value of transition function and with different values of output function. This property is useful to the reverse transformation of Moore model into Mealy model. In order to simplify a description of the reverse transformation we introduce now a relation E in S xS. Let A = (S, C, Q, y) be an automaton. For any (s, s’)E S2 we have:
a,
(sEs’)w (Vo E C)[ ((s, a), (s’, a))nDom(8) = 0 v a(s, a)= a(s’, a)]. It means that two states are in the relation E if for every input letter their successors (next states) are either both equal or both are undefined. Transformation of Moore type automaton into Mealy type automaton
Let A = (SA,C, a,, R, h) a Moore type deterministic automaton. An equivalent Mealy type deterministic automaton B = (S,, C, a,, Q, p) is constructed in the following way: (1) (2)
The set of states S, = {E(s)I s E SA]. The transition function :2, S,xC+S,; if S E S, then we have: (a) a,(s, 0)= S’ 3 aB(E(s),a)= E(s’), 0) 6)g Dom(8,) * (E(s), 0)g Dom(8,). ($9
44
2. Finite automata
Informally, transforming Moore model into Mealy model we move the output symbols associated with states onto arrows entering these states on the diagram of automaton. Example 2.2.
a,,
Construct a Moore type automaton B = (SB, C, a, h) equivalent to the Mealy type automaton A = (SA, C, dA, Q, p) specified with the diagram on Figure 2.3.
Fig.2.3. Diagram of Mealy type automaton A from Example 2.2
We get:
The transition and output functions of the automaton B are presented in Figure 2.4.
2.1. Definitions of automata
45
Fig.2.4. Diagram of Moore type automaton equivalent to Mealy type automaton from Figure 2.3 Example 2.3. Construct a Mealy type automaton B = (S,, C, a,, SZ, p) equivalent to Moore type automaton A = (SA, C, a,, R, h) specified with the diagram on Figure 2.5.
Fig.2.5.Diagram of Moore type automaton A from Example 2.3
46
2 . Finite automatu
We get:
The transition and output functions of the automaton B are presented in Figure 2.6.
Fig.2.6. Diagram of Mealy type automaton B equivalent to Moore type automaton from Figure 2.5
2.2. Automata without outputs
We may distinguish three basic blocks of an automaton when we think of it in terms of definition introduced in Section 2.1: (1) Memory of the current state. ( 2 ) Transition function. (3) Output function. The general structure of a Moore type automaton with respect to these blocks is shown on Figure 2.7. The memory of a current state on Figure 2.7 is simple. It means that a value presented at the memory input appears exactly at the output. Memory elements being used in practice are often more complex however, so that a different value is requested at the memory input in order to get the proper next state at the memory output. In that case we say that the transition function is given inexplicitly (see Figure 2.8).
2.2. Automata without outputs
47
~
I
State transition function
d(S,G)CS
1
~ € 5 Current s t a t e memory
2( S FR
O u i p u f function
Fig.2.7. General structure of a Moore type automaton
562
-
Curf-enf s*Qie memory and transiti on function
s
6s
Output
function
wrR +
Fig.2.8. General structure of a Moore type automaton with inexplicite transition function
The output function block, shown both in Figure 2.7 and in Figure 2.8, is a combinational block. It simply maps a set of states into a set of outputs. The sequential nature of an automaton is related to the transition function exclusively. Therefore the output alphabet and the output function of an automaton is discarded frequently in the automata theory. A model of an automaton as a triple (S, C, 3) is called an automaton without outputs or semiautomaton. We shall admit using the term automaton to mean semiautomaton if there is no ambiguity. In this section we introduce definitions and basic properties of important tools that are helpful for analysis of semiautomata structural characteristics. Also we give definitions of special classes of automata for which the valuable results have been obtained. 2.2.1. Functions preserving operations A function preserving operation or a homomorphism of automata A and mapping of the automaton A into the automaton B such that the behavior transition function of A is preserved. If both the set of states and the inputs are mapped then we say of a state-input homomorphism; if the states is mapped only then the mapping is called a state homomorphism.
B is a of the set of set of
48
2. Finite automata Let A=(S,, C ,,
a,),
B=(S,,
C ,,
a,)
be deterministic automata. A pair of
functions (hs, h a is a state-input homomorphism of automaton A into automaton B if:
The set of all state-input homomorphisms of automata A and B is denoted by HomXA, B). If (h,, h 3 Hom,(A, ~ B ) and both functions h,, h, are one to one and onto, then such homomorphism is said to be a state-input isomorphism. The set of all state-input isomorphisms is denoted by ISLA, B). Obviously ISLA, B ) c_ HomXA, B). In the case when A = B we say of sets of endomorphisms and state-input automorphisms, denoted by EXA) and G,(A), respectively. We shall prove that a set of endomorphisms EXA) together with an operation of superposition is a semigroup with identity, and that a set of automorphisms GXA) together with the operation forms a group. First we define formally the operation of superposition in EAA) and in GXA):
where h, o h,' and h, o h,' Then we have:
are superpositions of the respective functions.
and hence ((h, h,'), h, h,')) E EAA). Moreover the identity element (id(S,), id@,)) is in E,(A), and E,(A) c GXA). GAA), then there are functions h,-l: SA-+Se and h,-l: C,+CA If (h,, such that h, o hs-' = h,' o h, = id(S,) and h, o h,' = hx-' o h, = id@,). S O , for any state-input automorphism (h,, h a we have:
(hp h a 0 (hs-', h,')=
(id(SA), id@,)),
with (id(SA),id(C,))E GXA), so (h,-l, h,-l) is the inverse element of automorph-
2.2. Automata without outputs
49
ism (hs, h 3 , and finally G,(A) together with the operation o of superposition forms a group. If ZA=ZB for automata A and B, and the function h, of a homomorphism (hs, h 3 is the identity function, then the other function h,: S A - + S Bis said to be a state homomorphism. The set of all state homomorphisms of automata A and B is denoted by Hom(A, B). If hE Hom(A, B) then:
The set of all state isomorphisms of automata A and B, the set of all state endomorphisms of automaton A, and the set of all state isomorphisms of automaton A are denoted by Is(A, B), E(A), and G(A), respectively. A homomorphism which is onto is called a monomorphbm. Detailed discussion of homomorphisms is presented in Chapter 5. 2.2.2. Partitions and covers with the substitution property By a partition (resp. a cover) of an automaton A = (S, 2, a) we mean a partition (resp. a cover) of the state set S of the automaton A. Let x be a partition of an automaton A. We say that x has the substitution property if (Vs, s’
E
s)(v(3E Z)[s = s’(n)3 (s’,
(3)
= a(s’, (3)(x)I.
It can be easily proved that the above condition is equivalent to the one in which the set C is replaced by the set Z* of all input words. Let us denote by R , the equivalence relation induced by a partition x of an automaton A. If 7c has the substitution property then one can write
where s, s’ E S and x E C’. Any equivalence relation satisfying this condition is said to be a congruence in the state set of an automaton. Let us note that each congruence R in the state set of an automaton induces a partition with the substitution property, which will be denoted by 7cR. A partition with the substitution property will be called shortly an SP-partition. The set of all SP-partitions of an automaton A will be denoted by SPP(A). The partitions 0, and 1, are obviously SP-partitions. We shall show that the union and the intersection of SP-partitions are SP-partitions. Theorem 2.1. The set SPP(A) of all SP-partitions of an automaton A = (S, C, a), together with the operations of the union and the intersection of partitions, forms a lattice.
50
2. Finite uutomutu
Proof. The algebraic system (SPP(A), I), where 5 is the relation defined in Chapter 0, is a partially ordered set. For any nl,x,E SPP(A), the union n1+ 3 is the supremum of n1 and n2, and the intersection n1en2 is the infimum of n1 and n2. It suffices to show that n1+ n2 and n1.n2 belong to SPP(A). (1) The union of partitions. Two states s, s’ are congruent with respect to the partition n1+ n2, i.e., s = s’(nl+ nz), if
[ ~ ~ = s ~ +or~~(~n=~s ~) + ~ ( n 2 ) 1 ] . Let (sl, s2, have
..., sJ
E
S, satisfy the above condition. Then for any
0E C
we
where i E (1, 2 , ..., m - 1). Furthermore,
and hence a(s, 0)= a(s’, @(x1+ x2). ( 2 ) The intersection of partitions. By the definition of the intersection of partitions, we have
If the right-hand side of the above formula is true, then
Given an SP-partition x of an automaton A = ( S , C, a), one can define an automaton, associated with the partition x , which reflects the transition structure of the automaton A at the level of blocks of n. This automaton is denoted by A/x: and called the quotient automaton. Formally, A/n=(x, C, a,J where the state set contains the blocks of partition 7c, and the transition function a,: nxC +n is defined as follows:
2.2. Automata without outputs
51
In the above formula, R, is the congruence induced by the partition x, and R,(s) denotes the set of all states being in relation R with s, i.e., the block of partition K containing state s. The natural homomorphism of an automaton A onto the quotient automaton A h is the epimorphism &: S+x defined as follows: (VSE S)[h,(s)=R,(s)]. Let us verify that & E Hom(A, Alx). For any S E S, ( 3 C~ we have
The converse is also true. For any homomorphism h of an automaton A = (SA, C, )2, into an automaton B = (S, C, one can define the natural SP-partition of the automaton A with respect to the homomorphism h. Let h~ Hom(A, B ) . Let us define the equivalence relation R, in the set S, as follows:
a,)
For any G E C we have (SRhS’) W
* @,(h(S),
(h(s)= h(s’))
(3)
= a,(h(S’),
(3))
W
and therefore R, is a congruence in the state set S, and induces some partitions X h E SPP(A). The partition x:, induced by the relation R, is called the natural SPpartition with respect to the homomorphism h. Let us consider now the relation R,, where g e G(A), defined in the state set of an automaton A = (S, C, a) as follows: (sR,s’) w (3E N0)&’(s)= s’].
Since G(A) is a group, the relation R, is an equivalence relation. Moreover, for any O E C we have (g‘(s) = s’)
* (d(g’(s), 0)= d(s’, 0 ) )
and hence R, is a congruence in the state set S. Let us notice that if g e E(A) then R, is only a compatibility relation and induces some cover of the set S. If one studies the transition structure of an automaton jointly for all letters of the input alphabet, then representation of such a structure may be greatly facilitated by means of input-independent partitions of the state set. A partition x: is said to be input-independent if
2. Finite automata
52 (1) (2)
SPP(A), (VO, 0’E C ) ( ~ESS)[R,(a(s, 0)) =R,(a(s, o’))].
XE
The set of all input-independent partitions of an automaton A will be denoted by IIP(A). The set IIP(A), together with the operations of the union and the intersection of partitions, forms a sublattice of the lattice SPP(A). Note however that the partition O,, in general, does not belong to IIP(A). The last notion introduced in this section is a cover with the substitution property. A cover C of the state set of an automaton A = (S, C, is said to have the substitution property or to be an SP-cover if
a)
(VB E C)(VoE C)(3B’ E C)[&(B,0) G B ’ ] .
2.2.3. Sets of generators
In this section we shall define a subset of the state set of an automaton, such that it “generates” the automaton. First, it is necessary to consider some auxiliary notions. Let A = ( S , C , 3) be an automaton. The set of proper successors of a subset R c S is the set a(R) = &(R, Z+). By a@), where s E S, we mean the set &(s, C+), i.e., the set a((s)) of successors of the one-element set (s). The set of successors of a subset R E S is the set R u a(R)= &(R, C’). The set of successors of R will be denoted by a,@).
Now we shall introduce two opposite notions: the set of proper predecessors of R , and the set of predecessors of R. For a subset R c S , the set of proper predecessors, denoted by W ( R ) , and the set of predecessors, denoted by d-l,(R>, are defined as follows: (1)
(2) (3)
a-l(g) = a-1,(0) = s, (R f 0 )* (3-l (R) = [ s E S I a(s)
nR f 8)),
&*,(R) = R ua-l(R).
If d,(R) = S, then the set R is called a generator of an automaton A . The set
of all generators of an automaton A will be denoted by gen(A). A generator R E gen(A) is said to be an irredundant generator if R’ c R implies R’ P gen(A), i.e., if d,(R \ { r } )C S holds for every r E R. We shall prove in Section 2.6 that all irredundant generators of an automaton A are equipotent. Using already this assertion one can write that if R is an irredundant generator, then (VR E P&))[card(R’) < card(R)
R’ e gen(A)].
53
2.2. Automata withour outputs
Irredundant generators are frequently called minimal generators, and the set of all minimal generators of an automaton A is denoted by gen-,(A). 2.2.4. Subautomata
The literature on automata theory contains a good deal of various definitions of subautomata. Different authors have introduced different definitions with different names to satisfy different needs. We shall attempt to systematize all these notions and to provide some lacking ones. Let A = (S, C, a) be an automaton. First we shall define a quasi-subautomata of A , so that it may be used with various additional restrictions in the definitions of all types of subautomata. An automaton A’ =(S’, C’, 13’) is a quasi-subautomaton of an automaton A = ( S , C, if (1) S’CS,
a)
(2) C’cC+, (3) (V(s, o)E S’xC’)[(s, o) E Dom(3’) e a(s, o) E s’l, (4) a’ is the function a restricted to Dom(2’). ~ o)nS’#0], then If a subset S’ E P(S) satisfies the condition ( 3 0 C) S’ is called an input-dependent subset. A quasi-subautomaton A&’) = (S’, C ,, a,) is said to be a full quasi-subautomaton if S’ is an input-dependent subset and [@I,
Let us note that S’ must be an input-dependent subset so that the input alphabet C, of a fuIl quasi-subautomaton (S’, CQ,a,) is not empty.
a’)
a)
A quasi-subautomaton A’ = (S’, C’, of an automaton A = (S, C, is called a subautomaton of A if 8(S’, c ’ ) c s ’ . Then the transition function 3’ of A’ is the transition function a of A restricted to S’xC’. If A’ is a subautomaton of an automaton A, then we shall write A’ < A . A subautomaton A’ = ( S ’ , C’, 8’) of an automaton A =(S, C, a) is called a state subautomaton if C’ = C, and an input subautomaton if S’ = S. We shall call a subautomaton A’ = (S’, C’,3’) of an automaton A = (S, C, a) a full subautomaton of A if C’L C and
a).
Let R be a subset of the state set of an automaton A = (S, C, The state subautomaton A(R) = (a(R), C, 3) will be called the subautomaton generated by
2. Finite automata
54
set R. Obviously, A(R) is a full subautomaton of A . Furthermore, if R E gen(A), then A(R) = A . The above definitions do not exhaust all known classes of subautomata. Further definitions require a few new notions and will be introduced later on. A state subautomaton called a kernel of an automaton will be presented in Section 2.2.6. Autonomous subautomata will be defined in Section 2.2.7, and input subautomata associated with the change of operating time will be described in details in Chapter 4. 2.2.5. The direct sum nnd the direct product of automata
We shall define now two basic operation in the set of automata, which will be used in the sequel. Let A , = (S,, C,, a,) and A,= (S,, q,33 be automata. The direct sum of automata A, and A,, denoted by A , u A 2 , is the automaton B = (S,, C,, defined as follows. (1) s, = S, US,, (2) c, = c, u c, (3) Dom(3,) = Dom(3,j u Dom(3,) and moreover (s, a) E Dom(dij * o j = al(s, o) where i E (1, 2).
a,)
a&,
The direct product of automata is defined for automata whose input alphabets are equal. Let A , =(Sl, C, 2,) and A , = ( S , , C, 3J. The direct product of automata A , and A,, denoted by A,xA,, is the automaton C = (Sc, C, 3,) where: (1) S,= S,xS,, (2) (V(S, s’)E S,xS2)(Vo E C)[3&, s’), a)= (a,(& 01, d,(S’, 0111. 2.2.6. Connectedness of automata
The notion related to connectedness of automata are applied in almost all areas of automata theory. An automaton A = (S, C, a> is connected if for every pair (s, s ’ j of states s and s’ there exists a sequence of states s,. s2, ..., ,s such that: (1) s1 =s, (2) s,=s’, (3) ( V ~ E11, 2, ..., m - 1 ) ( 3 0 C~) [3(si, o)=si+,or a(s1+,, oj=s,].
a’)
A full subautomaton A’ = (S’, C’, is a component of an automaton A if: A’ is a connected automaton, (1) (2) (S” c S’)* A ( S ” ) is not a connected automaton, where A(S”) is the subautomaton of A generated by S”.
2.2. Automata without outputs
55
The state sets of components of an automaton are disjoint. If A , , A,, ..., A,,, are all the components of an automaton A , then A , u A , u ... u A , = A . In the class of all connected automata we distinguish the subclass of strongly connected automata. An automaton A = (S, C, d) is strongly connected if (V(S, s’)
E
P(3x E c*)[d(s, x j = s’]
A strongly connected state subautomaton of an automaton A will be called a kernel of an automaton A .
A state s E S is a retrievable state of an automaton A = (S, C, d) if (VCJ E C)(3XE Z’>[d(s, ox) = s].
Let us notice that a kernel of an automaton contains only retrievable states. We shall consider now the following equivalence relation R,, in the set of states: sRs,s’ (s’ E d,(s)&s E d,(s’)). In other words, sRs,s’ if s and s’ are mutually reachable. The relation R,, is called the relation of strong connectedness of an automaton and the partition X ~ S Cinduced by R,, is called the partition of strong connectedness. A class B of the relation R,, is an initial class of an automaton A if d ( S \ B ) n B = @ Note that for each block C of the partition $sc such that C is not an initial class there exists an initial class B such that C c d ( B ) . This implies that R C S is a generator of an automaton A if (VB E nRsc)[(Bis an initial class) + (R nB f @I. Furthermore, from the definition of an initial class it follows that R is an irredundant generator of A if R contains exactly one element from each initial class of A. This means that all irredundant generators of an automaton are equipotent and are minimal generators. Theorem 2.2. Let nRsc be the partition of strong connectedness of automata A = (S, C, a). For every block B E nRsc there is x E C+ such that 8 ( B , x) contains a state belonging to a kernel of A.
Proof. Suppose that the theorem is not true. Let B be a block of the partition nRsc such that for all X E C+ the set &(B, x) contains no state belonging to a kernel of A . Then there exist an infinite sequence CJ,, 02,..., o,,... of in ut letters and an infinite sequence B , , B,, ..., B,, ... of blocks of the partition d s c such that: (1) B , = B , ( 2 ) B , f B , + l for i E (1, 2, ...), (3) @,. oi)nB,+, # 0 for i E (1, 2, ...I. Expressions (2) and (3) show that no block in the sequence B , , B,, ..., B,, ...
2. Finite automata
56
is a set of states belonging to a kernel of A . Note, however, that there must exist j, k~ 11, 2, ...) such that: (4) B , = B j , ( 5 ) k =j + m, where m > 2.
Hence, we get
and so d(s, oj)E ns&). At the same time we have a(s, o j ) e Bj+l. From the definition of the partition of strong connectedness it follows that Bj = Bj+l which contradicts the assumption (2). Q.E.D.
Corollary 2.1. Every automaton A = (S, C, Theorem 2.3. Let B = (S,, C,, Z, a). Then
s,=
a) contains at least one kernel.
a) be a full subautomaton of an automaton A = (S,
v nRsc(s), SE
s,
where zRsc is the partition of strong connectedness of automaton A. Proof. For any subset S' we have v R,,(s).
S'
S E S'
Denote by T the set
Suppose that s1 E T. Then there exist s2 E S, and x , y E C+ such that &s,, x ) = s1 and 13(s,, y) =s2 Thus we have a(s,, xy) = s2. From the definition of a full subautomaton it follows that xy E C,+. Let xy = 01rs2...rs where , ol, rs2, ..., o, are letters of the input alphabet C,. If x y C,+, ~ then (Vi E ( 1 , 2, ..., m ) ) [ o i EC,].
and so
XE
Z,+.
Hence &s,, x ) E S, which contradicts the assumption that s1 E 7. Q.E.D.
2.2.Automata without outputs
57
2.2.7. Autonomous automata
An automaton is called autonomous if its input alphabet is a one-element set. Let us consider an autonomous automaton A = (S, (o),a). Suppose that A is the direct sum of components A , = (s,, (o),d1), A, = (sz, (a),dd, ..., A,,, = (S,,,, {o},d,,,). For each component Ai the state set Si can be divided into two disjoint subsets: Si, = (s E Si i (3k E N)@(s, ok)= $1) and Si, = Si \ Si, c .
The set Si, is called the cycle of component Ai, and the set Si, is called the tail of component Ai. For the cycle of a component we have card(&, ,) > 1, whereas the tail may be empty. The number of elements in the cycle of a component Ai is called the length of the cycle Siv and is denoted by dc(Ai). If d is the length of the cycle of component A;, then d is the least natural number such that ('ds E Si,,)[3(s,od)= s]. Let S E Si. Then the level of state s is defined to be the least number V E No such that d(s, o " ) Si, ~ c. It is assumed that d = e . If the level of a state s is equal to v, then we say that the state s belongs to the v-th level of a component. The states of each cycle belong to the zero level; The greatest number in the set of the lengths of all states S E Si is denoted by v(Ai). We shall say that the numbers &(Ai) and v(Ai) characterize the component Ai of an autonomous automaton. The union of the cycles (resp. the tails) of all components of an autonomous automaton is called the cycle (resp. the tail) of the automaton. Let A = (S, C, 3) be an automaton. We shall define the notion of an autonomous factor and give some characterization of automaton A . An autonomous subautomaton (S, (o), d) of automaton A , where o E C, will be called an autonomous factor of automaton A . The autonomous factor associated with a letter d will be denoted by A,. Thus A , = (S, [o], An autonomous subautomaton (S, {x), 3) of automaton A , where X E C+,is called an extended autonomous factor of automaton A. The subautomaton (S, {x), a) will be denoted by A,.
a).
Suppose that C = (G,,02, ..., o n ) .Let us define numbers k , m as follows: (1) k = max(v(A,,,) I I E ( 1, 2, ...n)&(A, is a component of AoL)), (2) m = lcm(d,(A,, ,) I I E (1, 2, ...n)&(A,, is a componcnt of A , J ) . The above defined numbers k and m are the least numbers satisfying the following condition:
, ,
(VG E C)(VS E S>[d(s, ok)= a<s, okfm)].
2. Finite automata
58
We say that the numbers k and m characterize asynchronism of automaton A which will be called (k,m)-asynchronous. 2.2.8. The characteristic semigroup of an automaton
The characteristic semigroup of an automaton is related to right congruences in the set C proposed by Myhill and Nerode. Let A = (S, Z, a) be a complete DFA. Given a state s E S, the Nerode relation in the set C* of all input words, denoted by ==, is defined as follows: (x zSy)H @(s, x) = a(s, y)). Of course, the relation =s is an equivalence relation. Moreover, for any z E C’ we have (x =y)3 (a(s, xz) = a(s, yz)) w (xz =yz). and so =s is a right congruence. The Myhill relation, denoted by =, is similar to the Nerode relation. It is required, however, that the condition defining the Nerode relation should hold for every state. We define 3 as follows: (x = y) w (Vs E S)[d(S, x) =
a($, y)l.
Using the Nerode relation we get (x = y) w (VS E S)[x =yj3 (Vs E S)[xz =yz]w (xz = yz)
for any
ZE
C*. Thus the relation
= is also a right congruence.
The equivalence classes of the Nerode relation and of the Myhill relation are denoted by [XI= and [XI. respectively, and the set of all equivalence classes of these relations are denoted by C*/==and C*/=,respectively. For any X E C* and s E S we have [XI c [XI,.It is easy to see that the indices of both relations are for the finite and not greater than card(s) for the Myhill relation, and card(s)cud(Id(s) Nerode relation. o [yj = [xyl In the sets E*/=and C+/=we define the operation o as follows: [XI for any [XI, [yj E C*/=.The operation o is well-defined, since if x’ E [XI, y’ E [y], then for any S E S we have
which means that x’y’ E [xy]. The set Z+/= together with the operation o forms a semigroup, which is called the characteristic semigroup of an automaton A and is denoted by f(A). is the set The characteristic monoid of an automaton A, denoted by fe(j), C*/=with the operation o.
2.2. Automata without outputs
59
For a given automaton we define the set F(A) of all transition-generated functions f,: S -+S, where x E C+,as follows:
The function f, will be written as a left operator, and hence f, 0fy =fyx.-T_heset of all transition-generated functions and the characteristic semigroup I(A) are equipotent because (y E [XI a (fr =fJ. The following stronger statement is true: the semigroups f ( A ) and F(A) are anti-isomorphic. Let g([x]) =f,. Then, we have:
which means that g is an anti-isomorphism. We shall present now an algorithm of constructing the implication diagram of the characteristic monoid of a given automaton A = (S, C, a). Let n denotes the number of states of an automaton A, i.e., n=card(s). We shall extend the transition function a to the set SnxC*as follows: for any r = (rl, r2, ..., rJ E Sn and x E Z* we put d(r, x ) = (d(rl, x), $r2, x), . .., a(rn,x)). Let vo = (sl, s2, ..., s,,) be an ordering of the state set S of an automaton A. Then the implication diagram of the characteristic monoid of A is defined as follows: (1) V = {d(vo, x ) I X E C*) r S n is the set of vertices, (2) for every Y E V and C T EC there is a directed edge labeled with (3 leading from v to a(v, 0). Algorithm 2.1 Input: A complete DFA A = (S, C,-a). Output: The implication diagram of the characteristic monoid r,(A). Step 1: Put n=card(S). Step 2: Fix an arbitrary ordering vo = (sl, s2, . . ., sJ of the set S. Put V = {vo). Step 3: Find a vertex V E V with no outgoing edges. If there is no such vertex, then go to Step 6. Step 4: For the vertex found in Step 3 and for all C T EC carry out the following operations: (a) compute v’ =a(v, CT), (b) if v’ e V , then add v’ to the set V, (c) if there is no directed edge (v. v’) on the diagram, then add it, (d) label the edge (v, v’) with CT. Step 5: Go to Step 3. Step 6: STOP. The set V of vertices of the implication diagram depends on the choice of the ordering yo. However, the diagrams obtained for any vo’ and yo” are isomorphic.
60
2. Finite automata
The implication diagram is useful in finding the characteristic semigroup f(A) and the semigroup F(A). If a(vo, x) = a(vo, y) holds for a vertex vo E V , then x and y are related by the Myhill relation, i.e., x = y , and hence f,=f,. Suppose that v1 = a(vo, x), v2=a(v0, y) and there is a sequence of edges identically oriented, labelled by ol,oz,..., om, such that the first edge is going from v1 and the last .a,,,by z, then [XI o [zl = [yl and f,0f, = one is coming to v2. If we denote 0102.. fY.
Fig. 2.9. Diagram of the automaton of Example 2.4
Example 2.4.
Let us find the implication diagram of the characteristic monoid and the characteristic semigroup @) of an automaton A = ( S , C, a) whose transition diagram is given in Figure 2.9. We put v o=( a, b, c). Next, using the transition Qagram of automaton A, we obtain: a(v,, O)=(b,a, b ) = v l , a(v,, O)=(a, 6, a)=v,, a(v,, O)=(b, a, b)=v,, d(V,, O)=( b , a , b)=v,, 3(v4, O)=(a, b, u)=v,,
&v0, l)=(c, b, a)=v,, d(v,, l ) = ( b , c, b)=v4, a(v,, 1)= (c. b, a)=v,, 2(v3, l ) = ( c , b, a)=v,, d(v4, l ) = ( b ,
C,
b)=v,.
The implication diagram of the characteristic monoid is given in Figure 2.10, and the characteristic semigroup of automaton A in Table 2.3.
2.2. Automata without outputs
61
Fig. 2.10. The implication diagram of the characteristic monoid of the automaton from Figure 2.9 Table 2.3. The characteristic semigroup i(A) of the automaton from Figure 2.9
The characteristic semigroup of an automaton does not identify the automaton even at the homomorphic image level. In Chapter 5 such automata A and B are presented that their characteristic semigroups are isomorphic and at the same time Hom(A, B ) = 0. The following theorem describes relationship between the characteristic semigroup of an automaton and its state subautomaton.
Theorem 2.4. Let A = (S, C, a) be a complete DFA and let B = (SB, C, 3) be a state subautomaton of automaton A . Let the function f: @) -+f(B) be defined by
where 1x1, and [xIB are the equivalence classes of the Myhill relation for automata A and B , respectively. Then f is a homomorphism of f ( j )into @). Proof. It suffices to show that the function f is well-defined, i.e., Y E [XI,* Y E [&. We have
2. Finite automata
62
cy E [ X I A ) * (Vs E S)[d(s, =3 (Vs E
S,)[d(S,
x ) = acs, y ) I j x ) = d(s, y)] cy E [XI,).
*
Q.E.D.
2.2.9. Selected classes of automata
In this section we present definitions of selected classes of automata which play a significant role in the structural theory of automata. (1)
(2)
(3)
(4)
An automaton A = (S, C, if d(S) = S.
a) is an onto automaton if
&S, C) =S, i.e.,
An automaton A = ( S , C, a) is a cyclic automaton if the condition presented below is true in one of the following equivalent forms: (a) ( 3 S E S”s) E genmi#)I, (b) (RE geGh(A) * (card@) = 11, (c) (3E s>ra,<s> = SI, (d) ( 3 s S)[A(s) ~ =A]. An automaton A=(S, C, a) is a permutation automaton if the condition presented below is true in one of the following equivalent forms: (a) (tl(s, S ’ ) E P ) ( V O E C)I(s*s’)* @(s, ~ ) f a ( s ’ , o))l, (b) (Vo E C”(S, 0)= SI, (c) (VO E C)[A, is an onto automaton], (d) (’doe C)yb. is a permutation of S ] . An automaton A = (S, C, a) is an asynchronous automaton if it is a (1, 1)-asynchronous automaton, i.e., if (VGE Z)(VSE 5’) GO)=
[a($,
a(s, OH. (5)
An automaton A = (S, C, a) is a controllable automaton if there exist k~ M such that (tlm E N)(tl(s, s’)E S z ) [ ( m> k ) ( 3 x E C+)[(bl = m)&(d(s,x ) = s’)Il.
*
(6)
An automaton A = (S, C, 8) is a quasi-controllable automaton if there exist k E M such that (tlm E N)(tl[x] E f(A)) [(m> k ) 3 (3y E Cm)
“Yl (7)
= [xlll.
An automaton A = (S, C, a) is a state-independent automaton if for every S E S the Nerode relation =s and the Myhill relation = are identical for A, i.e., if (Vs, s’ E S)(VX, y E C’) [a(& x ) = acs, y) * a@’,x ) = qs’, y)l.
2 2 . Automata without outputs
63
(8)
An automaton A = @ , C, a) is an abelian automaton if (Vx, Y E C+) (Vs E S)[d(s, x y ) = a(s, y x ) ] , i.e., if the characteristic semigroup of A is abelian.
(9)
An automaton A =(S, C, 3) is a group-type automaton if A is a state-independent automaton and the characteristic semigroup is a group-
a)
(10) An automaton A = (S, C, is a quasi-perfect automaton if A is a group-type strongly connected automaton.
a)
is a perfect automaton if A is a strongly (1 1) An automaton A = (S, C, connected abelian automaton. (12) An automaton A = (S, C, a) is a total automaton if the order of the automorphism group G(A) is equal to the number of states of A. 2.2.10. Pair-rype notation of automata To conclude the presentation of various concepts related to automata without outputs, we shall introduce the pair-type notation of automata. In Section 2.2.8 we have defined the set of all transition-generated functions of an automaton. We have shown that the set F(A) of all transition-generated functions, with the operation of the superposition of functions, forms a semigroup which is antiisomorphic with the characteristic semigroup of an automaton.
Let A = (S, C, a) be an automaton. It is easy to see that F(A) is generated by the set J(A) = ValCTEC) where fa is the transition-generated function for 0. Thus, we have c l ( A ) > = F ( A ) . This means that an automaton can be defined by the state set and the set J(A). Therefore, in some applications we shall use for an automaton the pair-type notation (S, J) where S a nonempty finite set of states, and J is a set of functions mapping S into S. All definitions presented so far in the triple-type notation can be easily transformed to the pair-type notation. To illustrate correspondence between both notations, we shall give few examples. Let A = (SA, J) and B = (SB, J) be automata. A function h: S, -+ S, is a homomorphism of automaton A into automaton B if (VsE SA)(v’€J) [hf(s) =fh(s)]. An automaton A = (S, J) is strongly connected if for any (s, S’)E S2 there exist f~ <J> u [ id(s)) such that f(s) = s’. An automaton A = (S, J) is a permutation automaton if J is a set of permutations of the state set S.
64
2 . Finite automata
2.3. Acceptors of regular languages
In this subchapter we show that fiite automata recognize the class of regular languages. Furthermore, we prove that two-way automata are equivalent, in the sense of recognized languages, to one-way automata. 2.3.1. Rabin-Scott automata A deterministic Rabin-Scott automaton is a tape acceptor (S, C, a, so, F), where S is a finite nonempty set of states, C is an alphabet, 3: SxC+S is a transition function, S,,E S is an initial state and F rS is a set of final states. It is assumed that the Rabin-Scott automaton, called in the sequel the RSautomaton, has only an input tape and that the head moves only to the right. Furthermore, we assume that the alphabet C consists of only input symbols, because the function a changes only the state of the automaton without possibility of writing on the output tape. With these restrictions the RS-automaton can be viewed as a Moore type automaton with a distinguished initial state and the output function defined by the set of final states, for instance in such a way that C l = ( O , 1) and ( 1 ) s ~F e k ( s ) = 1, (2)s e F H h(s)= 0. In the sequel we ignore the fact of .the existence of the input tape and we focus our attention only on the transition function as in an ordinary automaton. If A = ( S , C, 2, so. F ) is an RS-automaton, then the set L ( A ) = ( X E C+la(s,, x ) E F ) is the language recognized by A.
By a nondeterministic RS-automaton we mean an automaton (S, C, a, so, F), where S , X, so and F are defined as for a deterministic RS-automaton, and 3 is a transition relation, a E (SxZ)xS. Similarly as for nondeterministic Moore and Mealy type automata we assume that 3(s, Q) denotes the set of states being in the relation 2 with the pair (s, (T), where S E S and (TE Z. The above definition of nondeterministic RS-automaton is a basic one. We show later that if we allow (1) the existence of more than one initial state, (2) nontrivial transitions by means of the empty word, then such a model is equivalent to a nondeterministic model in the sense of the recognition of languages. For a nondeterministic RS-automaton A we define: L(A) = ( x E C' I a(s, x ) nF f 0).
On the state diagram of an RS-automaton the initial state is marked by arrow and final states are indicated by a double circle.
65
2.3. Acceptors of regular languages
We present now the subset construction algorithm which for a given nondeterministic RS-automaton A = ( S , C, a,, so, FA) generates an equivalent deterministic RS-automaton B = (Q, C, qo, F,), i.e., such an automaton B that L(B) = L(B).
a,,
Algorithm 2.2. (Subset construction) Input: A nondeterministic RS-automaton A = (s,C, so9 FA). Output: A deterministic RS-automaton B = ( Q , C, a,, qo, F,) such that L(B) = L(A). Step 1: 40= (so), Q: = (qo),Dom(3,): =0, F,: =O. Step 2: If there exist a state 4 E Q and a letter o E C such that (4, o)E Dom(d,), then go to Step 3, otherwise go to Step 7. Step 3: Add SA(4, o) to the state set Q; ( Q c P ( s ) ) . Step 4: Add (4, 0)to Dom(a,). Step 5: Put &(4, o)= S A ( 4 , 0). Step 6: Go to Step 2. Step 7: For each state q E Q if 4 nFA# 8, then add 4 to F,. It can be proved by induction on the length of the word that for each X E C* there holds a,(q,, x)=dA(so, x). The last equality and Step 7 of the algorithm yield L(A) = L(B).
Example 2.5. Let a nondeterministic RS-automaton A = (S, (0, l ) , a,, so, F A ) be given by a diagram presented on Figure 2.1 1. The equivalent deterministic RS-automaton B = (Q, (0, l}, a,, qo, F,) is constructed in the following way:
0
0 7
Fig. 2.11. Diagram of the nondeterministic automaton from Example 2.5
66
2 . Finite automata
Fig. 2.12. Diagram of the deterministic automaton B equivalent to the nondeterministic one from Figure 2.11 One should notice that the subset construction does not ensure chat the obtained equivalent automaton is minimal, i.e., that it has the minimal number of states and accepts the language L(A). To obtain the minimal automaton, after the subset construction one should use automaton minimization algorithm presented in Chapter 3.
Let us suppose that in a nondeterministic automaton A we replace a single initial state so with a set So of initial states such that S o ~ S .The language accepted by A is defined as the set L(A)= ( X E C I 8(So, x ) n F # @ ) , i.e., if So = ( sl, s2. ..., s,), then L(A) = Ll(A) u L,(A) u . .. u L,(A), where L,(A) = { X € Z*Id(S,, x ) n F ? + 0 ) . For this automaton we can construct an equivalent nondeterministic RSautomaton. Let A = @ , , C, a,, So, FA) be an automaton with more than one
2.3. Acceptors of regular languages
67
Considering the problem of the synthesis of automata accepting the regular languages it is convenient to admit nontrivial transitions with respect to the empty word e, i.e., these transitions for which (s) ca(s, e). For such automata as these we define the empty closure a*(s) for any state S E S in the following way:
a”($)= a(s, e ) u a(s, ee) u a(s,
eee) u ...
Let A = (SA< C, aA, So, FA) be a nondeterministic RS-automaton with nontrivial transitions with respect to the empty word. An equivalent nondeterministic RSautomaton B = S (, C, qo, FA) such that ( V ~ S G ,)[a,(s, e ) = {s)] can be constructed as follows: (I) S,=SA, ( 2 ) 40=sO, E C)[a,(s, 0)= a L ( a A ( J A * ( s ) , 0))I (3) (tfsE S&’0 (4) FB = FA. In order to calculate a&, 0) we define at first the set aA*(s) of states reached from s before putting the letter o, i.e., only by the sequence of empty words. Next, we put to a,*(s) the letter (3 and at last, after executing the transition, we calculate again the empty closure.
a,,
For a given automaton A, nontrivial transition with respect to the empty word make possible to define an automaton B such that: (1) L(B) = L(A), ( 2 ) B has only one initial state and one final state. Let A = (SA, C, a,, So, F ) be a nondeterministic RS-automaton. An equivalent automaton B = (S,, C, a,, so, is constructed in two steps: (1) we construct an automaton A’ = (SA’, .C,dA’, so, F ) equivalent to the automaton A but with one initial state so, (2) we construct an automaton B equivalent to A’: (a) S, = s A ’ u (b) ( v E~SA’ E C)[a,(s, 0)= a ~ ’ ( s ,011, (c) (SE SA’ \ F A ’ ) = ( a B ( s , e ) = d A ’ ( s , e)). ( 4 (s E FA’) = m .
m)
m,
*
2 , Finite automata
68 2.3.2. Synthesis and analysis of RS-automata
In Chapter 1 it was shown that a regular language can be described by a regular expression. We will show that for any regular expression r there exists a Rabin-Scott automaton accepting the language represented by the expression r . Let X be an alphabet. Let us recall that e, 0 and elements of C are elementary expressions in C. Any expression r is formed by the elementary expressions using a fiiite number of the operations of sum +, concatenation and closure ()*. To prove the truth of the thesis formulated above it suffices to define constructions of the following automata: (1) A, such that L ( A , ) = L ( e )= {e), (2) A, such that L(A2) = L(0)= 0, (3) A, such that L(A3 = L(o)= (6) for any 6 E C, (4) B such that L(B) = L(rl + r2) for any regular expressions r l , r2 being in C, (5) C such that L ( C ) = L ( r , 'r2) for any regular expressions r,, r2 being in
-
X,
(6)
D such that L(D) = L(r') for any regular expression r being in C.
The diagrams of the automata A , , A, and A, are presented on Figure 2.13. For the expressions r l r r , and r appearing in the conditions (4), (5) and (6) we assume that there exist automata AT1,A , and A, accepting the languages L ( r J , L(rJ and L(r), respectively, such that each of them has exactly one initial state denoted by so and one final state denoted by f. The correctness of this assumption was proved in Section 2.3.1. Diagrams of automata B, C and D accepting L(r, + r J , L(r, -rZ> and L(r*) are presented in Figure 2.14. Let us notice that L(r, + rJ = L ( r l )u L(r2) and L(r, r2) = L(r,) .L(rz), hence the regular languages are closed with respect to the operation of the sum and concatenation.
-
Automaton A7
Automaton A2
Automaton A3
Fig. 2.13. Diagrams of automata recognizing ( a ) the language (e), (b) the empty language 0, ( c ) the language (6)
69
2.3. Acceptors of regular languages
A u toma ton Ar2
=@ Automaton A,,
Automaton A 9
\
Automoton A r
Fig. 2.14. Constructions of automata accepting: (a) L(r, + rd, (b) L(r, .r2), (c) W’) Let a regular language L r C’ and an automaton A accepting L be given. There exists a deterministic automaton A’ = (SA’, I;, aA’,so’, FA’) such that L(A’)= L . We define a deterministic automaton B =(,YE, C, a,, qo, F,) in such a way that S, = SA’ a, = aA’,qo = so’, F, = ’S, \FA’. The automaton B accepts the complement
70
2 . Finite automata
of the language L, i.e., L(B)= (XE C*~ x Le ) = L is a regular language. he constructions for the sum of languages and for the complement of language allow us to obtain an automaton accepting the intersection of languages. From the fact that if L , and L2 are languages, it follows that L, nL,= (L, u id. For a given automaton A we present a method of construction of a regular expression r such that L(r) =L(A). However first we will prove the following: Theorem 2.5. Let X, p and q be regular expressions and let e E L(p). Then X = qp* is a solution of the equation X = Xp + q. Proof. We have the following sequence of equalities:
x = x p + 4 = (Xp+ 41P + 9 =xp2 + qp + 4 = (XP+ q1p2 + 4P + 4 =xp3 + qp2 + qp + p = (Xp+ q)p7 + qp2 + qp + p = xp4 + qp3 + qp2 + qp + q = ... Therefore for any iE
Nowe
have
x = X p l + l + qp’ + qp-1 + ... + qp + q. Suppose first that X E L(x) and lxl=i. Because e E L@), then (Vy E L(Xpi+*)) + .. . + qp + q), which means that X E L(qp*). Assume now that x E L(qp*) and Lxl= i. It follows from
[IyI > i + 11, and hence x e L(Xp+l). Thus x E L(qp’ + qp-l
x=xp+1+qp’ +qp-’ + ... + qp + q that X E L Q .
Q.E.D.
Theorem 2.5 will be used to solve the system of equations describing the regular expression representing a language accepted by a given automaton A = ( S , C, 3, so, n. Let us assume that the automaton has no nontrivial transitions with respect to the empty word. Let for each state S E S the symbol rs denote a regular expression such that L(rs)= { x E C*I &so, x ) = s). Then L(A)=
u L(rs). SE
F
2.3. Acceptors of regular languages (s = sa)
* rs = rslol+ rs202+ ... + rs4sp,,+l + e.
71 (2.4)
Relations (2.2) - (2.4) make possible to form a system of card@)+ 1 equations whose solution is a regular expression r such that L(r) = L(A). Example 2.6.
Give a regular expression r representing the language accepted by a nondeterministic RS-automaton A from Example 2.5 defined by the diagram presented on Figure 2.12. We construct a system of equations:
rsl = rso a 0 rs2= rs2.O
+ rsl . 1
r = rs2
Let us substitute rsl from equation (2.6) to (2.5) and calculate rso: rso = rsO.0 + rso.Ol + e, rso = rso(O+ 01) + e,
rso = e (0 + 01)*= (0 + 01)'. From (2.7) - (2.9) we obtain: r = r .O + rso.01, r = r . O + (0+ 01)*01, r = (0 + 01)*01O*
Let us consider relations between regular grammars and RS-automata. Let A = ( S , Z, 3, so, F ) be an RS-automaton. We construct a grammar GM,(A)=(S, C, P, so) for which the set P of productions is defined as follows:
(1) (2)
((s, (SE
o)E Dom(8)) w ((s, 3(s, o)o)E P, i.e., s -+ 8(s, o)o), F) e ( ( s , e) E P , i.e., s+e).
2. Finite automata
12
The grammar GM,(A) is a left linear grammar, and hence it is a regular grammar. It can be easily observed that the words from the set (Su C)* generated or x, where x E %* and s E S. Additionally, if by this grammar are of the form there exists a sequence of productions such that so +xs, then a($,, x ) = s. Converply, if a(s0, y) = s’, then there exists a sequence of productions such that so +ys’. The word containing only the final symbols can be obtained if and c$y if soPxs, where s E F. Then we use the production s +e and we obtain so --+x. Hence L(GM,(A)) = L(A).
-
Let us suppose now that a right linear grammar G = ( N , T, P, p) is given. We construct a Rabin-Scou automaton A, = (N, T, a, p, F ) such that L(A,) = L(A) in the following way: (1) (p +aB is a production in P ) (a(p, a) = B), ~ (2) (p + e is a production in P) e ( p F). 2.3.3. Two-way automata
a,
By a deterministic two-way automaton we mean a 5-tuple (S, C, so, F), where S is a nonempty finite set of states, C is a nonempty finite alphabet, a: SxZ+ S x ( L , R ) is a transition function, so€ S is an initial state, F rS is a set of final states. L and R denote left and right direction of moves of the head. Twoway automata will be denoted shortly by 2-DFA. Two-way automata are a generalization of RS-automata in the sense that we allow the moves of the reading head to the left. The other restrictions such as: a finite set of states, the absence of the working tape and the prohibition of writing on the input tape are preserved. We assume, without a loss of generality, that the input word contains as the most left symbol the empty symbol #. A two-way automaton controls the reading head in the way presented below (Figure 2.15).
4
Two - way automaton Fig. 2.15. Two-way automaton
2.3. Acceptors of regular languages
73
Let us assume that there is a word ~ = o ~ o ~ . . . o ~ , o , qon+ ~the . . .input o ~ tape and let us suppose that the head reads the cell i , and when the automaton is in the state s. Let a(s, oJ= (s', M), where M E (L, R ) . The automaton changes the state s to s' and moves the head one cell to the left, if M = L or one cell to the right, if M = R. The automaton halts if the head moves off the input tape to the left or to the right, i.e., if it reaches the symbol #. We say that the input word is recognized by a two-way automaton when being in the state so the automaton reads the first letter o1 of the word, and it halts if the head reads the blank from the right of the word in any state from F.
To simplify further considerations we define the notion of a configuration for an acceptor of 2-DFA type. A configuration of a two-way automaton A = (S, C, 13, so, F) is a triple (x, s, y). where x , y E (C u (#))* and s E S. The automaton is in the configuration (x, s, y) if xy is the word written on the input tape, the head reads the fist cell of the word y -and the automaton is in the state s. In the configuration ( x , s, #) the automaton reads the blank symbol #. A Configuration (xoa,s, 00)is in the relation 3 with the configuration ( x , s', o a o ~if) a(o,, s) = (s', L). Analogously, if a(ob, s) = (s', R), then the configuration (xoa, s, 00) is in the relation 3 with the configuration (x(Taob, s', y). From the above discussion it follows that the automaton stops if it is in the configuration (x, s, #) or (#, s, #x), where X E C and S E S. Let lgbe a reflexive and transitive closure of the relation 3. For any configuration K we have that K3K. Furthermore, if K, and K,,, are configurations, then Kl+Km if there exist K2, K 3 , ..., K,,,-, such that
The language accepted by the two-way automaton A is the set L(A) = { x I (3s E F) "#, so,
X)*(X,
s, #)I)*
We will show next that the class of languages recognized by 2-DFA is equal to the class of all regular languages. It is obvious that if L is a regular language, then L is recognized by an automaton from the class 2-DFA because an RSautomaton is a special case of 2-DFA. Let A = (S, C, a, so, F) be a two-way automaton. For each word X E C' we define the final function f,: S u (#, @ ) 4S u (#, @ ) using the following five formulae:
The next three formulae we first describe informally. The value of the function fx(s), where S E S and x=o,c~~...o,,, is a nonempty word in the alphabet C, denotes the result of the action of the automaton starting from the configuration
2. Finite automata
14
(a1a2...a,l, s, a,,,), i.e., from the configuration in which the automaton reads the last letter of the word x in the state s. If the automaton halts to the right of x in the state s’, then we assume that f,(s) =s’. If the automaton halts to the left of the word x , we assume that f,(s) = #. Finally, if the sequence of configurations of the automaton is infinite, we take f,(s)=@. Thus, if S E S and x =x’a, where x’ E C’, G E C., then
(3) f,(s) = s’ c3 (x’, s, a)*(x, s’, #), (4) &(s) = # @ (3s’ E S)W, s, o)*(#, s’, (5) f,(4= @ Ws’E s)[cf,(s) f s’)&Y;(s)
#4, WI.
It can be easily observed that the set of all final functions is finite because the set S of states is finite. Let us denote by g A the set of all final functions of the automaton A. Now we give a method of calculation of final functions. Let us suppose that for X E I;’ the function f, is known. We define the value of f,(sl) for a E C and s1 E S . If &s,, a) = (s’, R), then fxu(sl) = s’ does not depend on the function f,. If a@,, a)= (s’, L), then three c a m are possible: (a) fx(sl ’1= # and then fxo(sJ = #, cb) fx(s,’)= @ and then fm(s,) = @,
(c) &(sl’)=szis in S and hencefm(s,)=fm(s2).
Thus we have: a(s,, a)=(sI’.L)qf,(s& In cases (a) and (b) the value fxu(sl) is given directly. In case (c) we ought to continue the analysis which in the worst situation leads to the sequence of equalities: fXu(sl)=fxo(s2> = ... =fx,(s&, where for certain i < k < card($) we obtain si = sk, which means an infinite looping of the = @. head in the word x and implies f&) The above relations between the function f,, the letter a and the function f,, will be denoted by a binary operation o such that f, o a =fxr Theorem 2.6. If A = (S,I;, 3, so. F) is a two-way automaton, then there exists a deterministic RS-automaton B = S (, C, qo. F,) such that L(B) = L(A).
a,,
3,x.S~{#, @], qo=(fe,so). F B = S A x F . For each ition function 3, is defined as follows: (1) a,(#* a)=#, (2) a,(@. a)=@, (3) (vf gA)Fs 8:
Proof. Let S=,
if cfo o)(s) E S if (foa)(s) = # if (foa)($ = @.
C T EC
the trans-
2.3. Acceptors of regular languages
75
We shall show by means of the mathematical induction for each X E C* that if (#, so, x)J(x, s, #). then for the automaton B we have dB(qo, x ) = VX,s). The proof will be given for words of the length n equal to 0, 1, ..., i, ... . (1)
(2)
(3)
a&,,
n = 0. We have: (#, so, #)+(#, so, #), e ) = qo= V, so). n = 1. If (#, so, G)*(G,. s, #) that it must be &so, 0)=(s, R ) , and hence fo(so)=s. Thus, we obtain aB(qo, cr)=dg((fe, so), o)= ( f , o o , (r;0 a>(so))= Vc, fa(s0)) = s). Let us suppose that the assumption is true for words of the length i. Let n = i + 1, x = yo, where lyl= i. If (#, so, ya)J(yo, s, #), then there exists s’ such that (#, so, y)*(y, s’, #) and f&’) = s. Hence aB(qo> YO) = a,ca,cq, Y h 0)= s’), 0)= 0 0, 0 0) (s’)) = Vya, fyo(s’))= Vyot s)*
a,cvy,
vy
v,
Let us suppose that X E L(A). Then we have: (#, so, x)*(x, s, #) for certain F. But hence aB(qo,x ) = Vx,s) and QX, s) E FB, i.e., X E L(B). To show that x E L(B) implies x E L(A) it suffices to prove that for any x the equality aB(qo,x ) = (fx, s) implies (#, so, x)*(x, s, #). The respective construction of the proof by induction goes analogously to the construction of the previous part of the proof. Details are left to the reader. Q.E.D. SE
It is worth noticing that the automaton B presented here gives not only the answer whether the word x is accepted by the automaton A , but it also shows for x e L(A) whether A finishes the action to the left or to the right of the word x , or whether its action is looped in the word x . So we can distinguish four responses of the automaton B to the given input word x: (1) aB(qo, X ) E FB ~ X 4E4 1 , . (2) dB(qo, x ) E S\F, = X E L(A) and A finishes the action to the right of the word x , dB(qo, x ) = # r x e L(A) and A halts to the left of the word x , (3) aB(qo, x ) = @ = X P L(A) and A loops in the word x. (4)
Example 2.7. We shall construct a deterministic RS-automaton B equivalent to an automaton A E 2-DFA defined as follows: A = (S, C, 3, so, F), where S = (so, sl, s2), C = (0, 1), F = S and the transition function is given in Table 2.4. We calculate the set 3, of final functions restricting the domain of the function to the set S: f,= id(+
2 . Finite automata
16
Table 2.4. Table of transitions and final states for the automaton A from Example 2.7
The functions fo and fl are calculated directly from Table 2.4: so $1 s2 fl
Let us explain in details the calculation of the function foll =fol o 1 for state sz. From Figure 2.16 it follows that foll(sz)=foll(sl)and that for state s1 the automaton loops. Thus, foll(s2)= @.
2.3. Acceptors of regular languages
77
Fig 2.16. Calculation of the value of final function automaton given in Table 2.4
fol o
1 for state s2 of the
The results of computations are presented in Table 2.5 defining the operation for elements in 3Aand C. Table 2.5. Table of the operation f ,
f0l
f0ll
fo fo
o (T
o
for the automaton A from Example 2.7
fOl1
fOl1
Now we can construct the transition and output table for Rabin-Scott automaton B equivalent to two-way automaton A . The analysis of Table 2.6 yields that not all states of the automaton B are reachable from the initial state. The diagram of the subautomaton B , of B containing only states reachable from the initial state is presented on Figure 2.17.
18
2 . Finite automata
If we are interested only in the set of words recognized by A , then we can analyze the subautomaton B2 of the automaton B, in which the states # and @ and the transitions leading to them are omitted. The diagram of the incomplete automaton B2 is presented on Figure 2.18. Table 2.6. Transition table and the table of final states of deterministic Rabin-Scott automaton B equivalent to the automaton A from Example 2.7
c 0
1
* *
* *
* *
*
* * * * *
* * *
2.3.4. Decidubility of reguIar languages
From the constructions of automata presented on Figure 2.14 and in Section 2.3.2 it follows that the class of regular languages is closed under the operations of union, concatenation and closure ()*. We have also proved that the intersection of regular languages and the complement of a regular language are regular languages. We give now the Myhill-Nerode Theorem used to determine whether a given language L is regular.
2.3. Acceptors of regular languages
f
79
\o
Fig. 2.1 7. Diagram of the automaton B, from Example 2.7
Fig. 2.18. Diagram of the automaton B, from Example 2.7
Theorem 2.7. The following three conditions are equivalent (1) the language L G C* is accepted by some deterministic RS-automaton, (2) the language L is the union of equivalence classes of a right congruence of finite index, (3) let the equivalence relation RL be defined as follows: x R g if and only if Vz E C* we have that (xz E L) e Cyz E L), where x, y E 2'. Then the index of the relation RL is finite. Proof. (1) 3 (2). Suppose that L is accepted by the RS-automaton A = (S, C, 3, so, F). Consider the Myhill relation =& associated with the initial state so. From
80
2. Finite automata
Section 2.2.8 it follows that =$uis a right congruence and the index of the relation =$uis not greater than card(s). From the definitions of the language accepted by A and from the definition of the Myhill relations we obtain:
(2) 3 (3) Let E be a right congruence satisfying the condition (2). Suppose that
xEy. Because E is a right congruence, V Z E C" we have xzEyz. From the fact that L is the union of equivalence classes of the equivalence relation E it follows that (xz E L ) w @z E L ) . Thus, from the definition of the relation RL we obtain that xR0. Thereby we have proved the implication (xEy) (xR~y), i.e., that each equivalence class of the relation E is contained entirely in a certain class of the relation Re Thus, because the index of E is finite, also the index of the relation RL must be finite.
( 3 ) a (1) Let X be the equivalence class of the relation RL containing the word C'. Define the RS-automaton B=(S,, C, a,, qO, F,) in the following way: S=, ( X l x C"), ~ q O E C, F,= ( X I X EL ) , d,(X, o)=Xo, where C T EC. We shall prove that the transition function a, is well defined. It suffices to show that y E X implies X o = y o , where o~ C. From the definition of the relation R, it follows that y E X , i.e., yRLx if and only if Vz E C*@z E L ) M (xz E L). Let z = C T V , where v is any word in C". We have ~ O V L)* E ( X O V E L ) , and hence yoR,xo, i.e., X o = y o . From the definition of the set of final states of the automaton B it follows that XE
L ( B ) = { x € C'Ia,(e,
x ) E F B ) = ( x EC * I x E F , ) = ( x E C * I x E L } = L .
Q.E.D. The Lemma presented below called the 'pumping' Lemma is helpful in the proof that a given language is not regular.
Lemma 2.1. Let L be a regular language. There exists a positive integer E N depending on L such that if there is a word x in L with Lxl>n, then x = u v w , where 1 < IvI < n and uv'w E L for each i E No. Furthermore, n is not greater than the number of states of the smallest deterministic RS-automaton accepting L. Proof. Let A = ( S , C, a, so, F ) accepts the language L. Denote card(s) by n. Let the word ( 3 1 a 2 . . . ~ ,be in L , where a l , a2, ..., CT, E C and m > n. Consider the sequence so, s1 o1), sz=a(s,, OJ, ..., S , = C ~ ( S , , , - ~ , a,) of states. Because m > n, at least two states in the subsequence so. sl, ..., sn must be equal. Suppose that s j = s k , where j , k~ ( 0 , 1, ..., n) and j < k . Denote by u, v, w the words
=a($,,
2.3. Acceptors of regular languages
81
oloz...o> oj+loj+z...ok, ok+16kz... + om, respectively. Because k > j , 1 < 1\11 < n. For any i E Nowe also have a(sj, V ) = a(si, v) = s k and hence uv'w E L. Q.E.D. Example 2.8.
Making use of the 'pumping' Lemma we shall show that L = ( e2I i E W) is not regular. Let us suppose that L is regular. Then there exists an RS-automaton A such that L ( A ) = L . Let the number of states of the automaton A be equal to n. In accordance with Lemma 2.1 the word z = o"2 of the length n2 > n is equal to uvw for u, v, W E 0' such that l
and hence
Thus the length of the word U ~ is W contained in the interval and uv2wc L. The language L does not satisfy the condition of the 'pumping' Lemma and hence it is not regular. Exercises 2.1. Construct a deterministic RS-automaton accepting language L in the alphabet (0, 1 ) such that L is the set of all words satisying the condition: each subsequence of four consecutive letters contains at least two symbols 0. 2.2. Give a regular expression representing the regular language in the alphabet (0, 1 ) such that it contains all words in which the subsequence 01 occurs at most once. 2.3. Show that (r*s*)*= (r + s)* 2.4. Construct an RS-automaton accepting the language represented by the regular expression 01 + (1 + 10)'l. 2.5. Prove that the language in the alphabet (0, 1 ) containing the words of equal numbers of 0's and 1's is not regular.
82
2. Finite automata
Bibliographic note
Chapter 2 is an introduction, to the next parts of the book. For this reason we mention here only the papers presenting the original concepts important in automata theory, and some monographic publications containing more extensive discussion of these basic concepts. The idea of representing an automaton as the 5-tuples was introduced by Mealy [l] and Moore [l] (see also Gill [l]). The nondeterministic model of the automaton was proposed by Rabin and Scott [l]. Weeg [2] and Fleck [l] initiated the investigation of the operation preserving functions. The notion of the characteristic semigroup was given by Oehmke [l] and Weeg [l]. The definitions of different types of connectedness of the automaton, generating set and predecessing set can be found in the works of Bavel [2] and Bavel and Muller [l]. A good deal of aspects of the algebraic automata theory can be found in works of Ginsburg [21 and Gluskov [l]. Some algebraic properties of automata were investigated by Dorfler [l, 21, Ito [ll, Masunaga and Noguchi [l], Masunaga, Noguchi and Oizumi [l]. Mikolajczak 271, Nerode [ll, Oehmke [2, 31, Picket [I], Trouth El]. The elements of automata theory in the linguistic applications and in computer science are discussed profoundly by Hopcroft and Ullman 11, 21 (see also Rabin [l] and Shepherdson [l]).
3. Minimization of automata
In this chapter the problem of the minimization of the number of states of an automaton is considered. Particular considerations concerning classes of deterministic automata, both complete and incomplete, have been presented. For complete automata both classical algorithm and Hopcroft’s algorithm have been formulated. Complexity analysis of both algorithms has been conducted. For incomplete automata considerations have been presented basing on covers with substitution property. It has been shown that for incomplete automata the minimization problem is NP-complete. This chapter contains also the investigations of automata’s equivalence both €or deterministic and nondeterministic case. It has been proved that for complete deterministic automata the minimal automaton is assigned uniquely with respect to state isomorphism, and for incomplete deterministic automaton there exists a family of automata with minimal number of states, which represent given automaton.
3.1. Equivalence of automata
We can consider at least three different points of view on the equivalence of automata, namely - if treated as language acceptors two automata are equivalent if and only if they accept the same language - if treated as language generators two automata are equivalent if and only if they generate the same language - if treated as transducers two automata are equivalent if and only if they generate the same output sequences in response to the identical input sequences. In this chapter an automaton will be treated as a transducer. We will concentrate on answering two questions: - how to determine and delete “superfluous” states of an automaton without changing it, and - is an automaton obtained after deletion of superfluous states unique? The first problem is known as the state minimization problem. This problem is an important stage of automaton synthesis because it reduces a complexity of implementation, and it diminishes the length of fault testing sequences.
84
3. Minimization of automata
a,,
TWOautomata A = (S,, C,, a,, RA,A,) and B = (SB, C,, SZ,, 1,) are said to be equivalent if C , = C, = C, RA= R, = SZ and for arbitrary input word x E C’ they generate the same output word Z E a’. The equivalence of automata A and B is denoted by A = B . It is obvious that the equivalence of the automata relation is an equivalence relation. To define the equivalence- of automata in terms of their internal structure we introduce the concept of the equivalence of states of an automaton. States si and sj of automaton A = (S, C, a, R, A) are equivalent if and only if automaton A starting from a state sj is equivalent to the automaton A starting from a state si; we denote this fact as s‘ . 5 I~ (j . As1. = . AS].
(3.1)
where A, denotes automaton A starting in the state s. Equivalence of states has been expressed by means of a1 oma I equivalence, and therefore the set of states will be divided onto equivalence classes such that equivalent states belong to the same class. If two states are equivalent then one of them is superfluous. So, to detect superfluous states we need to assign the equivalence relation (3.1). The first theorem presents necessary and sufficient conditions of state equivalence.
a,
Theorem 3.1. Let A = ( S , C, Q, A) be a Moore’s automaton (Mealy’s automaton, respectively); states si and sj are equivalent if and only if (Moore’s model) (Mealy’s model)
(ii)
(V
CJE
C)[d(si,
0 )5 a(sj,
0)l.
Fig.3.1. Illustration to the proof of Theorem 3.1
85
3.1. Equivalence of automata
Proof. (*) We will conduct our considerations for Mealy’s model (Fig.3.1). States si and sj are equivalent and therefore 0 Wlw,
... WlXl = w’w1’w2’ ... qxl,
especially w=w’, and this denotes that p(si, o)=p(sj, o) for arbitrary o (condition (i)). Additionally
and this denotes that states p(si, o) and p(sj, a) are also equivalent (condition (ii)). (e) To prove that states si and sj are equivalent we shall show that responses p(si, ax) and p(sj, ox) are identical, i.e. Ol64
...
Wlxl= 0 1 ’ 0 2 ’
...
WlXl’
From condition (i) we get that w = w’, and from (ii) follows that states &si, o) and a(sP a) are equivalent. Equivalence of states a(si, o) and a(si, o) implies equality 01w2
... Olrl= WI’w,’
... WlXl’ Q.E.D.
3.2. Minimization of deterministic complete automata 3.2.1. Classical algorithm
We shall consider in this what foIlows the Moore’s model of automaton; of course, these considerations could be similarly carried on for Mealy’s model and Rabin-Scott’s model. Let A = (S, C, 3, R, h) be a complete deterministic automaton. We say that word x differentiates states si and sj if L(a(si, ax))fh(d(sj, x)), i.e. if outputs are different in the states reachabIe from states si and sj under influence of input x. States si and sj of automaton A are said to be k-equivalent if no sequence X E X* of the length k differentiates states s, and si. If states si and sj are kequivalent then we denote this fact by si k= sj, and therefore using this notation we can write down
86
3. Minimization of automata
Remark. For nondeterministic automata states si and sj are considered equivalent if and only if for every word X E X* in sets a(si, o) and a(sP o) there exist states sit and si such that h(si')=h(sj').If states si and sj are k-equivalent for arbitrary k 2 0 then these states are equivalent. Corollary 3.1. If states si and sj are k-equivalent then they are 1-equivalent for arbitrary 15 k. Corollary 3.2. Every k-distinguishable states are 1-distinguishable for arbitrary 12 k.
Automaton A,, is said to be minimal with respect to automaton A if its state set does not contain different equivalent states. In our considerations the minimal R, h) will be denoted as automaton equivalent to automaton A = (S, C, A,, =,,s(, X, a,, a, A,). The next theorem determines the minimum length of words required to determine the equivalence of two states.
a,
Theorem 3.2. Let A = (S, C, 2, R, A) be a complete deterministic Moore automaton with n states. States si and sj of A are equivalent if and only if they are ( n - 2)-equivalent. Proof. (a) The necessary condition is evident because equivalent states are kequivalent for arbitrary k 2 0. (elThe sufficient condition is evident if output function assumes one value or if it assumes n values; therefore we shall consider the other cases. We shall show that the following inclusions of equivalence classes are true:
To do this let us observe that the following equivalencies hold
(ii)
k
k- 1
si = s.I a [si = sjl and [2(s,, o) for arbitrary
OE
k-1
= a(sl, 011
C.
0
If R = (0, I ] , then relation = divides state set S into two classes
3.2. Minimization of deterministic complete automata k
k+l
87
k+ 1
If = # =, then the relation = contains at least one equivalence class more than relation =. Sets F and S-F have no more than n - 1 elements; therefore, starting with = we get no more then n - 2 subsequent new k-equivalence relations. k+l
k
If for some k we have = = = than using condition (ii) we have k+l
k+2
- --=- =
.... Therefore equivalence = denotes the relation
k
I+l
f
=, where k = min(t: =
=
= ). Q.E.D.
Corollary 3.3. If two states are distinguishable than they are distinguishable by means of an input word of the length smaller than the number of states of the automaton. Now we are able to formulate the algorithm of minimization of the number of states for deterministic complete automata. Algorithm 3.1. (Minimization of complete deterministic automaton) Input: Complete deterministic Moore’s automaton A = (S, C, 2,SZ, h). Output: Automaton A , = ( S ~ , , Z, amin,Q, Amm) minimal with respect to A . 0
1
Step 1: Form equivalence relations =, =, ... until k
=
k+l
= for some k. Assume as an equivalence relation = the relation =. Step 2: Define the minimal automaton A,, as follows: =
= ([sI,IsE am,: , ,s x A,,,: S,-+Q;
S,
S) (set of equivalence classes of the relation =I,
c ;,s,
L,(ls15, 0)= m s , 0)L h,,([slJ = h(s) for S E [s],.
The essential part of the above algorithm consists of step I (assigning classes of equivalent states). From the properties of equivalence relation follows that it is sufficient to verify “n over 2”, according to Newton formula, pairs of states with respect to the relation (3.1). Therefore time computational complexity (and also space computational complexity) can be evaluated as O(n2) for the worst case considerations. In fact, time (space) computational complexity of Algorithm 3.1 depends proportionally on the number of inputs m=card(C), i.e. is equal O(m . n2). However, the principal measure of computational complexity for all considerations on automata is the number of states n = card(S). This follows from
88
3. Minimization of automata
the fact, that for every n there exists n-state automaton with 3 inputs and also ( n + 1)-state automaton with 2 inputs. These automata are called universal automata (Hartmanis, Steams [ l ] ) ,and they generate all possible transformations on the set of states. Figure 3.2 presents universal automata for card(X)=3 and card(C) = 2.
@
card(Z)=3
&
\ \ \
Fig.3.2. Universal automata for card(X) = 3 and card(X) = 2
Example 3.1.
Minimize Moore's automaton given by Table 3.1 using algorithm 3.1. Relations = in this case are as follows Table 3.1. Automaton from Example 3.1
3.2. Minimization of deterministic complete automata
89
Table 3.2, Table of equivalence relation = f o r automaton from Table 3.1
Relation = can be also computed using a triangle equivalence relation table as shown in Table 3.2. This table takes into consideration reflexiveness and symmetry of the equivalence relation. Symbols v, x , and (sk,sI) contained in the cell indexed by states si and sj have the following meaning: V - states si and sj are equivalent, X - states si and sj are distinguishable, (sk, sl) - equivalence (distinguishability) of states si and sj depends on equivalence (distinguishability) of states Sk and s); si and s, are equivalent if and only if s, and sI are equivalent.
3. Minimization of automata
90 Table 3.3. Minimal automaton A-
for automaton from Table 3.1
Table 3.3 contains the table of transitions and outputs of minimal automaton. The following symbols for equivalence classes of relation = have been used:
The verification of equivalence of two automata is easier to perform for the Rabin-Scott model of automata. Algorithm 3.2. (Equivalence of deterministic complete automata) Input: Two deterministic complete Rabin-Scott automata A , = (Sl, C,, F,), A , = (S,, 5, s,, F2) such that S,n S 2 = 0. Output: YES, if A, = A 2 (i.e. if L ( A I )= L(Ad); NO, in opposite case.
a,,
a,,
sl,
Step 1: Form a direct sum of automata A , and A,, i.e. an automaton A = (S, US,, c, u 5, u Slr F , U F ~ I . Step 2: Verify, using Theorem 3.2, whether states s1 and s2 are distinguishable; if YES, then NO; in opposite case, YES.
a, a,,
Moore [4] has shown that deterministic automata (complete or incomplete) A and B are equivalent if and only if they are equivalent with respect to words of the length not greater than m + n - 1, where m = card(SA) and n = card(SB). Nondeterministic automata A and B are equivalent if and only if they are equivalent with respect to words of the length not greater than 2" + 2" - 3, where m = card(SA) and n =card(SB). This results from the fact that n-state nondeterministic automaton can be, in the worst case, simulated b y 2" state deterministic automaton (according. to the subset construction). There exist nondeterministic automata for which the order of magnitude 0(2m+ 2") can not be improved (see Nozaki [l]).
3.2. Minimization of deterministic complete automata
91
Even for autonomous automata the restriction on the length of words for nondeterministic automata is not a polynomial function of the number of states m and n. Now we will show that for a set of equivalent deterministic automata there exists uniquely defined minimal automaton. Every other equivalent automaton with the same number of states is state isomorphic with minimal automaton. In these considerations we answer the question about the relationship between the concept of the equivalence and the concept of the homomorphism. Theorem 3.3. Let A = (S, C, a, R, A) be a complete deterministic automaton, and be. a minimal automaton associated with A . Let let A,, = (S&,,, C, a,,. Q, A’ = (S’,C, a’, R, 1’)be an arbitrary equivalent of automaton A. Then, there exists a state homomorphism of automaton A’ onto automaton A,,,. Proof. The equivalence relation E on the set of states S of automaton A defines a partition K = (B1,B,, ..., Bk)=S,,,; we define transition function 3,,,(Bir 0)= B , w a(s, a ) Bj, ~ for some S E B,. Because equivalent states are mapped into equivalent states, an action of transition function amin does not depend on the choice of state s belonging to B,. We assume additionally A,,,(B,) =A@) for S E Bi. If A’ is equivalent to A then from definition of automata equivalence every state S E S’ must be equivalent to states belonging to some block B, of partition n; and there exists only one such class B, because states in other class, let say Bj, are not equivalent to the states of class B,. We can assume that h,: S’ -+Smin such that h&) = Bi,where S E S’, and this defines state homomorphism, because h&@(s,a)) = hds’) = B,’ = amin(Bminr 0)= d,,(h,(s), a). Q.E.D.
Corollary 3.4. If two minimal automata are equivalent then they are also state isomorphic. Corollary 3.5. In the class of deterministic complete automata, automaton A is equivalent to automaton B if and only if there exists automaton C such that C is an epimorphic image of automaton A and B , i.e. using symbolic notation A = B e (3 C)(Horn(A, C) nHorn(B, C ) = 8).
In the case of incomplete automata there exist several minimal SP covers, and not every one of them is a homomorphic image of the primary automaton. 3.2.2. Hopcroft’s algorithm
Above-formulated automata minimization algorithm has polynomial time complexity, but it is not the best known algorithm from computational complexity point of view. Now, we shall discuss Hopcroft’s algorithm of minimization of the
3. Minimization of automata
92
number of states in deterministic complete automaton of time complexity O(n.log n). An analysis of this algorithm in terms of its time computational complexity will be presented in Secdon 3.2.3. Algorithm 3 3 (Minimization of Hopcroft’s algorithm)
deterministic
complete automaton
-
Input: Deterministic complete Moore’s automaton A = (S, C, a, 0,h), C2 = (0, 1). 0utput:Equivalence classes of the equivalence relation on the set of states S. Step 1: F o r m x 1 = ( s I s ~ Sh, ( s ) = l ) , x 2 = ( S I s E s, h(s)=O). Step 2: Compute transition relation 8-l as follows a-l(s,
a) = (s’I a($, a) = s for every s E S and a E C).
Compute the following blocks of states
ni,o=(
s l s xi ~ and
W(s, 0)=0).
Step 3: For every a € C compute the sets of indices I(a) defined as follows:
I
2 in opposite case
Step 4: Assume that k = 3. Step 5: Choose a E C and i E /(o).If I(o)= 0, for every CJ E C, then assume that output of the algorithm is composed of the following equivalence classes xl,x2, ..., nk-l, and go to step 9. Step 6: Delete index i from the set I(o). Step 7: For every J < k such that there exists state s E nj and a($, a) E xi execute the following operations: (i) form nj’ = {sI a(s, a) E xi,s E nj} and n.” = X.- n.’, I l l (ii) swap nj and xj’ and take nk=ni)’; form new equivalence classes nj, and X k , for every CJ E C, (iii) change the set /(o)for every O E n taking
I(0) =
I
I(o)u (J) if j P I(o),and 0 c card(nj,J I card(n,,o)
I /(o)u ( k ) in
(iv) take k = k + 1.
opposite case.
3.2. Minimization of deterministic complete automata
93
Step 8: Go to step 5. Step 9: STOP.
Example 3.2. Find equivalence classes of the relation E using Hopcroft’s algorithm for automaton represented by the graph on Figure 3.3. A nondeterministic automaton A-l = (S, C, W), where 3-l is defined in step 1, has been presented in Table 3.4.
Fig.3.3. Automaton from Example 3.2 Table 3.4. Transition table of nondeterministic automaton corresponding to the automaton from Figure 3.3 a-1
Using output function h of automaton A we get n1= is6}, n2= is1,sz, s3,s, ss), and besides nl, ol= {ss, s d nl, &= (sd, n2, al = ( ~ 1 ~, 2 s3, , ~ 4 1 , 7%. o1 = $2, s39 Sq), n2,6.2=is,, $2, s3, s , ss). Therefore as the result of Step 3 we have: I(oJ =Z(oJ = 1. In step 7 using input literal ol, block x2 is replaced by two blocks %’= isz, s3, s,, ss) and
94
3. Minimization of automata
xT=Isl). A
subsequent execution of the loop (step 4 to step 7) generates the following partition of block ~ 2 onto ) (s3,s4, ss) and (s,) and further (s4. ss) and (s3], and finally (s4], (s5). As a result we see that automaton from Figure 3.3 was minimal, and time computational complexity in this case is equal n - 1, where n is the number of states.
3.2.3. Computational complexity of complete deterministic automaton minimization problem
In this part we will perform a computational analysis of Hopcroft’s algorithm for complete deterministic automaton. We will show that this algorithm has time computational complexity k - m - n - l o g n, where k is some constant value dependent on programming language in which algorithm under consideration has been implemented, where m is the. number of inputs, and n is the number of states of the automaton. The main feature of Hopcroft’s algorithm depends on the method of generating partitions of the set of states into blocks of equivalent states. Therefore we shall analyze this process more precisely. Partition x= ( B l , B,, ..., B k ] of the state set S is said to be acceptable if (i) no block Bi,l S i l k , contains simultaneously states for which output function h(si)= 1 and h(sj)= 0, and (ii) if states si and sj are equivalent states then they belong to the same block. Of course, partition I E =( E l , B,] consistent with output function is acceptable, where B , = ( S ) S E S and h(s)=11, B,= { S I S E S and h(s)=O). Next we will show a method of partition generation such that blocks are composed of sets of equivalent states. Lemma 3.1. Partition x = [El, B,, ..., B,] contains blocks of equivalent states if and only if (i) partition is acceptable, (ii) (V Bi, B j E x)(Vo E Z)(V si, si’E Bi) [a(si, 0)E Bj a a(si’, 0)E Bjl. Proof. (=+) Let us assume that parmon n is not acceptable. There exist two possible reasons for this situation: - there exists a block containing both states with h(s) = 1 and L(s) = 0, - two equivalent states are in different blocks. Let us assume that condition (ii) does not hold, and partition x is acceptable. Then for some s,, s,’, B,, B,, (3 such that s,, s,’ E B, follows that a(s,, o)E B,, a(s,’, o ) e B,. States d(s,, o) and a($,’, o) are not equivalent because they are in different blocks. Therefore there exists word X E Z+ such that h(d(s,, ox))= 1 and
3.2. Minimization of deterministic complete automata
95
h@(si’,ox))= 0 or vice versa (states si, si’ are not equivalent but are in the same block). (e) Let us consider arbitrary states s,, s,’ E BP We shall show that states si and si’ are equivalent assuming that condition (i) and (ii) are satisfied. The proof is done by induction with respect to the length of word x. From condition (i) and (ii) follows that a(si, x ) and a(s,’, x ) belong to the same block. Because partition is acceptable therefore it contains blocks of equivalent states. Q.E.D. Now we will consider a method of generating acceptable partitions starting from a given acceptable partition. Let us assume that a = { B , , B,, ..., Bk) is the acceptable partition. Additionally, let there exist blocks Bi, Bj, and O E X such that s,, si’E Bi and a($,, (3) E Bj, but a(s,’, o) E Bi. Then states si and si’ are not equivalent. We shall obtain from partition a a new acceptable partition substituting block Bi with two blocks: ( s E B , I d(s, o) E B j ) and (s E
BiI a(s, o) E B j ) .
Such partition of block Bi into two blocks is said to be a partition of block
Bi with respect to (B,, o). Let us name an algorithm calculating a partition of block B, with respect to (Bj, a), SPLJT(B,, (Bj, 0)).This algorithm generates all triples ((3, Bi,B j ) and verifies whether s,, si’E B,, &xi, o) E Bi,but a(si7,o) E Bi. This approach denotes a complexity of at least m n2. An improvement of time computational complexity can be achieved by taking into consideration only such pairs (@, o) with respect to which we have to split block B’. A second factor accelerating computations is an ordering of pairs (Bj, o) to be considered. The subsequent lemmas are devoted to the influence of these factors on SPLIT algorithm. If all blocks Bi have been partitioned with respect to ( B j , 0) then no other block must be divided with respect to (Bj, 0) in the following execution of algorithm SPLIT(B,, (Bi’ 0)).This follows from the fact that as a result of dividing of all blocks with respect to (Bj, 0) an arbitrary block obtained as a result of splitting fulfills the following condition (‘d siE B ) ,
a@,,o) E B j or d(si, 0)!6
Bi.
Lemma 3.2. Let block B j be divided into two blocks Bj and Bj. A partition of all blocks with respect to two arbitrary pairs among (Bi’o), (kj, o), (Bj, 0)gives the same result as division of all blocks with respect to all three pairs.
Proof. Let us assume that we divide all blocks with respect to ( B j , o ) and Then every subsequent block B fulfills one of the conditions:
(ij, 0).
3. Minimization of automata
96
4.,
(i) si E B j a(s, a) E Bj and a(+ a)E or a(si, a) E Bj and a(si, a) e 5, or (ii) si E B (iii) si E B 3 a(s, 0)E Bj and d(si, a) E Bj. or (iv) si E B a(si, a) e Bj and a(si, a) e Bi. Because ijv Bj = B j and Bj nBj = 0 then (v) [(s~EB 3 a(s, 0)E Bi)i or [(xi€ B 3 a(si, a>E ij)l. Condition (v) defines a partition of all blocks with respect to (ijl 0).By analogy, the analysis of partition of blocks with respect to (ij, a) and (Bp a) proves that they fulfill the same role as partition with respect to (Bp a). Also partition with respect to (Bi. 0) and (gj, 0) fulfills the same role as partition with respect to (ij, 0).
Q.E.D. Now we shall formulate an algorithm SPLIT; we shall use a list L which contains a set of pairs (BP a) with respect to which we divide blocks so long as we fulfill for each block B one of two conditions a) E Bj or a(si, a)E Bj for every siE B . If Bj is a block and (Bj, a)e L then above-mentioned conditions are already fulfilled or will be fulfilled at the end of algorithm.
Algorithm 3.4 (SPLIT@, (B,, a))) Input: A deterministic complete Moore’s automaton A = (S, C, 8, Q, Output: An acceptable partition n on the set of states S.
A).
Step 1: Take as an acceptable partition n = ( B , , B J , where B , = { S E S l h ( s ) = l} and B , = {sE S I h(s)= 0); additionally, take L = 0. Step 2: Add ( B , , 0)to the list L if card(B1)Icard(B& in opposite case, add to the list L a pair (B2,a). Execute this step for all O E C. Step 3: If L = 0 , then choose one pair ( B j , O)E L. If L = 0 , then go to step 8. Step 4: Determine a partition of all blocks with respect to pair (BP a). Step 5: Replace L by L\(Bp a). Step 6: Compute a partition of all blocks according to the step 4. Step 7: Compute the list L according to partitions of blocks in step 6; for arbitrary block B which is divided onto blocks k and g, and for arbitrary C T EC. If ( B , o ) L ~then substitute L with L u ( 6 , a)u(g, o)\(B, a). If ( B , a ) L~, and if card(&5card(i), then add to the list L a pair (6, 0). If card(B) > card(B), then add (B, a) to the list L. Go to step 3. Step 8: STOP. Now we shall present a time computational complexity analysis of algorithm SPLIT with respect to the worst case. The results of these considerations will be formulated in the subsequent lemmas.
3.2. Minimization of deterministic complete automata
97
Lemma 3.3. The maximal number of iterations in the main loop of algorithm SPLIT(B,, (Bj, a)) (steps 3 to 7) equals 2 m‘n. Proof. We shall show that the maximal number of pairs on the list L is equal to 2 men, and every iteration deletes one pair from the list L. For every block B and a € C the pair ( B , a) is placed on the list L only once. Therefore we have to prove that one can generate at most 2 .n blocks (m = card@)). Let us construct a binary tree of blocks in the following way. The root of a tree is the state set S, and its immediate sons are blocks
For every block B its sons are 6 and B . A number of leaves of this tree is restricted by n (n is the maximal number of possible blocks). Therefore the tree under consideration contains at most 2 . n vertices. Q.E.D. Steps 3 and 5 of algorithm SPLIT(B,, ( B j , a)) can be executed in constant time k, and k,, respectively. Therefore the total computational time for these steps is equal to 2 .k, m .n and 2 .k, .m .n, respectively. Similarly, the computational time of step 7 is equal to 2 k, .ma n. Steps 4 and 6 require further considerations. We will analyze time complexity of the partition process of block Bi with respect to (BP a). Such partition denotes a substitution of block Bi with blocks g, and Bi fulfilling the condition
-
[s E
6, * d(s, a)E Bjl
and [s 6 Bi r j d(s, a)6 Bjl.
Thcrcfore a given block Bi can be split with respect to (B,, a) by deletion of all states s of Bi for which d(s, o ) Bj. ~ and additionally by creation of a new block B , composed of all states deleted from B,. In consequence block Bi is divided onto two new blocks Bi and B , During partition process of all blocks with respect to (Bj, a) it is convenient to create a list of all these states which must be deleted from blocks because they fulfill the condition a(s, (3) E B,. This list will be denoted as C. Then the step 4 of algorithm SPLIT@,, ( B j , 0))can be formulated as follows. Step 4: Split all blocks with respect to (Bj, 0).Assume that C = @ For arbitrary S E B j verify whether
a-qs, a)= (s’I dcs’, a) = s) $0; if YES then add a set d-l(s, a) to the list C.
98
3. Minimization of automata
The time complexity of Step 6, which equals m.n2, can be improved by considering only these blocks which can be partitioned, i.e. blocks containing states from list C. One can also detect a situation when deletion of states is not needed; this corresponds to a case when for every S E B and d(s, 6)E Bj, then (S E Bi I a(s, 0) B j ] = 8. Taking into account all above comments we can reformulate step 6 as follows. Step 6: For every S E C add to the block B, the number of the block containing s. If for arbitrary s E Bi, a(s, 0)E Bi, then do not change the contents of block B,; in opposite case, construct block Bk (if such block has not been designed yet); at the beginning assume that Bk=0, next move state s from block Bi to block B, At this point we can evaluate the time complexity of states 4 and 6 once more. First, we will show that the verification of condition “ W ( s , 6)= 0?” requires at most m .n log n operations.
-
The total time necessary to execute the remaining part of step 4 and the whole step 6 is proportional to the number of states on list C. Then the number of states located on list C is restricted by ma n log n.
-
Lemma 3.4. Condition “a-l(s, 0)=0” is verified in step 4 at most m - n - l o g n times. Proof. It is sufficient to prove that for fixed input symbol O E C the condition “d-l(s, 6)#0?” is verified n . log n times. To do this we introduce a new variable COUNT in step 5, which counts down the number of applications of condition “a-l(s, 0)#0?”. Then Step 5 can be written down as follows.
Step 5: For fixed 6 let us assume COUNT+ bj instead of COUNT. Let us assume L\(Bj, 6) instead of L, where bj=card(Bj). Now it is therefore sufficient to show that COUNT I n .log n. To do this, let us assume that blocks B , , B,, ..., be divided into two classes:
K = { B , I (B,, 6)E L } and K = { B , I (Bi, 6)4 L } . Let us consider the following expression T = n log n -
C bi log, b, C bi log, bit 2. Bi€ K Bi€ K
Therefore it is sufficient to show that after execution of the algorithm T2COUNT, because n.log n 2 T 2 0 . At the beginning of algorithm T20, because COUNT=O. Let us verify the relation T2COUNT during execution of
3.2. Minimization of deterministic complete automata
99
the algorithm. The relation 2 can be a subject of change if one of the two sides of the relation are changed. It is easy to observe that only in steps 5 and 7 the values T or COUNT could be changed. Now we shall analyze these changes. (i) in step 5 (in version with variable COUNT). There is a change both of T and COUNT. Adding bj to COUNT results in a change of T because of deletion of the pair (BP 0 ) from list L. If we show that this change results in an increase of T by bj then relation T2COUNT will be preserved. To achieve this let us mention that a deletion of the pair (Bj, 0) from list L results in substitution of the expression -bj.log, 6, in T by expression - b, . log, b, J 2. But bj.log2 bj-b,*log, b j J 2 3 bj (log, b, - 1082 bj + 1082 2) = bi;
-
therefore the relation T 2 COUNT has been preserved. (ii) in step 7: There is a change of T by addition and subtraction of the pair (Bj, 0)to the list L. We shall show that T does not decrease. Let us assume that block B has been partitioned into two blocks B and B; then b = 6 + b. Let us assume now that 6 5 6 that does not restrict generality of our considerations. Let us consider two cases: - if ( B , o ) L;~ then the expression -belog, b is substituted by -6.log, 6 - 6 . log, 6; then the following dependence holds:
6 . log, 6 + b . log, b<(6 + b) -log, b < b . log,
6;
therefore this change results in increase of T; - if (B, 0 ) L; ~ then the pair (i,(5) is inserted into list L. Therefore expression - b . log, b 2 is substituted by expression - 6 - log, 6 - 6 .log, 6 12. T does not decrease because
6
*
log,
6 + b - log, b I2 5 6 . log,
b12 + b * log, b12 = b . log, 612.
Summarizing, the relation TI COUNT is unchanged during the execution of algorithm. Q.E.D.
Lemma 3.5. Number of states placed on the list C during execution of step 4 of the algorithm is restricted by the upper bound equal to m .nlog n.
100
3. Minimization of automata
Proof. Let us consider some transition &xi, o)=sj in an automaton under consideration. We shall show that the number of appearances of the pair (Bi.6) on the list L such that t E Bj is restricted by log n. Hence multiplicity of insertion of some state si to list C (because of transition &si, Q) = s j ) is restricted by log n. Because number of transitions is at most equal to m .n, then the lemma is true. Let us assume that sje Bi. and (Bi.Q)E L, and additionally that this pair has been chosen in Step 3 of the algorithm. Then state si is added to the list C in step 4 of the algorithm. We now request that the pair (B, Q) with s j € B will be once more inserted into list L , if b I b i / 2 . This is possible because there is no need to compute a partition with respect to (Bj, 0).If block Bj has been partitioned onto B and B such that 6 c b,42 < 6, then only pair (g, 6) is inserted to the list L. If (B, Q) with s j € B is added to the list L, then b I b j 2 , and additionally b j I n / 2 . This indicates that pair (B, a) can be selected in Step 3 at most log, n times. Q.E.D.
Theorem 3.4. Hopcroft's algorithm has time complexity O ( n .log n). Proof. The proof follows immediately from lemmas 3.3, 3.4, 3.5, and additionally from previous lemmas 3.1 and 3.2. Q.E.D.
Now we shall formulate a decision problem for complete deterministic automata, and we shall prove NP-completeness of this problem. Minimization of automata Instance: Let A = (S, I;, 2) be a complete deterministic automaton and let k be a natural number such that 1 < k < card(S). Question: Does there exist an output function h:S+n= (0, 1) such that minimal automaton A,, equivalent to the automaton A has k or smaller number of states? Theorem 3.5. AUTOMATA MINIMIZATION PROBLEM is NP-complete. Proof. It is evident that output function can be defined nondeterministically, and we can verify, using for instance Hopcroft's polynomial algorithm, whether condition concerning the number of states has been fulfilled. Therefore our problem belongs to class NP. Now we shall show that this problem is polynomially reducible to the clique problem which is NP-complete (see Garey, Johnson 111). Let G = ( V , r> be a connected and unoriented graph without loops. Let us assume that G has a clique with k vertices, for instance G' = (V', I'), where V' = {vl, v,, ..., v,} and I' E I is a restriction of incidence relation I to V'.
3.2. Minimization of deterministic complete automata
101
Now let us define a diagonal automaton A ’ = (S’, c’, a’, Q’, L’), where S’ = V‘ u {so, sy, s N ) , and so is an initial state, sy is a final state, sN is a negative I i E [ 1, 2, ..., k ) ) ; state (i.e. h’(sN)= O ) ; C’ = [o, d’(so, q)= vi, d’(sy, 0,) = sT, a’&, q)= ,s for every 0’E C;
ayv,,
Oj)=
i
,s
if (vi, vj) E I‘
sT
otherwise;
h’(s,) = 0 , h’(s,) = 1, so, vi B: Dom(h’), where i = 1, 2, ..., k. From the above construction of automaton A’ it follows that this automaton is complete with respect to the transition function and incomplete with respect to the output function. Additionally, it follows from our definition of A’ that A’ is minimal, independently of definition of the rest of the output function. For fixed k (clique with k vertices) automaton A’ has k + 3 states and requires ( k + 3 ) k + 2 commands to complete its definition. For diagonal automaton A’ with k states there exists a graph with clique composed of (k-3)-vertices. Therefore, the above-defined transformation is polynomial. Moreover, graph G has a clique G’ if and only if there exists diagonal automaton A ’ . In consequence, AUTOMATA MINIMIZATION PROBLEM is NP-complete. Q.E.D.
Example 3.3 Let us assume that k = 4. We shall design a diagonal automaton A’ for k = 4. A clique with k = 4 has been shown on Figure 3.4, and diagonal automaton in Table 3.5. AUTOMATA MINIMIZATION PROBLEM has significance when we consider automata without outputs, and intend to define an output function in such a way that the number of states (memory) will not be greater than an a priori given number. Of course, similar problem can be formulated for Mealy’s automata.
Fig.3.4.Clique of order 4
3. Minimization of automata
102
Table 3.5. Transition table and output table of diagonal automaton from Example 3.3
3.3. Minimization of deterministic incomplete automata
For incomplete automata one can use algorithms presented before for complete automata throughout nondeterministic completion of transition and output functions in the incomplete automaton. However, an automaton obtained as a result of minimization process will not necessarily be the automaton with minimal number of states. Of course, searching among a set of all possible automata with all completions of transition and output functions could lead to minimal solution (or a set of minimal solutions). Therefore for incomplete automata we shall apply completely separate approach based on covers with substitution property.
3.3.1. Minimization algorithm For incomplete deterministic automata a comparison of states with respect to their behavior as a result of application of input symbols will be restricted to words for which transition function is defined for subsequent literals, and output function is defined at least for the last literal in the word. Formalizing this idea we have: word X = C T ~ C T... ~ ope C+ is said to be admissible for state s if there exists a sequence of states sl. s2, ..., s, such that (s, q )Dorn(a), ~ (a(s, ol), crJ E Dam@), ..., @ ( s ~ - ~ ,oP& op)E Dom(3) and sPe Dom(h) or (sp, op)E Dom(j3). States si and sj of automaton A = ( S , C, a, R, h) are said to be incompatible if there exists admissible sequence x such that output functions are different; we denote this as follows:
si4- sj w (3 x E C' admissible) such that [h(a(s,,x ) ) = h(a(sj,x ) ) or p(si, x> = pcsj, 41.
3.3. Minimization of deterministic incomplete automata
103
If pair of states is not incompatible then it is compatible. Compatibility relation on the set of states is denoted as -. This relation is reflexive and symmetric but not transitive. Therefore compatibility relation implies a cover on the set of states. A subset T of the set of states S is said to be compatible if every pair of states in this set is compatible. Maximal set of compatible states T,, is said to be such subset of the state set S that every pair of states is compatible, and adding state si E,,S to set T,, results that set T,, u {si} is not compatible. A family of compatible states of automaton A = ( S , C, a, R, h) induces a cover on the set of states, and a family of maximal sets of compatible states induces maximal cover on a set of states. A family of maximal sets of compatible states of automaton A is said to be family of fiial sets. By analogy we define a maximal set of incompatible states N-. By means of this family one can determine the number of states of minimal automaton. To do this with every state si we associate a vertex vi of undirected graph G = ( V , I), where V = {vl, v,, ..., v,,}, n = card(S); two vertices vi and vj are connected by an edge (vi, vj) if and only if corresponding states si and sj are incompatible. Hence, minimal automaton has as many states as minimal number of colors needed to color neighboring vertices of graph G with different colors. Let K = {Sl,S,, ..., S,} be a family of subsets of a set of states S and let for every Sie K and o j c C follows
KQ = {Sj I {a(s, oj)I s E Si} c Sj}cK ; if for arbitrary i and admissible oi.KQ#& then K is said to be a closed family or a SP cover. Let K , and K2 be families of subsets of a state set S. Family K, covers family K2 if for every Si E K , there exists S; E K2 such that Si’ E Si. Family K of subsets of a state set S is said to be a complete family if every element of this family: - is a maximal set of compatible states (maximal cover), - family K is closed (1.e. it generates S.P. cover), - family K covers a set of states S. Let A = (S, C, 8, R, p) be a Mealy’s automaton and let K = {S,,S,, ..., S,} be a complete family for this automaton; an automaton A’ = (S’, C, a’, R, p’) represents automaton A if S’= ($1, s2, ..., s,} and for arbitrary Si E K and a j € C follows (3 s E Si)[(s,oj)E Dom(p)] -[(si, oj)E Dom(p’) and P’(SI, Oj) = PCs, “ j ) ,
(3.3)
(3 s E Si)[(s,oj)E Dom(2)l =[(si, oj)E Dom(3’) and a’(si, oj)= Sk, where s k c Kii
(3.4)
3 . Minimization of automata
104
Theorem 3.6. For incomplete deterministic automaton A = (S, C, a, R, y) there exists a family of automata A,’ = (S,’, C, a;, a, y,’) with minimal number of states such that every member of this family represents automaton A . Proof. It is constructive; it will be represented by means of Algorithm 3.5.
Algorithm 3.5 (Minimization of a deterministic incomplete automaton) Input: Deterministic incomplete aubmaton A = (S, C, a, R, y). 0utput:Family of automata A,’ = (S,’, C, a’, R, y,’) with minimal number of states such that every member of this family represents automaton A . Step 1: Compute set N of pairs of incompatible states and set T of pairs of compatible states (one can apply here a triangular table of incompatibility and compatibility relations similar to Table 3.2 in Example 3.1). Step 2: Compute the family of maximal sets of incompatible states N,, applying graphical representation of a set of pairs N of incompatible states and finding cliques of maximal orders covering all vertices of this graph (incompatibility relation is symmetric but not reflexive nor transitive). Step 3: Compute the family of maximal sets of compatible states Tmx (final family) applying a graphical representation of a set of pairs T of compatible states and finding cliques of maximal order covering all vertices of this graph (all states of automaton A ) . Step 4: Determine a nonsuperfluous set of complete families in a family Zmx with minimal number of elements. Step 5: Define a family A,’ = (Si’, C, a,’, a, y,’), of automata representing automaton A assuming the complete families assigned in step 4 as sets of states S,’ and fulfilling conditions (3.3) and (3.4); the following evaluation on the number of states of automata Ai can be formulated: mm(card{N-}) I card(Si’)5 rnin(card(S), card({T-}). Example 3.4.
For an incomplete automaton presented in Table 3.6 determine a family of automata with minimal number of states representing it. The common table for computing pairs of compatible and incompatible states has been presented in Table 3.7. From this table we compute all pairs of compatible and incompatible states, respectively, as follows:
3.3. Minimization of deterministic incomplete automata
105
Table 3.6. Incomplete automaton A from Example 3.4
Table 3.7. Table of incompatible and compatible states for automaton from Table
X
X s6>
(s59
V
V
V
X
S1
s2
s3
s4
s5
'6
106
3. Minimization of automata
Fig.3.5. Graphical representation of compatibility relation T and incompatibility relation N from Example 3.4 On Figures 3.5 a) and b) a graphical representation of T and N relations have been given. Based on this figure we determine the family of final sets:
and the family of maximal sets of incompatible states:
One can compute number of states of automata representing given automaton using evaluation presented in step 5:
3 Icard(S;) Imin( 7 , 5 ) , where max(card(N-}) = 3 and card(S) = 7, card( (T-)) = 5. In this example a nonsuperfluous set of complete families is composed of one element. This is the following family:
We shall define automaton A’ by means of this family in such a way that it represents automaton A. Automaton A’ is shown in Table 3.8 using the following notations:
The nondeterministic notation of transition function 3’ in Table 3.8 is interpreted in this case as a possibility of choice of arbitrary but only one state as the next state, for example Z ( d , 00) = a or Z ( d , 00)= d.
3.3. Minimization of deterministic incomplete automata
107
Table 3.8. Automaton A’ representing automaton A from Example 3.4
Let us consider now a relationship between concept of cover and concept of homomorphism for Mealy’s automata. Let A =(S,, C, R, PA) and B =(S,, C, a,, R, P,) be two incomplete Mealy’s automata. State s, covers state S, (s, 2 s,), where s, E S,, S, E S,) if for every a € C follows
a,,
Automaton B covers automaton A ( B 2 A ) if for every S,E S, there exists S, such that s B 2 s A .Automaton B is a minimal cover of automaton A if for every other cover C of automaton A follows card(&) 2 card(S,). A mapping h: S, -+ S, is said to be a homomorphism of automaton B into A , if a(s,, a) is defined, then d,(h(~,), a) is also defined, and
S,E
for every s, E S, and O E C (and by analogy this equation holds for output functions P,, PA, respectively). A mapping h: S,+S, is said to be a strong homomorphism of automaton B into A if h is a homomorphism, i) ii) PA(sA, a) is defined and h(s,) = s, and then P,(s,, a) is defined, iii) as(, a) is defined and PA(sA, xo) is defined for some Q E C, and h(sB)= s,, and then a(s,, x ) is defined. A set of strong homomorphisms of automata A and B will be denoted by SHom(A, B ) . Now we shall formulate a theorem which explains a relationship between a cover and a homomorphism.
Theorem 3.7. Let A and B be two incomplete Mealy’s automata. Automaton B covers automaton A if and only if there exists automaton C such that automaton B is a homomorphic image of C, and automaton A is a strong homomorphic image of automaton C, i.e.
108
3. Minimization of automata B 2 A u B = Hom(C) and A = SHom(C).
Proof. Let B = (S,, C, a,, Q, pB) and A = (SA, C, a,, C2, define automaton C = (S,, C, a,, C2, p ), as follows
s,= ((sA8
3,)
E
SAP @A(sA,
SB, SASsB}?
01,
a B ( s B , 0)) if a A ( s A , 0)
and undefined PA(sA,
PA) and B 2A. We shall
O) if
~ B ( s B , O) arc
defined
in opposite case O) is defined
undefined in opposite case. two mappings hA: sc+sAand h,: epimorphic; this fact has been shown below assuming that h,(sA, s,) = s ~ then ;
s,+s, hA(sA,
s,)
which are = sA, and
Next we shall show that hA is a strong homomorphism. According to the definition it is sufficient to verify conditions (ii) and (iii): (ii) if sc E S , and hA(sC)= sA then sc = (sA, s ~ for ) some S, E S, such that s,~s,. By definition of output function Pc we have that pC(sc, 0)is defined and pC(sc, o)= PA(sA, 0), if PA(sA, O) is defined. (iii) Let us assume now that aA(sA,x ) is defined and PA(sA, x ) is defined for some X E C+ and additionally hA(sC)= .,s We know that sc = (sA,s,) and s, 2 s A for some S, E S,. We infer from this that PB(sB, O) is defined, and therefore x ) is defined also, because PB(sB, XO) = pB(a,(sB, x), 0).Finally, we have shown that a&,, x ) is defined because ac(sc, x ) = ( a A ( s A , x ) , dB(sB, x)). Now we shall show that B 2 A , where h,: C + B is an epimorphism and hA: C + A is a strong epimorphism. It is sufficient to show that h,(~,) 2 hA(sc) for an arbitrary sC€ S, because both hA and h, are surjections. For this purpose let us assume that PA(hA(sC), x ) is defined. Then Pc(sc, x ) is also defined and pC(sc,x ) = P A ( h A ( s C ) , x). Similarly we get that pc(sc, x ) = pB(hB(sC), x ) and hence
a&,,
PA(~A(sC)~x ) = PB(hB(sc).
Q.E.D. The above result can be easily extended on the finite sets of covers, and specifically on the finite sets of minimal covers. In this way we obtain the following important corollary.
3.3. Minimization of deterministic incomplete automata
109
Corollary 3.6. Let A be an incomplete automaton, and let B , , B,, ..., B, be minimal covers of automaton A . Then there exists automaton C such that every automaton Bi, i = 1, ..., k is a homomorphic image and a strong homomorphic image of automaton C. It follows from this corollary that algorithms of computing all minimal covers are composed of two main steps: - finding, for a given incomplete automaton, a convenient preimage with respect to strong homomorphisms, - determining minimal homomorphic images of this preimage. The first step denotes, as a matter of fact, a nondeterministic application of state splitting (compare with Chapter 6), which introduces an exponential element to computational complexity of this problem. The second step is better "mastered" from computational point of view, although (compare with Chapter 5 ) in general case this step has also exponential computational complexity. In the following theorem we shall show that method presented in the previous theorem is optimal. Theorem 3.8. Let B 2 A and let C be an automaton defined for A and B as stated in the proof of Theorem 3.7; let additionally D be an incomplete automaton such that B is the homomorphic image of automaton D, and A is the strong homomorphic image of automaton D. Then there exists a strong homomorphism h: D -+C. Proof. Let h,: D + A , h,: D +B be homomorphisms. Let us consider a mapping h: D + C such that h(s,) =(hA(sD),h,(s,)). We shall show that h is a homomorphism :
By analogy we prove a similar homomorphic condition with respect to the output functions p, and pc. Therefore h is a homomorphism. Next we shall prove that h is the strong homomorphism. (ii) Let us assume that pC(sc, x ) is defined and h(s,) =s, for some ,,s and therefore sc = (hA(sD), (hE(sD)).By definition of output function Pc we know that PA(hA(sD). x ) must be defined; and in consequence pD(sD,x ) must be defined because hA is a strong homomorphism. (iii) Let us assume that dc(sc, x ) is defined, for some C T EC and sc = h(s,) = (hA(sD),h,(s,)) for some .,s By definition of functions d, and pc we have that both dA(hA(sD), x ) and PA(hA(sD), x ) are defined. Because hA is a strong homomorphism, therefore a&,, x ) is defined. Q.E.D.
3. Minimization of automata
110 Example 3.5.
For automaton presented in Table 3.9 we shall give minimal covers and a homomorphic preimage. The results' of these computations have been formulated in Table 3.10 (minimal covers) and in Table 3.11 (homomorphic preimage). The homomorphic preimage has been determined using construction presented in the proof of Theorem 3.7. Table 3.9. Incomplete automaton from Example 3.5
t
t
I
P ~ s , ,a 2 s 2 , p 2 s 2 a 2 s , ,
C X ~ S , ,
1
a2s2, b2s3, b?s,
Table 3.11. Homomorphic preimage of automaton from Table 3.9 with respect to minimal covers from Table 3.10
S A B
C D E F
01
(52
NO
F/ 1 ElC/B/B/N1
B/O
c/o B/O
c/o c/o
A
A; B; C; Dz E= A F=
(a, d, f ) , (b,d,f), (b, d, g), (b, e, 0, (b, e, g), (c, d, g),
aSd, bld, bld, ble, ble, cld,
alf blf blg blf blg clg
3.3. Minimization of deterministic incomplete automata
111
3.3.2. Computational complexity of minimization of incomplete automata
Now we shall consider a time complexity of minimization problem of an incomplete automata. It follows from previous Section 3.3.1 that this problem can be reduced to the clique problem by the graphical representation of compatibility and incompatibility relations. It is well-known that the clique problem is NPcomplete. Therefore, we expect that decision problem associated with minimization of incomplete automata is also NP-complete. First, we formulate this decision problem, and then we shall prove its NP-completeness in several lemmas and theorem. Minimization of incomplete automaton Instance: Let A = ( S , X, a) be a deterministic incomplete automaton and let k be a natural number k such that 1< k < card@). Question: Is it possible to complete the transition and output functions in such a way that minimal automaton A,, equivalent to automaton A has k or smaller number of states? In the proof of NP-completeness of MINIMIZATION OF INCOMPLETE AUTOMATON problem we use the fact that the problem of k-COLORABILITY of graphs (Garey and Johnson [l]) is NP-complete. We shall show a polynomial reducibility from k-COLORABILITY of graph to the MINIMIZATION OF INCOMPLETE AUTOMATON problem. To do this we shall construct an automaton A = ( S , C, a, 0, A) for a graph G = ( V , l) with a set of vertices V = {vl, v2, ..., v,) such that S = V u (so, s, s,), where so, ,s sF t V , and additionally: so - initial state, sN - negative state, s, - final state, respectively; c = {oiI viE v); a($,, oil = vi, a($,, oil =, ,$ a($,, oil =,,$ qvi,oil = SF, a(vi, oj)= s, if a(vi, vj) E I , i # j ; and UsF)= 1, X(so)= h(vi)= A($,) = 0. Lemma 3.6. If graph G is k-colorable, then algorithm 3.5 can generate automaton
A with at most k + 3 states.
Proof. States so, s, s, are incompatible with the other states because of the definition of transition function a. Let f be a function coloring vertices of the graph G using colors 1, 2, ..., k. We shall define the sets of vertices which are colored with the same color as Fi = { V E V If(v) = i ) for i= 1, 2, ..., k. For every set Fiwe construct sets of vertices Kias follows (9 F ic K i , (ii) for every compatible pair (v. w) such that v E K i , w E Kiwe add vertex w to Ki if and only if w’E Ki, where (w,w’)is also the compatible pair, (iii) we repeat step (ii) as long as new elements are added to Ki.
3. Minimization of automata
112
Let us consider now the time necessary to complete the construction of sets Ki.If the automaton has n states then there exists at most n2 pairs of compatible states; every set K i has at most n elements. Therefore to construct set K iwe need at most n3 time. There exists at most n classes Ki, and therefore the algorithm requires, in the worst case, time proportional to n4 (and therefore the algorithm is polynomial). We shall construct now an automaton A’ = (S’, C, a’, R, A’) such that
Let us mention that state s in the last set has been chosen from the set (sN, ,]s according to the definition of transition function of automaton A . Now we shall prove that automaton A’ has been defined according to the algorithm 3.5: (i) Every set Ki is compatible. Let us assume that the opposite is the case; then there exist vertices vp, v, E Ki and o j € C such that a(vp,oj)= s, and d(v,, oj)= sN;the pair (vp, v,} E Ki if and only if {vp, v,) E F i or at least one of the vertices from (vp, v,) has been added to Ki.Two cases are possible here: {v,, ~j}E I , but - (vP, v,} E Fi, ~ j =)SF p =j, oj) = s N f ( v 3 = f ( ~ ~ contradicts = ~ ) the assumption that function f colors graph G by means of k colors; therefore (vp, vm}gYi; - let us assume that vertex vp has been added to the set K i after vertex v,. Because (vp, v,,,) is not the compatible pair, vertex vp could not be added after vertex v,; from this contradiction we conclude that all elements of the set Kiare mutually compatible, (ii) every set Ki is a maximal set of compatible states. This condition follows directly from construction of Ki,especially from (ii). (iii) S’ covers S; i.e. every state from S is included in one of the sets belonging to S’. For states So, sN, s, this fact is evident. Vertex V E V belongs to one of the sets Fi because function f colors the whole graph G; from condition (i) in construction of Kiwe have that F ic K , and therefore v E Ki. (iv) S’ is closed with respect to transition function We have to show that (Va E C)(V s, t E Ki)(3j]@(s, a)€ Kj and J(t, a)E Kj]. It follows from definition of transition function a that for every vertex Y E V , a(v, o) is equal to ,s or .,s Let us assume that there exists a set Ki, and states s, t E K i and some O E C such that d(s, o)=sNand a(t, o)=sP This fact has been however contradicted in (i). Therefore set S’ is closed with respect to transition function a. Hence automaton A’ has been defined according to Algorithm 3.5. Q.E.D.
a(~,,
a(~,,
a.
3.3. Minimization of deterministic incomplete automata
113
Now we will discuss of graph coloring by means of ( k - 3) colors for automaton with k states, constructed according to Algorithm 3.5. Lemma 3.7. If Algorithm 3.5 assigns an automaton with k states, then graph G can be colored by means of (k - 3) colors. Proof. Let A ” = (S”, C, a”, R, L”) be an automaton with k states constructed according to Algorithm 3.5, where S”= [ K , , K,, ..., Kk-3, so, .,s s F ) . Let us define a coloring function for vertices of the graph G : f(v) = i if and only if v E K,,where for every j < i we have v E Kj. We shall prove that f colors the graph G by means of k - 3 colors. Let us assume, the opposite case. Then for some vi, vi. Avi)=f(v,) and (vi, vi} E 1. There exists an index p such that [v,, vj} E Kp. But in this case a(vi, oj)= s, because (v,, vj) E I . We have also that a(v,, oj)= s., Unfortunately, in this case class K p is not compatible and automaton A” can not be constructed according to Algorithm 3.5. From this contradiction we obtain that function f colors a graph G by means of ( k - 3 ) colors because there exists k - 3 compatibility classes K, and every vertex V E V belongs to at least one class K,. Q.E.D. By means of Lemmas 3.6 and 3.7 we can formulate a basic theorem on NPcompleteness of INCOMPLETE AUTOMATON MINIMIZATION problem. Theorem 3.9. INCOMPLETE AUTOMATON MINIMIZATION problem is NPcomplete. Proof. At first we generate a set of k subsets of a set of states S of automaton A by means of a nondeterministic Turing machine, and next we verify deterministically and in polynomial time whether these subsets are compatible, whether they cover a set of states, and whether they are closed with respect to transition function a. If we achieve a positive answer then we have a required automaton. Therefore automaton constructed according to Algorithm 3.5 is defined nondeterministically in polynomial time assuming that the size of input is represented by the number of states. Based on Lemmas 3.6 and 3.7 the k-COLORABILITY problem is polynomially reducible to the problem of INCOMPLETE AUTOMATON MINIMIZATION. Therefore this last problem is also NP-complete. Q.E.D.
The fact that INCOMPLETE AUTOMATON MINIMIZATION problem is NPcomplete suggests three directions of research in development of feasible algorithms for this problem: - studies and investigations of heuristic algorithms which generate good but not optimal solutions,
3. Minimization of automata
114
research of special cases of this problem, called subproblems, in attempt to find polynomial algorithms for them, - design of exponential algorithms with better proportionality coefficients. -
Exercises
3.1. Let A be a complete DFA with n states; let additionally si and sj be two distinguishable states of automaton A, and let x be the shortest sequence distinguishing states si and sj. Determine the maximum length of the sequence x as a function of n? 3.2. Design 8-state and 2-input complete DFA such that this automaton is minimal for all possible sets of final states F , assuming that F # 0 and F #S.
3.3. For complete DFA in Table 3.12. define an output function in Moore's model in such a way that minimal equivalent automaton to this automaton has 3 states. Is it possible to define output function in such a way that minimal automaton has 2 states? Table 3.12. Automaton from Exercise 3.3
a
3.4. Prove that for a given n there exists a DFA with n states such that relation b is different for k = n - 2 and k = n - 3. 3.5. Design Moore's automaton with minimal number of states which transforms given input sequence into given an output sequence both given below
input 101 101 output 011100
Exercises
115
3.6. Prove that minimality of every A(n) automaton requires time praportional to n2 using classical minimization algorithm and time proportional to n using Hopcroft's minimization algorithm, where
V;
A(n)=((l, 2, ..., n ), (0, 11, a, (0, 11, a(1, O)=a(l, 1 ) = 1 and a(i, O)=i-1, d(i, l ) = i for 2 S i l n ; h ( l ) = l , h(i)=O for 2 1 i 5 n . 3.7. For Moore automaton given in Table 3.13: (i) construct minimal automaton assuming that 3L(so)= h(sd = 1, (ii) define output function in such a way that minimal automaton has 3 or smaller number of states. Table 3.13. Transition table of automaton from Exercise 3.7 d
S 0
1
3.8. Prove that minimization of every B(n) automaton requires time proportional to n .log n using Hopcroft's algorithm, where B( n) = ((l, 2, ..., nl, (0, 11, 3, (0, 11, V; a(i, 0) = a(i, 1) = n/2 + 2 . i - 1 and d(n/4+i, O)=d(n/4+i, 1 ) = 2 . i - 1 for 1 1 i I n / 4 and a(n/;!+i, O)=a(n/2+i, 1 ) = 2 - i - 1 for n / 2 l i l n . 3.9. Prove that the upper bound T-(n) on the number of maximal sets of compatible states of n-state incomplete automaton equals to
3. Minimization of automata
116
for m=0, 1, ... (Tm(n) represents also time and space bounds for arbitrary algorithm determining the compatibility classes). 3.10. Formulate conditions allowing to choose an automaton having maximal number of undefined entries both in transition and output functions from the class of minimal automata representing a given a priori incomplete automaton (the undefined transitions allow for additional reduction of combinatorial logic in the subsequent stages of automaton synthesis process). 3.11. For incomplete automaton from Table 3.14 determine the minimal automaton with maximal number of undefined transitions representing the given automaton. Are states of this automaton determined by maximal sets of compatible states? Table 3.14. Automaton from Exercise 3.11
alp S a b C
d e f
01
02
03
04
b10 a/O cl-
-I-
-1-1-
-1-
dl1
el-
-/f/-
a/-1-
el-
bl-
-1clfll
cl41 blbll
a/-
ell
3.12. Design 4-input nondeterministic automata which require input words of length 2" + 2" - 3 for verification of their equivalence. 3.13. Is it possible to diminish the length of input words for verification of equivalence of complete or incomplete deterministic automata from m + n - 1 to m + n - 2 ?
3.14. Design nondeterministic autonomous automata which require input words of length exponentially dependent on the number of states of this automata.
Bibliographic note
117
Bibliographic note
The problem of automata minimization was studied by Huffman in 1954 [l] and by Moore in 1956 [21. Hopcroft’s algorithm has been formulated in 1971 [l]. Computational analysis of Hopcroft’s algorithm has been given by Gries in 1973 [13. NP-completeness of the INCOMPLETE AUTOMATA MINIMIZATION problem has been proven by F’fleeger in 1973 [l]. Many algorithms of minimization of the incomplete automata have been formulated. The following are the most important works in this area: Ginsburg [l], Grasseli and Luccio [l], Biswas [l], Paul1 and Unger [l], and Prather [l]. The exhaustive references concerning the problem of minimization of incomplete automata has been presented by Reusch [3]. The problem of inequivalence of the nondeterministic automata is NP-hard (Garey, Johnson [l]). The problem of minimization of the number of states for nondeterministic automata has been considered by Kameda and Weiner [l], and is partially solved (no polynomial algorithm is known at this point but also no proof of NP-completeness has been formulated). Decision problem of MINIMIZATION OF AUTOMATA has been investigated in 1981 by Mikolajcz&. [ll]. Gupta and Dietmeyer [l] presented the effective (polynomial) algorithms for some subclasses of deterministic incomplete automata.
This Page Intentionally Left Blank
4. Input subautomata
In this chapter we discuss subautomata of an automaton A which belong to the class of the complete deterministic'finite automata. The input alphabet of such subautomata is defined as a subset of the set of all finite length strings of elements of the input alphabet of automaton A. It is characteristic of such subautomata that they have the same state sets as automaton A and their characteristic semigroups are subsemigroups of the characteristic semigroup of automaton A. The class of input subautomata contains the multichannel automata and the subautomata associated with the change of operating time of the automaton A. Construction algorithms of multichannel analogs of automaton A and of an automaton which is an analog of a multichannel automaton are described. The next group of results concerns problems of equivalence and analogy of states in input subautomata, and of equivalence of these subautomata. Later, we discuss structural properties of the input subautomata such as: connectedness, strong connectedness, retrievability, reversibility, controllability. Special attention has been paid to the endomorphisms and congruences in input subautomata based on some semigroup characterizations of these subautomata. 4.1.Introduction
a,
An input subautomaton of an automaton A = ( & C, R, y) is an automaton (S, C,,a,, R,,yJ, where either C,c C* or C,= 2, the function a, is the function restricted to the set S x C,, either R,= R or R,= Ri, and the function y, is the function y in Moore case and y,: S >c C, -+ R, in the case of a Mealy automaton. In previous chapters only automata with one input and one output have been investigated. This chapter concerns automata with i inputs and i outputs, called ichannel automata. The investigations of this type of subautomata began in 1970 Gill [41 by the introduction of the notions of single- and multichannel automata. These investigations were concerned with the transformation of a single-channel (serialoperated) finite-state machine into a multi-channel (parallel-operated) machine, and conversely. A k-channel finite automaton (over C and R) is a finite automaton with input alphabet consisting of all k-tuples over some alphabet C and output alphabet
120
4. Input subautomata
consisting of all k-tuples over some alphabet R :
where case).
a,:
S k x z k + S k , yk: Sk+nk (Moore Case), and
yk:
SkxZk+@
(Mealy
a,
An automaton A = (S, C, Q, y) is a one-channel automaton. A k-channel automaton can be treated as a representation of an automaton with 02, ..., ok) E Ck corresponds k-input and k-output terminals. An input symbol (ol, to the application of oiE C to the input terminal number i (i E ( 1, 2, ..., k ) ) . An output symbol (al, w2, ..., wk)E Rk corresponds to the observation of wi E R at the ~ 2, ..., k)). output terminal number i ( i (1,
Figure 4.1 shows a schematic representation of an i-channel automaton.
Fig.4.1. i-channel automaton The continuation of the investigations of input subautomata took place in 1972 by Grzymala-Busse [9]. The notions of input subautomata A(') and Ad(Q associated with the change of operating time of an automaton A have been introduced. and Cd(l1 as follows: Let i e N.For i we define sets C('I=
(0102.. .oiI ol,02,
..., oiE C)
and
We call subautomata A(') = (S, C(Q, a(i), a, $')) and Ad('] = (S, &(", ad(i),a, $)), where a: S X C* +S, subautomata associated with the change of operating time of the automaton A. Functions (in Mealy case), a(') and ad('>are restrictions of functions y and a to sets S x C(l) and S x Cd(l), respectively. In Moore case we have $'J = 7.
121
4.1. Introduction
Example 4.1. Let A = @ , C, a, a, y) be an automaton given by the diagram on Figure 4.2. We define subautomata associated with the change of operating time A(2)= (S, S2),a(2), 0,y) and AJ2)=(S, X i 2 ) , aJ2), R, y) of the automaton A. The alphabets C(2) and X i 2 ) of the subautomata A(2) and AJ2) are defiied as follows: S2)= (00, 01, 10, 11) and X i 2 ) = (00, 11). The Figure 4.3 shows the diagrams of the automata A(2) and AJ2).
Fig.4.2. Diagram of the automaton A 70.0 I
Fig.4.3. Diagrams of subautomata A(2) and A,(2) of the automaton A
For each automaton A and each i e M the automaton Ad(‘) is not only input subautomaton of the automaton A but also it is the input subautomaton of the automaton A(‘>. The Example 4.1 is a good illustration of this fact.
122
4. Input subautomata
Now we look at the differences between the i-channel automaton A' and the subautomata and A)). Let i > 1. Let t be a time interval. Letters of i-tuple are applied simultaneously to input terminals of the i-channel automaton, and only or Ad(i). The i-channel automaton one letter is applied in subautomaton at the moment t + 1, and the transforms its state according to the function subautomaton Act) or A$) at the moment t+i. The output functions define an output i-tuple over alphabet C l at the moment t + 1 in the i-channel automaton, and only one output letter at the moment t + i in the subautomaton Act) or A)). Let us consider the related strings:
a;
x = oliol2.. .01'021022.. .02.. .o,1ofi.. .on
of length r .i, where r 2 0, obtained from elements of the alphabet C(*l and
of length r obtained from elements of the alphabet Xi. To facilitate subsequent discussion we shall use the notation:
Let A = @ , C, a, SZ, y) be an automaton, let A ' = @ ; , 2, a;, Qi, yi) be an ichannel automaton. Let s~ S and s' E s;. The states s and s' are analogous ( ~ 1 s ' )if for all X E C' such that 1x1 =O(modi) holds
Paraphrasing this formula if the input suing x = 011012...011021022...o,.. .o,+T,z.. .on
applied to A at state s produces the output string
then the input string
applied to A' in state s' produces the output string
4.1. Introduction
123
Automaton A‘ is an !:-channel analog of the automaton A if for all S E S there exist s’ E S such that s 1s’. Automaton A is a one-channel analog of the i-channel automaton A’ if for each s’ E S there exists s E S such that s’ Ls. Consider the i-channel automaton Ai = (Si,2,ai, Qi, yi). State s E S satisfies the prefii condition if for all i-tuples (ol,o,, ..., ok,ok+l,..., oi)E Ci and k = 1, 2, ..., i - 1
implies YI(S, ((31, 0 2 ,
..., ob O’k+1’ ..., o’J)=(m1, o;?, .-.,q,O ’ k + l , -.., W’J
for all ( o ’ ~ +.. ~.,, cryi)E That is, s satisfies the prefix condition if for all k l i , the fist k coordinates of the input vector uniquely determine the f i i t k coordinates of the output vector (where k = 1, 2, ..., i - 1). We say, that Ai satisfies the prefix condition if each state S E S satisfies the prefix condition. Algorithm 4.1. Input: The automaton A = (S, C, a, 52, y). Output: The i-channel automaton A! = (Si, 2, ai, Qi, yi). Step 1: Let Si = S. Step 2: Construct Cias the set of all tuples over the alphabet C. Step 3: Put ai(s, [xl)=d(s, x). yi(s, [XI)= [y(s, x)] for all S E S and each such that Ixl = i.
XE
Z*
Algorithm 4.2. Input: An i-channel automaton satisfying the prefix condition A! = ( S , 2, ai, Ri, Output:
YJ.
The 1-channel automaton A = (S, C, a, 52, y).
Step 1: For all S E Si define P ( s ) = ((s, op, ...o&Io,o,... o , W ~ ) ) ,k = 1, 2, ..., i - 1. Step 2: Set S(s)=
i- 1 u SO)($). k= 1
Step 3: Find S = S i u ( u S(s)). SE
Si
124
4. Input subautomata
Step 4: Define a as follows: a(s, O,O,... o&= (s, qo,...o&, k = 1, 2, ..., i - 1; a(s,
o,o,...oi)=ai(s,(q,6 2 , ..., q)).
Step 5: Define y as follows: y, ..., wi), then if yi(s, (q,(T, ..., oi))= (q, t(s, c ~ ~ c T ~ . . . c T & = w k =~ 1, ~ .2,. . ..., o ~i., Figure 4.4 shows the construction of the transition function and the output function of the one-channel automaton from a given i-channel automaton.
A-
I
Fig.4.4. The construction of an I-channel analog according to Algorithm 4.2
a of an i-channel automaton A!
Theorem 4.1. Let A = @ , C, a, Q, y) be an automaton. The automaton A!= (Si, Xi, &, sZi, yi) as constructed by Algorithm 4.1 is an ichannel automaton A . Proof. By Step 3 of Algorithm 4.1, for all x E C(l1, and [XI E 2 we have s 1 s.
SE
S, Si= S and each x = [XI,where
Q.E.D.
ai,
Theorem 4.2. Let A! = (Si, 2, sz', yi) be an i-channel automaton, The automaton A = @ , Z, a, Q, y) as constructed by Algorithm 4.2 is a 1-channel analog of the automaton A!. Proof. By the definition of the output function in Step 5 of Algorithm 4.2 for each s E Si and x E (Xi)* we have s 1 s', where s' E S i n S. Q.E.D.
4.1.Introduction
125
ai,
Theorem 4.3. Given i-channel automaton A! = (S,2, sZi, yi) has an 1-channel analog A = ( & C, 3, sZ, y) if and only if A! satisfies the prefix condition. Proof. (a)Let . A be a 1-channel analog of k.Suppose A! does not satisfy the prefix condition. Then for some S E Si there exist x, y and y’. where [ x y ] , [xy’]E Ci and bl, [y’] E such that yi(s, [xyl) = (al, m2, ..., ok,w ~ + ..., ~ , oil and yi(s, [xy.’l)= (q,q,..., wok, o ’ ~ +..., ~ ,w’J, where okzwo,. Let s1 E S be such that s1 Ls. By the definition
which implies that the function y(sl, x ) is not uniquely defined. (e). It is immediate from Theorem 4.2. Q.E.D.
4.2. Equivalence of states and equivalence of automata
We shall begin our considerations of properties of input subautomata with some problems of equivalence of automata. First we note two facts associated with the equivalence and analogy of states. Let A = ( S , C, d, SZ, y) be an automaton, let A!= (Si, Xi, di, Ri, yi) and A,! = (,Si,Xi, Ri, T i ) be i-channel automata. Let S E S, s1E Si and S ~ S’i. E If sLsl and s’s, then s1=s2 Let A!= (Si, Ci, di, Ri, yi) be an i-channel automaton, let A = ( S , C, d., SZ, y) aqd A , = (Sl, C, a,, SZ, yl) be automata. Let S E Si, s1 E S and S ~ ES,. If s’s, and sLs2, then s1=s2
Theorem 4.4. If an automaton A is minimal then its i-channel analog A! as constructed by Algorithm 4.1 is also minimal. Proof. Suppose A is minimal but its i-channel analog A! is not minimal. It means that there are two distinct states s, s’E S such that s = s’. Hence, for each [XI E (Xi)* we have yi(s, [x])=yi(s’,[x]). By Step 1 in Algorithm 4.1 Si = S and then also for each x E (C(I’)* we have [y(s, x)] = yi(s, [XI) = yi(s’, [XI) = [?(s’, x)l. Thus y(s, x ) = y ( s ’ , x). This implies srs’ also in the automaton A, which contradicts the minimality of A. Q.E.D.
In conclusion, we can state that if we find by Algorithm 4.1 an i-channel analog A! of the automaton A then no i-channel analog of A has fewer states than the minimal form of A!. Note also that for every minimal automaton A there
126
4. Input subautomata
exists an i-channel analog A! such that Ai has the same number of states as A. An ichannel analog of A with fewer number of states than A does not exist. On the other hand, a 1-channel .analog A as constructed by Algorithm 4.2 is not necessarily minimal even when the i-channel automaton A! is minimal. Hence, the number of states in A may be larger than the number of states in A!. The number of states of an automaton A satisfies the following condition: Card(Si) I cXd(S) I Card(Si) * (Cad(C))’- l), where S and Si are sets of states of automata A and A!, respectively. Standard minimization techniques often reduce card(S) below the upper bound. The following is immediate. Let A! and A be as defined in Algorithm 4.2. Then no 1-channel analog of Ai has fewer states than the minimal form of A . Now we go to the discussion of the equivalence in the second subclass of the input subautomata, namely to the subautomata A(1) and A)) associated with the change of the operating time of an automaton A . First, we note that the equivalence of states sl, S ~ SE in an automaton A implies the equivalence of the same states in subautomata A(1)and A,(O for each i E N.This follows directly from the fact that if s1 = s2 then for each x E C* we have y(sl, x)=y(sz, x ) , hence in particular it is m e for each X E (C(S)* and xE
(qp)*.
Conversely, the equivalence of states in A(9 and Ad@’ does not imply the equivalence of states in A . This fact is shown in the following example.
/
/
Fig.4.5. A diagram of the automaton A
4.2. Equivalence of states and equivalence of automata
127
Example 4.2. Let A = ((so, sl, s,, s3, ,s, s5), { O ) , a, (0, l ) , A) be an automaton. Figure 4.5 shows a diagram of A. It is easy to note that A is minimal. Figure 4.6 shows a diagram of the subautomaton A(3)=Ad(3). We can see that it is not minimal because so = s1 = s, and s, 3 s3= s,.
Fig.4.6. A diagram of a subautomaton A(3)= A,(3) of the automaton A
Note also that the distinction of states sl, s2 in a subautomaton Ad@ of an automaton A implies their distinction in a subautomaton of the automaton A and this implies their distinction in the automaton A. Thus we can say that if a subadtomaton A)) of an automaton A is minimal, of A is minimal and it implies that A is also minimal. then a subautomaton Now we shall discuss some other properties of input subautomata. The output function in these investigations can be disregarded, and thus we shall discuss only automata without outputs (S, C, a), and call them simply, automata. Let A = (S, C, a) be an automaton, let i E M, let A! = (S, Xi, ai) and A(Q = (S, W)be an i-channel analog of A constructed by Algorithm 4.1 and a subautomaton associated with the change of operating time of the automaton A, respectively. Note, that the set of states S is identical for automata A, Ar and A(i). Note also, that according to Algorithm 4.1 for each S E S and X E Z(I) we have Si1,
On the other hand by the definition of the subautomaton A(L),for each we have
X E Si3
aqs, x)
=a(& x).
SE
S and
128
4. Input subautomata
Thus for each
SE
S and
XE
C(I1 we
obtain
a,(& [XI)= a q s , x), and in consequence, we can consider equivalence of functions ai and W , and analogy of automata A! and We can not put equality between Al and because there is a difference in the construction of their input alphabets. These alphabets have the Same cardinality and there exists a bijection f: C(l14 2; because of this fact in further investigations we call both types of subautomata (ichannel analog and a subautomaton associated with the change of operating time) input subautomata. Now we denote input subautomata of an automaton A by A'= (S, Xi, &) and Ad = (S, Ci,8:). We assume that the transition function of an automaton A acts at moments t = 1, 2, 3, ... of time and the states are observed at moments t . Let us change this assumption and observe states of an automaton at moments t = 1, i + 1, 2i + 1, ... for certain fixed natural number i. It is easy to see that the automaton A represents the input subautomaton A' of A . In this way, by the change of number i of a given automaton, one can get a family of, in general, non-isomorphic automata. Investigating input subautomata Ad we assume additionally that one can change input symbols only at moments t = 1, i + 1, 2i + 1, ... of time. 4.3. Connectedness
In 1970 Bavel and Muller [l] . introduced a classification of the types of automata connectedness. In the class of DFA there are four basic kinds of connectedness: strong connectedness, retrievability, semi-reuievability and reversibility. The first two kinds have been defined in Chapter 2. An automaton A = ( S , C , a) is semi-retrievable if and only if for each o~ C and s E d(S, o) there exists an x E C ' , satisfying a(s, xo) = s. An automaton A = ( S , C , a) is retrievable if and only if for each Q E C there exists x E C* such that for each s E S there is a(s, ox) = s.
STRONG CONNECTI Vl
- RE TRIEVABIL I TY
Fig.4.7. The diagram of implications of the four kinds of connectedness
4.3. Connectedness
129
Figure 4.7 shows the diagram of the implications between these four kinds of connectedness. Based on this diagram we can partition the class of DFA into six nonempty subclasses as it is shown in Table 4.1. In this table “0” means the absence of the property and “1” - the existence of the property. Table 4.1. The partition of the class of DFA implied by types of connectedness
Type of the connectedness class strongly retrieconnected vable
5
0 0 0 0 1
6
1
1
2 3 4
0 0 0 1 0 1
reversible 0 0 1 1 1 1
semiretrievable 0 1 1 1 1 1
Various classes of the connectedness of the input subautomata have been investigated in Bergandy El, 21, Gnymala-Busse [9], Miadowicz 131, Pawlaczyk [I, 21. Analyzing the definitions of input subautomata and strong connectedness we obtain the following corollaries. Corollary 4.1. If some input subautomaton Ai of automaton A, where i e (1, 2, ...), is connected (strongly connected) then the automaton A is connected (strongly connected). Corollary 4.2. If some input subautomaton A d of automaton A, where iE (1, 2, ...), is connected (strongly connected), then the automaton A is connected (strongly connected).
The truth of
these corollaries follows directly from
(Xi)*c (Xi)* c X* for each natural number i .
the fact that
Corollary 43. Let A’ (Ad, respectively) and AJ (Ad’, respectively) be input subautomata of an automaton A. Let j l i . If A’ (Ab) is connected (strongly connected), then P j (Ad) is connected (strongly connected). There is simple justification for this statement, namely if j I i then (Xi)’ c_ (Xi)” and (Xi)* c (a)*.
130
4. Input subautomata
We denote by D the greatest common divisor of the lengths of all cycles of all autonomous factors of the automaton A. Corollary 4.4. Let i E ( 1, 2, ...) , let Ai be an input subautomaton of an automaton A. If A is connected (strongly connected) and g.c.d.(i, D)= 1, then A' is connected (strongly connected). Corollary 4.5. Let i E { 1, 2, ...), let A b be an input subautomaton of an automaton A. If Ad is connected (strongly connected) then A is connected (strongly connected) and g.c.d.(i, D)= 1. Example 4.3 shows that the connectedness (strong connectedness) of automaton A does not imply the connectedness (strong connectedness) of an input subautomaton A d even if g.c.d.(i, 0)= 1. Example 43.
Figure 4.8 shows a diagram of a strongly connected automaton for which
D = 1, and an input subautomaton Ad2 of the automaton A which is not strongly connected. It has been shown in Chapter 2 that each automaton can be characterized by two numbers k and m, where k = max(2(Aii)) and m = l.c.m.(dc(Ay)), and regarded as (k, m)-asynchronous. This property will be very useful in the presentation of the next theorems. Note that a (1, 1)-asynchronous automaton is simply an asynchronous automaton and a (0, m)-asynchronous automaton is a permutation automaton. We shall use, in the next par& of this chapter, the name of (0,m)-asynchronous automaton instead of the permutation automaton.
A Fig.4.8. The diagrams of an automaton A and its input subautomaton Ad2
4.3. Connectedness
131
Lemma 4.1. Let A = ( & C, a) be a (k, m)-asynchronous automaton. If for two states sl, s, E S there exist o E C and a natural number n such that a(s,, om) = a@,, 0 ( * 1 ) ~ ) = s2, then for each natural number i there exists the word x E (Xi)* such that a(s,, x)=s,. Proof. Since a@,, om)=a(s,, ~ ( " + l ) ~ ) =therefore s,, s, belongs to some cycle c in an autonomous subautomaton A,. Denote the length of this cycle by d,. It follows from the definition of the number m that there exists natural number p such that m = p d,. For each natural number q there holds d(s,, d m + q d C ) ) = s,. Moreover, for each i there exist natural numbers q, t such that n .m + q . d, = t i. And accordingly d(s,, oa)= s,, where otiE (Xi)'. Q.E.D.
-
-
Theorem 4.5. Let A = ( S , C, a) be a (k, m)-asynchronous automaton. Let n be a natural number such that n . r n 2 k . An input subautomaton A: of the automaton A is connected (strongly connected) for each natural number i if and only if Adm is connected (strongly connected). Proof. (+) This part of the proof is immediate. (e=) Assume that Adm is a connected automaton. It means that for each pair of states s,, S b E S there exist strings
and
such that &s,, x,)=s,+, or d(s,+,, x,)=s, for each t = 1, 2, ..., r - 1. Considering that for each S E S and O E C, a(s, om) is an element of some cycle in the autonomous subautomaton A,, we conclude that for each t = 1, 2, ..., r - 1 there exist o , C~and natural number n, such that a(s,, o,"P)=a(s,, ~ t ( n t + l ) ~=) s,+~ or a(s,+,, O~P)=~(S,+ or(nt+l)m)=st. ~, By Lemma 4.1 for each t = 1, 2, ..., r - 1 and for each natural number i there exists a word X,E (Xi)* such that a(s,, X , ) = S , + ~ or a(s,+,, x,) = s,. It means that A: is connected for each natural number i. Now assume that AdNnis strongly connected. Then for each pair of states sl, S ~ E S there exists such C E C that a(s,, om)=s,. Because a(s,, om) belongs to some cycle in the autonomous subautomaton A?, then a(s,, om)=~(s,, ~("+l)~) Hence, = s ~ by Lemma 4.1, we have that Ad is strongly connected for each natural number i. Q.E.D.
132
4. Input subautomata
Theorem 4.6. Let A =(S, C, a) be a strongly connected (0, m)-asynchronous automaton, let i E M. If g.c.d.(i, m)= 1, then the input subautomata A‘, Ad are strongly connected (0, m)-asynchronous automata. Proof. If A is (0, m)-asynchronous, then each state S E S belongs to a cycle in each A,, where (JE C. Since A is strongly connected then each cycle is reachable from any cycle. The number m is the least common multiple of the lengths of all cycles of all autonomous factors of automaton A . Because g.c.d.(i, m) = 1 then in Ad each cycle in A , consists of exactly the same states as in corresponding cycle in A . Thus Ad is (0, m)-asynchronous and strongly connected and this implies strong connectedness of A’. Q.E.D. Let us note that the strong connectedness of all input subautomata Ai of a (k, m)-asynchronous automaton A = (S, C, 3) with card(S) > 1 implies that every state S E S is an element of some cycle in some autonomous subautomaton A , and an element of some tail in some autonomous subautomaton A,, at the same time, where Q, (J’E C . To prove this, assume that there exists a state S E S which is exclusively an element of cycles in all A,. Because by the definition the number m is the least common multiple of all cycles in all A,, then we obtain a(s, om) = s for each Q E C and for each natural number n. Thus Adm is not strongly connected because from the state s one can reach only the Same state s. It is contradictory to Theorem 4.5. Now suppose that an S E S is an element of tails only in all A, of the automaton A. Since the number k is by the definition equal to max(z(Aii)) in automaton A, . then for each natural number p > k we obtain that sc u d(s, op). (JE C This means that AJ is not strongly connected, because s is not reachable in Af, thus we have a contradiction. Now we will show the method of determining the connectedness (strong connectedness) of input subautomata Ad of automaton A , based on especially constructed graph Ti(A) of the automaton A . Let us define the following notation: A sequence of states s =sl, s,, ..., s,,=s’ of an autonomous factor A,, with Q E C, of an automaton A such that 0 )= si+l for all i E (1, 2, ..., n - 1 ) , will be called a path. If all elements of a path are distinct then the path will be called a simple path. We define for a given automaton A = (S, C, a) the set S,={sIsE
S, VOE c, V k E M, a(& ( J k ) # S ) .
This set contains all states which do not belong to any cycle in any autonomous factor A , in the automaton A, where Q E C. If S,# 0, then for every state s E S,
4.3. Connectedness
133
we define a ~ t ~ r number a l p, equal either to the length of the longest simple path which reaches the state s or 0 if the state s is not reachable from any state in the automaton A . We define, for the automaton A , the number pA= min (p, I s E S,).
Lemma 4.2. Let A = ( S , C, a) be an automaton with S,#0. If an input subautomaton A b of A is strongly connected, then pA2i. Proof. If Ad is strongly connected, then for each s E S, there exist s’E S and Ci such that a($, x ) = s . This means that for each S E S, there is in A a simple path, the length of which is equal to i and this path reaches the state s. Thus for each state s E S, we have p , 2 i, and in consequence pA2 i. Q.E.D.
XE
It follows from Lemma 4.2 that if an input subautomaton A; is strongly connected for each natural number i, then S , = O . It means that every state in A belongs to a cycle in some autonomous factor A , with Q E C, in A . Let A = ( S , C, a) be an automaton and let c be a cycle in A , associated with Q E C. Let S, be the set of all elements of c, let d, be the length of c. Let i be a natural number. We define the function J , ,: S, + (0, 1 , ..., g.c.d.(i, d,) - 1 ) as follows: - for arbitrary, fixed s E S, we put fi, ,(s) = 0, - for every k = 1, 2, ..., g.c.d.(i, d,)- 1 we put fi, ,(a(s, d))=k(mod g.c.d.(i, d,)).
Note that f;, , is not an injection, thus f;,1 ; is not a function but a relation such that for arbitrary W E (0, 1, ..., g.c.d.(i, d,) - 1 ) we have
Lemma 4.3. For every pair of states s, s’ in an automaton A = (S, C, a) such that s, s ’ ~ f i,-l(w), , where W E (0, 1, ..., g.c.d.(i, d,)- l ) , there exists X E (Ed)* such that a(s, x ) = s’. Proof. Consider a cycle c the length of which is equal to d, in some autonomous factor A,, where Q E C. If s, s’~ f i ,-‘(W), , then a(s, op) =s’, where p = n .g.c.d.(i, d,) for some natural number n. Since the states s, s’ belong to cycle c in A thus a(s, op+mdc)=s’ for each natural number m. It is obvious that there exist natural numbers m and r such that n g.c.d.(i, d,)+m. d, = r i. And consequently a(s, Q ~ =) s’, where Q ~ ( C E : ) ’ . Q.E.D.
4 . Input subautomata
134
Denote by C the set of all cycles of all autonomous factors A, of automaton a), where 0 E C. For automaton A we define the set T‘ as follows:
A = (S, C,
i”=
u C E
c
V,, c - ’ ( ~ ) I ~ = O , 1, ...g.c.d.(i, d,)- 1 ) .
It is easy to see that T ’ = P ( S ) . Next, we define in the set Z‘ the relation p as follows: t p t ’ , t , t’ E T’ if there exists a sequence t = t l , t2, ..., tk = t ’ , where t l , t2, ..., tkE T’ and t,,n tn+, $0 for every. n = 1, 2, ..., k - 1. It is obvious that p is an equivalence relation on the set T’. Let us define the set (F)*= { u t I B E p). tE B In other words every element of the set (F)* is the sum of all sets contained in the same equivalence class of the relation p. For an automaton A = ( & C, we define the graph Ti(A)=(Vi, Ri) as follows:
a)
- the set of vertices Vi = (i“)*u S, - the set of branches Ri c Vi x Vi, where (v, v’) E Ri if a(v, Xi) = v. It means that (v, v’) E Ri, if there exist s E v, s’ E v’ and x E Xi such that a(s, x)=s’.
Theorem 4.7. An input subautomaton Ad of an automaton A is connected (strongly connected) if and only if the graph Ti(A) is connected (strongly connected). Proof. ( 3 )This part of the proof results directly from the construction of the graph Ti(A). (e) Take into account the definition of the graph Ti(A). It suffices to show that for arbitrary states s, s’ E t* E (P)* there exists an X E (Xi)’ satisfying a(s, x ) =s’. Suppose that s, s’ are elemenis of t, t’, respectively, where t, t‘ E T’, t G t’ and t’ c t*. Then there exists a sequence of elements t = t,, t,, ..., tk = t’ E T’ such that t,,ntn+l # 0 for n = 1, 2, ..., k - 1. Select one state s,,E t , A t,,+l for every n = 1, 2, ..., k - 1. By Lemma 4.3, for every n = l , 2, ..., k - 2 there is an element x E (Xi)* with a(s,,, x ) = s,,+~. Furthermore, there exist elements x,,, xk-1 E (Xi)’ such that a(s, x,J=sl and a(sk-1, xk-1) = s’. Since x,, x,, ..., xk-1 E (Xi)* then x = x,,xl...xk-, E (Cd)*,thus a(s, x ) = s’.
Q.E.D. Now we shall consider questions associated with the property of retrievability of input subautomata A’ and Ad. Let us note the following facts: (a) if A is strongly connected, then it is remevable, (b) if A is reversible, then it is retrievable, (c) if A is remevable and connected, then it is strongly connected,
135
4.3. Connectedness
(d)
A is retrievable if and only if all connected components in A are
strongly connected, (e) if A is retrievable, then it is an “onto” automaton. We are ready to formulate the following corollaries: Corollary 4.6. An input subautomaton Ai of an automaton A is retrievable for every natural number i if and only if A is retrievable. Corollary 4.7. If for some natural number i an input subautomaton Ad of an automaton A is retrievable then A is retrievable. Example 4.4 shows that the fact that A is retrievable does not imply retrievability of an input subautomaton Ad. Example 4.4.
Figure 4.9 shows a diagram of a retrievable automaton A and a diagram of its input subautomaton A 2 . It is easy to see that A 2 is not retrievable.
Fig.4.9. Diagrams of retrievable automaton A and of its input subautomaton Ad2 The next theorem gives the necessary and sufficient condtions of the retrievability of an input subautomaton Ab of an automaton A for each iE N. Theorem 4.8. Let A = @ , C, 6) be a (k, m)-asynchronous automaton, let n be a natural number such that n m 2 k . An input subautomaton Ad of A is retrievable for each natural number i if and only if Adm is retrievable.
-
Proof. ( 3 )The part of the proof is immediate. (e) It is known that an automaton is retrievable if and only if it is a union of Strongly COMeCted Components. k t (Adm)l = (sl, z d m , (8dm)’) and (Adm)2= (s2, Cdm, (tjdm)2)be strongly connected subautomata of an automaton Adm, where S1, S 2 E S, ( 8 P ) i : S1xzdm and (8dm)2: S2xzdm. Let us select two states S,E s1 and S ~ ES2. Suppose that &s, o’)=sb for some O E C and some natural number i. The assumption n m 2 k implies that 6(s,, om)= s is an element of a cycle c with length d, in an autonomous subautomaton A, of the automaton A. At the same time S E S , , because (Adm) is strongly connected. It follows from the
136
4. Input subautomata
definition of m that for some natural number q there holds m =q.d,. Moreover, there are natural numbers a and b satisfying n .q d,+ a . d, = (b+ 1). Hence 6(s,, o@+l).r) = 6(6(s,, i), ob.')= 6(sb, ob.i) = s and qs,, om) = 6(s,, o".q&+"'&> = s. Furthermore, if (AdNn)lis strongly connected then for each ordered pair s, S,E S there exists a sequence of states s = s,, s,, ..., Sk-1, sk = s, E S, such that for every t = 1, 2, ..., k- 1 there is a ofE C satisfying 6(s,, okm)=6(s,, ot(n+l)+")= s,~. Thanks to Lemma 4.1 we obtain 6(s, x ) = so, where x E (I;;)*. Q.E.D.
-
As a consequence of this theorem we have that if an input subautomaton Ad of an automaton A is retrievable for each i, then each state in A belongs to at least one cycle in some autonomous subautomaton of A . Next, the property of semi-retrievability will be discussed. Let us note the following fact: if an automaton A is strongly connected and reversible or retrievable, then it is semi-retrievable. The next theorem states the necessary and sufficient conditions of the semiretrievability of an input subautomaton Ad of an automaton A for every number ie M. Theorem 4.9. An input subautomaton Ad of a (k, m)-asynchronous automaton A = ( S , I;, 6) is semi-retrievable for each natural number i if and only if for every pair (s, o)E S x I; such that the state s is an element of a tail in autonomous subautomaton A , and for every t = 1, 2, ..., k there exists a word X E (C,t)* such that 6(s, xo? = s.
Proof. (a) The proof of necessity is immediate. (G) It is easy to see that for a state s, which is an element of some cycle in A , and for each natural number i there is a natural number n such that 6(s, o"W) = s. Consider an arbitrary state s which is an element of a tail in A,. From the assumption we have that for each natural number t less or equal to the length of the longest simple path reaching the state s in A , there exists a word x E (C,?* such that 6(s, xol) = s. Q.E.D.
The problem of semi-retrievability of input subautomata A' is still open. The necessary and sufficient conditions for an input subautomata A' to be semiretrievable are not known. One can only state that the semi-retrievability of an automaton A does not imply the semi-retrievability of an input subautomaton A' for any natural number i > 1. This fact can be illustrated by the following example.
4.3. Connectedness
137
Example 4.5. Figure 4.10 shows a diagram of a semi-retrievable automaton and a diagram of its input subautomaton A2. We can see that A2 is not semi-retrievable because 6(so, aoal) = s2 E 6(S, aoal), but for each x E &, &s2, xooal) f s2.
I^ A Fig.4.10. Diagrams of a semi-retrievable automaton A and its input subautomaton A2
Ending the discussion about the connectedness we will show the necessary and sufficient conditions of the reversibility of input subautomata A' and Ad of automaton A for each natural number i. Theorem 4.10. An input subautomaton Ad of an automaton A = @ , C, 8) is reversible for each natural number i if and only if every autonomous subautomaton A, of the automaton A is reversible.
Proof. (a) The reversibility of A, means that its graph consists of cycles only. Assume that a state slE S is an element of a tail in A,, o E C. Let i be a natural number such that 6(sl, a') = s is an element of a cycle in A,. There exists state s2c S in the same cycle such that @s2, @=s. Since Ab is reversible, for oi there exists a word X E (Cd)' such. that it satisfies 6(t, oix) = t for every state t~ S. Thus we obtain:
138
4 . Input subautomata
In consequence, if Ad is to be reversible then s1 =s2. which contradicts the assumption that s1 is an element of a tail in A,. (e) For every o e C and every arbitrary natural number i there exist natural numbers p and q satisfying p k - i = q i. Thus, there exists x = oq., E (Xi)* such that for every state s E S we have 6(s, dWi) = s. Q.E.D.
-
-
Theorem 4.11. Let ie M. If an automaton A is reversible then an input subautomaton A' is reversible.
Proof. Let A = ( S , C, 6) be a reversible automaton. Let us select an arbitrary ~ For every k = 1, 2, ..., i there exists a word X k E C' sequence ol, 02,..., a , c. such that &(so, o$,J =so for every so E S, because A is reversible. Moreover, for each state so' S there exists a sequence of states so, sl, s2, ..., s i € S such that 6(sk-,, 03 = sk and 6(+ x& =sk-1 for every k = 1, 2, ..., i. Thus we obtain 6(so, olo,... a,)= s i and 6(si, xsi-l...xl)=so. Hence we have &so, o1o,...oixixi-1..4) = so.
Let us denote lx,~,-~...x~l =q. For every natural number p there holds 6(s, (G1G2.. .ai)(xfii-l.. .xl)(ol...a~fi,-l...x~)p) = so.
For arbitrary natural numbers i, q there exist natural numbers n and p such that q + (i + q) - p = n i. This means that +
where
I(x$i~l...xl)(olo2. ..a&xi-l...xl)G+q)pI = q + (i + q) ' p = ?*Ii. Thus we have proved that for every olo,...ai E Xi there exists x E (Xi)*such that for an arbitrary state so E S there holds &(so, 0102...o$)= so, and therefore the input subautomaton A' is reversible. Q.E.D.
Next we present some remarks concerning the connectedness of input subautomata A' and A: of (k, 1)-asynchronous and asynchronous automata. - Input subautomata A' and A d of (k, 1)-asynchronous automaton A are connected €or arbitrary natural number i if and only if A is connected. - An input subautomaton Ad of a (k, 1)-asynchronous automaton A is retrievable (strongly connected) for an arbitrary natural number i if and only if A: is retrievable (strongly connected).
4.3. Connectedness
139
- An input subautomaton A' of a (k, 1)-asynchronous automaton A is retrievable (strongly connected) for an arbitrary natural number i if and only if A is retrievable (strongly connected). - Input subautomata A' and Ad of an asynchronous automaton A are retrievable (connected, strongly connected) for an arbitrary natural number i if and only if A is retrievable (connected, strongly connected). - An input subautomaton Ad of an asynchronous automaton A is semiretrievable for an arbitrary natural number i. Now we shall present a method of determining the connectedness of all input subautomata A' directly from the properties of the automaton A. (Bergandy [l, 21). In Chapter 2 the partition R R induced ~ ~ by the strong connectedness relation R,, has been defined. Here we define additionally a relation Rss on the set of states S of an automaton A. Let s, s' E S, sRJ ~ ( s E' 6(s) U S E 6(s')). We call this relation the connectedness relation of a given automaton and the partition x : induced ~ ~ by relation R , we call the connectedness partition. In this section R ~z. ~Two states belong to the same for simplicity we denote ' F R ~by R and ~ c by block of the partition R ( Z ) if they are states of the same connected (strongly connected) component of the automaton A. The partition ni denotes the partition on the state set S of input subautomaton A' of the automaton A corresponding to the connectedness relation. If automaton A is connected then x: = 1 which means that A has only one connected component. We define the relation 31 on the partition z in an automaton A as follows: B S B , if 6(B, C ' ) nB , # 0,
where B and B , are blocks of the partition. Relation 31 is antisymmetric, transitive and reversible. It means that % is a partial ordering on z.
Lemma 4.4. Let A = @ , I;, 6) be an automaton. Let n and i be natural numbers such that n I i . Then n ' I R". Proof. Take two arbitrary states s, sb€ S such that sa=sb(ni).We know, by the definition of the connectedness, that there are sequences x,, 3, ..., x, E (Xi)* and s, = sl, sz. ..., sk-, = sb E S such that Zi(s,, x,) = s,+, or Z~(S,+~,x,) = s, for arbitrary q = 1 , 2, ..., k-1. For each q E ( 1 , 2, ..., k - 1 ) we obtain x q = ( X i ) * = (F.p)' G (C")', where i = n ' p . Thus s , = sb(nn). Q.E.D.
In other words the above result states that if n is a divisor of i then An has no more connected components than A'.
4 . Input subautomata
140
Theorem 4.12. Let A = (S, C, 6) be an “onto” automaton. Then ni + nJ= @cd(i, A for any natural numbers i, j . Proof. Let for s,, S holds S ~ = S ~ ( W ~ ( ~ , From ~ ) ) . the definition of the connectedness it follows that there exist sequences s, = sl, s, ..., s, = $, E S and xl, x2, ..., Xk-1 E Cgcd(i, 1’ such that either 6(sq, x,) = sq+l or 6(sq+,, x,) = sq for q = 1, 2, ..., k- 1. Let it, for s, ,,,s, be 6((sq, x,)=s,+,. For each pair of natural numbers m, n there exist f a , tbbE S and yu, Y b E C* such that 6(sq+,, y,)=t, and i3(sq+!, y y b ) = tb, where ly,l = m .i and lybl= n .j. From the above we have ,,s, =ta(n‘) and t, = tb(n/). Thus s,+~= tb(ni+w). From the above we conclude that 6(s,, Xqy&) = tb, where Ixgybl= g.c.d.(i, j ] + m i + n . j .
i
Since g.c.d.
j
j=,
g.c.d.(ij) g.c.d.(ij> then there exist natural numbers mo and no such that iik+yy,l where ly,i=n,.i and l y , l = ~ ~ - j . In this manner we receive sq=tb(zi) and therefore sq = s,,,(n‘+
761).
Q.E.D.
This result defines the addition on the set of all partitions generated by the connectedness relation in input subautomata A’ of automaton A. This addition is, according to the theorem, an internal operation, because a partition obtained as a result corresponds to the connectedness relation in some input subautomaton of an automaton A. Note also that from Theorem 4.12 and definition of addition of partitions it follows that if two states are in the same connected component of an input subautomaton A’ or Ai then key belong to the same connected component of an input subautomaton Aged('. J). The opposite theorem is false. Theorem 4.13. Let A = @ , C, 6) be a connected “onto” automaton. If w=g.c.d. (v,, v2, ..., vk, i ] , where vl, v,, ..., vk are natural numbers such that for each v, E (vl, v,, ..., v,) there exist states t, t’ E S and words x , x’ E C+ such that 6(t, x ) = 6(t, x ’ ) = t’ and lxl> W1, where vq = Ixl - W I , then d =KW for each natural number 1.
Proof. Without loss of generality we conduct the proof for w = g.c.d.(v, i), where v = Ixl -Ix’l. It directly follows from Lemma 4.4 that $Inw. Let s=s’(nw)for s, s’ E S. Thus there exist sequences s= s,, ,s, ..., s=, s’ E S and xl, x2, ..., x,-~ E Cw such that either &s,, xq) = s,+, or 6(s,+,, xq) = s, for each q = 1, 2, ..., n - 1. We shall show that S,=S,+~(KL) for each 4= 1, 2, ..., n-1. Let there be 6(sq, xq) = sq+l for some 4 E ( 1, 2, ..., n - 1 ). Since A is a connected and “onto”
141
4.3. Connectedness
automaton, for each pair of states (sq, sq+,) there exist sequences (sq, sq+,)=(tl, t ’ , ) , (t,, t ’ J , ..., (t,, t ’ , ) ~SxS, x q = y I , y2, ..., y , Cw ~ and y’,, y’,, ..., y ’ , ~C* such that S(t,, y,)=t’, for p = 1, 2, ..., m and ly’,l=u,.i --w for p = 1, 2, ..., m - 1, where up is some natural number and either 8(t’,, y’,) = tP+, or &t’,+,, y’,) = t, for p = 1, 2, ...i m - 1 and 6(t’,, y’,,,) = t,. From the above we have that or either &tp, yp’&= t,+] or y,+,y’,~ = tp and either &t’,, y’2,,+,) = 8(t’p+l, y ’ g , ) = t’, for p = 1, 2, ..., m - 1. Since lyp’,l= I y ’ g J = Iy,+,y’,l = ly’.ppll=u,.i thus tP=t,+,(ni)and t’,=t’p+l(n’)for p = 1, 2, ..., m - 1. For the pau of states (t,, t’,,,) there exist sequences (t,, t’,,,) = (ro, r’o), ( r , , r’ ,), ... E S x S, y, =,z, z,, ... E X* and y ’ , = z ’ ~ , z’,, ... E C’ such that &r,+,, z,+,z’,+,xz’~ = rk and 8(r’,+l, z’,+,x’z’& = r’, for k=O, 2, 4, ... and &rk, Z $ ’ f l Z ’ k + l ) = r , + l and S(r’,, z’~’z’,+,z,+,) = r’,+, for k = 1, 3, 5 , ..., where lzkl = k . vq f w, and we have Iz,+~z’,+~xz’,~ = b, .i, I z ’ , + ~ x ’ z ’ ~ , ~= b’, i for k = 0, 2, 4, ..., and Izg’~z’,+,l = b, . i, l z ’ ~ ’ ~ ’ , + ~ ~ , + , I = bfor ’ , . ik = 1, 3, 5, ..., with natural numbers b,, b’,, b,, b J 1 ,... . From the above construction we obtain r,= rk+l(n’) and r’, = ~’,+~(n~)
-
for k=0,1,2,... . Since g.c.d. then w + u . v q = O (mod i) for some natural number a. Thus r q = fq (ni )what means that ro=fo(a’) and then t,=t’,(n’). It implies sq=sq+,(n’)and thus s=s’(n’). It has been shown that nwSniand consequently ni=nw. Q.E.D. Now we define and give a method for finding the characteristic number R for a connected “onto” automaton. We define R in the following way: R = min ( q I xi = ngcd(i, q), for each i E N)
The above defined number is characteristic of a directly from the definition of R and Lemma 4.4 fact, the set { q Ini=ngcd(i. q ) , V i E W) is infinite but of number R. We present now a procedure for connected “onto” automaton A = (S, C, 8).
given automaton. It follows that nRR+. As a matter of all its elements are multiples determining R for a given
Let (B,, B,, ..., B , ) = (BIB E z, card@)> l ) , where z is a partition on S generated by strong connectedness relation of an automaton A. We denote Y = ( ( B p , B J l p , q = 1 , 2, ..., t ; p # q and B,%B,) and D=g.c.d.(d,(A,), (TE C).
142
4 . Input subautomata
Algorithm 4.3. Input: A connected “onto” automaton A = (S, C, 6). Output: The characteristic number R of automaton A. Step 1: If D f 1, then take a variable N equal to D, otherwise R = 1 and the computation is finished. Step 2: Select (Bp, B,) E .%. Then denote by % : ” the set Y obtained hitherto, decreased by the element (Bp, B,). Step 3: State ‘P(Bp, B,) = ((s, x ) I (s, x ) E B,,xC’; t 6(s, o1), 6(s, o p J ,
..., 6(s, ( T , ( T ~ . . . O ~ - ~S) E\ u
B, and
4= 1 6(s,
X)E
B,, where x=o, 02...crk).
Step 4: If card(q(B,, B,))= 1 then go to Step 8. Step 5: Select arbitrary sPc Bp and S,E B,. Step 6: To each s and 6(s, x ) , where (s, X)E &LIP, B,), assign exactly one x’ E Z’ and X”E C’, respectively, such that 6(sp, x ’ ) = s and 6(s, x x ” ) = s., Step 7: Compute all possible positive differences of lengths of sequences of the form x’xx’’, where x ’ , x” are the words chosen for s and 6(s, x). respectively, in Step 6 for some (s, X)E ‘p(Bp, B,). Take a new value of variable N equal to the greatest common divisor of the previous value of N and all the computed differences. If N = 1, then R = 1 and the computation is finished. Step 8: If X = 0, then R = N and the computation is finished, otherwise go to Step 2. Note that in the procedure presented here we consider only, roughly spealung, the transition between blocks of a partition z, in the way as described in Step 5 and Step 6, since for any two states s, s’E S such that s=s’(z) and any two words x , x’ E C’ such that 6(s, x ) = 6(s, x ’ ) = s’ there exists y E C’ such that 6(s’, y) = s and there holds 1x1- Ix’l = p .g.c.d.(d,, dJ = q D for some natural numbers p , q, where d , =lryl and d2= Ix’yl, and D denotes g.c.d.(d,(A,), O E C). We now give an example to illustrate the idea of the above procedure.
Example 4.6. Determine a number R for the following connected “onto” automaton A = (S, C, 6) where 6 is given by Table 4.2.
4.3. Connectedness
143
Table 4.2. A transition function of an “onto” automaton 6 1
2
1 2 3 4
3 12 6 10
4
5
5 6 7 8 9 10 11 12 13 14
0 7 11 9 6 11 10 13 9 11
5 0
S
0 1 2 3
-
7 8 14 6 11 10 6 9 11
First we determine the partition z and the set X for A. We have z = (0, 1, 2, 3, 4, 5;6, 7, 8, 9;10, 11;12313;14) and .% = [ ( B , , B2), ( B , , B3), (B2, B 3 ) ) , where B , = [ O , 1, 2, 3, 4, 5 ) , B 2 = ( 6 , 7, 8, 9), B 3 = ( 1 0 , 11). We can observe that D = 2 and this is the initial value of the variable N. We select ( B , , B ~ ) E XWe . modify set X and now X = [ ( B , , B3), (B2, B d } . For ( B , , BJ according to Step 3 of the algorithm we have (p(B1, B J = [ ( l , 02010,)(1, , 02010J,(1, 020J, (2, ad). Let s1 = 1 and s2= 6. We assign to states 1, 2, 6, 9 words e, ol,e , ol, respectively, where e denotes an empty word. We get the following words eo20,0,01, eo2010201, eo202e, olog. All possible differences in the lengths of words are 2 and 0. Thus the new value of N, obtained by Step 7, is equal to g.c.d.(2, 2) = 2. Since X # 0 we come back to Step 2. We select now (Ill, B 3 ) E Y” and modify the set .!X as follows X = ((B2,B 3 ) ) . There holds cp(Bl, B3) = [ ( 3 , (~2)).Since card(cp(B,, B 3 ) ) = 1 we go to Step 8. The set X #0 thus we come back to Step 2. We select (B2, B , ) E %and note that X =O. There holds (p(B2, B3)= ((7, ol), (8, 0201),(8, ~5~02)). Let ~ 2 and ~ s36= 11. We assign to states 7, 8, 11 words ol,0102,e, respectively. Then we obtain by Step 7 the following set of words: olole, o,02020,e,o,020202e.The differences of the lengths of words are 2 and 0, thus the variable N=g.c.d.(2, 2) is still equal to 2. Since .%=0, the computation is finished and we have R = 2.
4. Input subautomata
144
For a connected “onto” automaton A = (S, C, 6) with characteristic number R the following remarks hold: (a) let S E S and x=olo 2 . . . o TF, ~ where T=g.c.d.(i, R). Then the following states 6(s, ol),6(s, 0102), ..., 6(s, oloz...oT)represent all blocks of partition x i = x T . This means that they belong to different connected components of an input subautomaton A’. (b) for arbitrary two states s, s’ E S there is s = s’(d) if and only if g.c.d.(i, R ) I Iwl for any x E X* such that 6(s, x ) = s’. (c) for each natural number i directly from definition of R we have that xi = xgcd(i, R) and instantly xi = x‘ where if i = O(mod R ) i(mod R ) if ifO(mod R).
On the basis of the above remarks we can prove the next theorem. Theorem 4.14. Let A = ( S , C, 6 ) be a connected “onto” automaton characterized by R. Then x‘ .?I? = xlm(i,Il for any natural numbers i, j .
Proof. We obtain directly from Lemma 4.4 and the property of multiplication of partitions that xi.Ici2n1m(’,11 for any natural numbers i, j . Let for s, s’ E S be s=s’(xi-?I?).Then there exist sequences s=sl, s2, ..., s, = s’ E S and xl, x2. ..., x,-~ E Z* such that s1 = s 2 = ...=s,(x‘ .?I?) and either &s,, or 6(sq+,, xq) = sq holds for q = 1, 2, ..., k - 1. Since ~ ~ = s ~ + ~ ( x then ~ - f laccording ), to the and sq = S~+~(?L‘) for each definition of the multiplication of partitions sq I q = 1, 2, ..., k - 1. Considering the above remark (b) we obtain that for each q = 1, 2, ..., k - 1 there exist natural numbers p , p’ such that Ix,l=p.g.c.d.(i, R ) = p’ g.c.d.0, R), where p = g.c.d.(p.p’) .
g.c.d.0, R ) g.c.d.(i, j , R )
g.c.d.(i, R ) p’ = g.c.d.(p,p’) * g.c.d.(i, j , R)’ Hence kJ=g.c.d.(p,p’) .g.c.d.(i, R ) .g.c.d.0, R)-g.c.d.(i, j , R )
-
g.c.d.(p,p’). 1.c.m (g.c.d.(i, R), g.c.d.0, R))= g.c.d.(p,p’) g.c.d.(l.c.m.(i, j ) , R ) .
-
4.3. Connectedness
145
Thus we have that sq,= sq+l(xlm(i, jl) for each q = 1, 2, ..., k-1 and s = s’(nlm(i. and consequently K’ . Id 5 xlm(is11. Q.E.D.
1)).
It follows from Theorem 4.12 and Theorem 4.11 that the set of all x‘ partitions of a given automaton A is closed under the addition and multiplication of partitions. Considering Lemma 4.4 and the definition of the number R we obtain that the set of all partitions d associated with strong connectedness relation of input subautomata A’ of a connected “onto” automaton A characterized by the number R form a lattice under natural partition ordering. This lattice is isomorphic to the distributive lattice of divisors of the number R . Summarizing the presented method we car. state that its usefulness results from the fact that for a given automaton it is sufficient to determine the characteristic number R to obtain the full information about the connectedness of each of its input subautomata A’. We can determine, without construction of input subautomata A’, not only the number of their connected components but also determine to which of the components belongs an arbitrarily selected state. Unfortunately this method has some restrictions. We can only use it for “onto” automata. This class is indeed very wide but does not exhaust the whole class of DFA. This method also requires for an automaton A to be connected, but this is not a restriction, since we can use this method for each connected component of an automaton, separately. There is no similar solution for automata which are notonto. To solve the problem for not-onto automata we must determine the connectedness of input subautomata A’ of an arbitrary not-onto automaton for each value of i, separately. We can assign for an arbitrary automaton A from the class of DFA all its minimal connected “onto” subautomata and use this method to determine their connectedness. Next, it is enough to consider only the connections between these maximal connected subautomata of the automaton A for a fixed number i. Next we present an algorithm for determining the connectedness of input subautomata A’ of an automaton A based on the above rule. Let us introduce the following notations: P = Q ( n ) if p = q for all p , q E P u Q . where n is the partition on the state set S and P , Q E S . Let A = (S, C, 6) be a connected automaton and A , = ( & , C, 6J, A,=@,, C, &), ..., A,=@,, C, 63 be all the maximal connected “onto” subautomata of A with characteristic numbers R,, R,, ..., R , respectively and transition functions 6,: S,x C, t = 1, 2, ..., k. k Let us denote S’ = S\ u S,. t=l
146
4 . Input subautomata
Algorithm 4.4.
Input: A connected automaton A = ( & C, 6 ) and all its maximal connected “onto” subautomata A,, A,, ..., A, with characteristic numbers R , , R,, ..., R,. Output: The partition ni. Step 1: For each state S E S’ and t = 1, 2, ..., k find cp(s, S,)= ( X I s, 6(s, q), 6(s, qoJ, ..., 6(s, 0~0,...0~-~) E S’ and 6(s, x ) E S,, where x = 016,...opE C*) Step 2: For each t = 1, 2, ..., k compute the partition R? on the set S, corresponding to the connectedness relation of Art, where x?= (Sp,S:, ..., S;Rrl] and 6(Sp, CR,)= S:, &S,l, CRf)= S,2, ..., 6(S;Rr1, CRt)= S?. Step 3: For each s E S’ and t = 1, 2, ..., k to each x E cp(s, S,) assign exactly one x’ E C* such that 6(s, x x ’ ) E Sp. Step 4: For each S E S’ compute the partition @(s) on the set S such that - all states from the set S’4 (s] form one-element blocks; - for each pair of numbers t , t’ = 1, 2, ..., k for each r = 0, 1, ..., R , - 1 and r’ =0, 1, ..., R , - 1 there holds S:=Sff(76(s)) if one of the following conditions is satisfied: (a) t = t’ and r=r’(mod g.c.d.(i, R,)), (b) there exist x E cp(s, S,) and y E cp(s, S,) such that Irr’I + r = 0 (mod g.c.d.(i, R J ) lyy’l + r’ = 0 (mod g.c.d.(i, R,)), where x ’ , y’ are the words assigned to x , y, respectively, in Step 3. If (b) holds, then s = S: = Sff (ni(s)). Step 5: Compute ~ ~ = U d ( s )where , U denotes the sum of partitions. S E
S’
4.4. Other properties
In this section we shall present, in the first place, structural properties of input subautomata A’ and A: of an automaton A directly associated with connectedness but not included in classification given by Bavel, Muller [l]. We investigate the totality, the controllability and the quasi-controllability of input subautomata. The second part of this section will concern the semigroup characterization of input subautomata and discussion of endomorphism and automorphism groups, congruences and the state independence, Note that, if A=(S, C, 6 ) is an abelian automaton, then for every i E M input subautomata A’ and Ad are abelian. Based on Corollary 4.4, Theorem 4.6 and the remarks about input subautomata of (k, 1)-asynchronous automata and asynchronous automata we can prove the following facts:
4.4. Other properties
147
- if A is perfect and g.c.d.(i, D ) = 1, then A' is perfect, - if a (0, m)-asynchronous automaton A is perfect and g.c.d.(i, m)= 1, then Ai and Ad are perfect
- if a (k, 1)-asynchronous automaton is perfect, then A' is perfect, - if an asynchronous automaton A is perfect, then A' and A d are perfect. We now introduce some new notations. The sets of all functions implied by elements of C('3 and &(" will be denoted by Ji and J i , respectively. The setS Ji and J d , together with the operation of superposition, form semigroups, denoted by Fi and F d , respectively. It is obvious that Fd is a subsemigroup of the semigroup Fi, since J d c Ji and Fi is a subsemigroup of the semigroup F . Let J 1 , P , ..., Ji, ... and J J , Jd2, ..., J i , ... be sequences, let z and z d be the least nonnegative integers and T and Td be the least natural numbers such that s S + l = P T + l and for every fS...f=fLd+' E J2d+' we have p+' = T e T d + l . We say that automaton A is characterized by numbers z, T, 21 and Td. For arbitrary natural numbers k, k', kd, k,, we have F+k=sS+K and JdT@kd=JJd+w where k=k'(modT) and kd = k,'(modTJ. We have also JT+'fr= frF+l=P T + l .
Corollary 4.8. Let A be an automaton, let A' and A; be input subautomata of A, let g.c.d.((d,(AJ}, c s ~ C) be equal to R , Di and D d , respectively. Then D iand D i are divisors of D. Theorem 4.15. An automaton A is quasi-controllable if and only if T= 1 and P=F. Proof. (*) Let the automaton A be quasi-controllable. Consider the sequence Y + l , F+2, ..., F+T.Since A is quasi-controllable, then there exists k = z + i + 1 such that F+i+l = F , where i e ( 0 , 1, ..., T - 1). Let T > 1. Then all sets from sequence of sets F+l, F+2, ..., F+T except sS+i+l,are different from the set F . Furthermore, F' =Fi+l(modn+z+l c F and F ' F - l = F thus we have a contradiction and then T= 1 and i = 0. Since FJ = F , then F2 = FF = F . (e) Let T = 1 and P = F . Then s5+' = F , F J = F and for each f E F there exists a sequence x with the length z + 1 such that for every s E S sve have f(s) = 6(s, x), thus A is quasi-controllable. Q.E.D.
Theorem 4.16. If an automaton A is strongly connected and quasi-controllable, then it is controllable. Proof. It follows from Theorem 4.15 that if A is quasi-controllable, then T = 1. Thus we have D = 1. Finally, a strongly connected automaton is controllable if and only if D = 1. Q.E.D.
148
4. Input subautomata
Theorem 4.17. Let A be an automaton. If A is controllable then A' is controllable for each natural number i. Proof. Based on Theorem 4.14 and Theorem 4.15 we have that for automaton A the number D = 1. Thus according to Corollary 4.4 an input subautomaton A' is strongly connected. Furthermore, since D' is a divisor of D, according to Corollary 4.6, then Di = 1 and thus A' is controllable. Q.E.D. In general, the fact that A is controllable does not imply that A; is controllable for a fixed number i. The notion of quasi-controllability requires an extension for input subautomata A' and Ad of automaton A. Namely, it is necessary to change the alphabet C for 2 or Cd in the definition of the quasi-controllability. Thus we get that an input subautomaton A' (A:) is quasi-controllable if and only if T'= 1 ( T i = 1) and (Fi)2= F' ((Fb)2= F i ) , respectively.
Corollary 4.9. Let A be an automaton, let a natural number i > z + 1. If A is quasi-controllable, then A' is quasi-controllable. Corollary 4.10. Let A be an automaton, let a natural number i 2 T d + 1, and let Td = 1. If A is quasi-controllable, then A: is quasi-controllable. Coming to the end of our investigations associated with properties of input subautomata Ai and Ad of an automaton A we take note of their automorphisms and congruences. All results will be presented in pairs because of their similarity. Since the proofs are similar we present only proofs for endomorphisms.
Theorem 4.18. Let i be a natural n-umber, let A be an automaton and let A' and Ad be input subautomata of A . If f e E(Ai) ( f d E E(Ad)), then fc E(Ani) (fd E ,!?(A,".')), respectively, for n = 1, 2, ... Proof. Based on the fact that Fn.' c Fiand Fdn.' E F i , the proof is obvious. Q.E.D.
Based on this theorem we can state that an endomorphism of automaton A' or A d can be interpreted as an endomorphism of A preserving operations for strings which length is a multiple of i. Next we have E ( A i ) a E ( A ) , E ( A i ) z , E ( A ) , G ( A ' ) z G ( A ) and G ( A i ) z G ( A ) . We can state using the next example that a semigroup E(A) can be a proper subsemigroup of the semigroup E(Ai) or E(Ad) and the group G ( A ) can be the proper subgroup of the group G(A') or G ( A d ) .
4.4. Other properties
149
Example 4.7.
Figure 4.11 shows a graph of an automaton and a graph of its input subautomata A3 and A?. It is easy to show that
U
A
3
3
A =Ad
Fig.4.lI . Diagrams of an automaton A and of its input subautomata Ai = A: We can form the following remark on the ground of Theorem 4.18. Let i be a natural number, let A be an automaton, let Ai and Ad be input subautomata of A , let x be a congruence on a state set S of A . If K E L(A9 (or x E L(A,')) then x E L(A"") (or x E L(Adn.I),respectively, for n = 1, 2, ... As a consequence of the above we have that a congruence of an automaton Ai or Ad has an interpretation as a congruence of an automaton A. This generalization depends on the change of elements from C to elements from 2 or C,j. Another corollary is that L(Ai)2 L ( A ) and L ( A j ) 2 L(A). It is known that if there exist non ordinary congruences for automaton A , then there exists a decomposition associated with "good" technical realization. Thus for automata Ai and Ad there exists at least the same decomposition as for automaton A. Corollary 4.11. If f E E(A') for i > z (fde E(A,') f~ E(Ai(modn+T+l) (fdE E(Ad(m"dTdfld+l)), respectively.
for
i>zJ,
then
Corollary 4.12. Let x be a congruence on a set S of automaton A. If x~ ,!,(Ai) for i > z (x: E L(A,') for i > 73 then x E L(Ai(mOdn+7+1) (x E L(A,j(modTd+Td+l 1)respectively. Theorem 4.19. Let A be a strongly connected permutation or asynchronous automaton. Iff E E(Ai) and f~ E ( k ) then f E E(Ak),where k = g.c.d.(i, 31.
150
4 . Input subautomata
Proof. There exist natural numbers p and q, for i and j such that p . i = k + q .j. Let y, Z E Z* with l y l = q . j and lzl=k. If an automaton A is strongly connected and permutation or asynchronous then for every s E S there exist s’ E S and y E C* such that 6(s’, y) = s. Thus
This means that f
E
,!?(Ak).
Q.E.D. By this theorem we can state the following remark. Let A be a strongly connected permutation or asynchronous automaton. Let K be a congruence on the state set S of A. If K E L(Ai) and K E L(A’), then K E L(Ak), where k = g.c.d.(i, 1).
Corollary 4.13. Let A be a strongly connected permutation or asynchronous automaton. T > 1 is the necessary condition for the existence of an endomorphism belonging to ,!?(Ai)but not belonging to E(A). Corollary 4.14. Let A be a strongly connected permutation or asynchronous automaton. T > 1 is the necessary condition for the existence of a congruence belonging to L(Ai) but not belonging to L(A).
Exercises
4.1. Find a 3-channel analog for an automaton A given by Table 4.3. Table 4.3. The transition and output table of the automaton A
s 1
2
610
0
1
211 210
211 l/o
4.2. Find a l-channel analog of a 3-channel automaton given by diagram shown on Figure 4.12.
4.4. Other properties
151
Fig.4.12. The diagram of the 3-channel automaton
4.3. Find a 4-channel analog A4 and a subautomaton A(4) associated with the change of the operating time of an automaton A = @ , C, 6) given by the transition table (Table 4.4). Prove that A4 and A(4) are isomorphic.
111:~
Table 4.4. The transition table of the automaton A
2
4
4
1
2
4 2
4.4. Let automaton A be given by diagram shown on Figure 4.13. Find subautomata Ai and AJ, i # j such that xi+IGi=nl. Demonstrate also that the equivalence of states of the automaton A in partition x1 does not imply the equivalence of these states in partitions 7ci and Ici. 4.5. Find characteristic numbers 2, T, zd and Td for an automaton A given by diagram shown on Figure 4.14.
152
4. Input subautomata
/G
Fig.4.I3. The diagram of the automaton A
Fig.4.14. The diagram of the automaton A
4.6. Find a non-controllable input subautomaton Ad of a controllable automaton A given by the transition table (Table 4.5). Table 4.5. The transition table of the controllable automaton
Bibliographic note
153
Bibliographic note The investigation in the area of input subautomata have been dated since 1970 when A.Gil1 [4] introduced the notions of one- and multi-channel automata and discussed their mutual relations. Next in 1972 J.Grzymala-Busse [9] introduced the notion of the subautomaton associated with the change of the operating time of an automaton A. The works Gill [4], Grzymala-Busse [9] investigated problems of state equivalence in subautomata and associated with them problems of the minimality of automata. The majority of the investigations of structural properties of input subautomata concern the problems of connectedness. These problems are considered according to the classification of the type of the connectedness shown in Bavel and Muller [l]. We can find Bergandy’s El, 21 investigations of the influence of some structures of input subautomata upon the connectedness of these subautomata. The particular considerations of problems of the connectedness and the strong connectedness of input subautomata A d of automaton A are discussed in Pawlaczyk [l, 21. The monographical works Grzymala-Busse 191, Miadowicz [3] treat on some other structural properties of input subautomata. The semigroup approach to the investigations of properties of input subautomata was used in Grzymala-Busse [9].
This Page Intentionally Left Blank
5. Automata homomorphisms
In this chapter we will consider a problem of determining functions preserving operations of automata (homomorphisms, endomorphisms, automorphisms, and isomorphisms); these functions are also known as transition preserving functions. We take into consideration state, state-input, and generalized functions preserving operations of automata. Algorithms of determining functions preserving operations of automata have been presented using two different approaches: decomposition of automata into primaries, and decomposition of automata into autonomous factors. Two problems of representation of a set of automata by means of one automaton have been formulated. For generalized homomorphisms a reduction theorem has been presented. In addition an algorithm of determining these homomorphisms has been given. Two problems of simulation of a set of automata have been formulated by means of concepts of generalized homomorphisms and input subautomata. Properties of automata have been compared with respect to state and generalized homomorphisms. Computational complexity analysis of problems of assigning state and generalized functions preserving operations has been presented. 5.1. State homomorphisms of automata
5.1.I Properties of state homomorpisms
Significance of functions preserving operations in structural automata theory results from a strong relationship of this concept with SP partitions and with the concept of automata realization (chapter 6). Therefore homomorhisms of automata play a central role in problems of automata decomposition and in different hardware and software implementations. In particular, automorphisms are applied in automata decomposition, characterization of different automata types, and in investigations of the structure of the characteristic semigroup of an automaton. Homomorphisms and isomorphisms find application in automata minimization (chapter 3), decomposition, and also in semigroup theory. In chapter 2 two important theorems have been proved: theorem on the relationship between homomorphisms and SP partitions, and theorem on the relationship of automorphisms and SP partitions.
5. Automata homomorphisms
156
Now we shall study some properties of functions preserving operations which are important in a process of determining of these homomorphisms. We shall also introduce some number of necessary concepts. Automaton A is said to be cyclic if and only if there exists state S E S such that A=A(s), where A(s) is an automaton generated by a state s. Now we introduce a concept of a primary which will be useful in the study of substructures of automata. Subautomaton B of automaton A is said to be a primary of automaton A if and only if (i) there exists si E B such that B =A(si), (ii) there exists s j e B such that [B c A ( s i )
B = A(sj)].
Therefore the primary is the maximal subautomaton generated by a single state. Every automaton can be uniquely represented as a direct sum of its different primaries. Primaries of arbitrary automaton are cyclic automata; therefore our considerations concerning homomorphisms can be restricted to primaries. Function fi A(sA)+ B is said to be transition generated if and only if there exists s,’ E gen A($,) and s, E S,, and for every state sy of automaton A(s,) there exists word X E C+ such that
Transition generated function of automaton A(sA) into automaton B with specified states S, and S, is said to be fsA,s,)-transition generated function. Function f: A + B is said to be transition generated if and only if thcre exist: minimal generating set P = ( s A o , sA1, ..., sAm-l) of automaton A and ordered mtuple Q = (sEo.s,’, ..., s,”-’) of states of automaton B, and for every state S, of automaton A there exist k~ (0, 1, ..., m - 1) and X E C+ such that
As follows from this definition, the transition generated function exists for arbitrary A(sA) and arbitrary state S, of automaton B such that AS,) = sB. The following theorem pave1 [ll) links a concept of homomorphism with a concept of transition generated functions. Theorem 5.1. Function f: A(s) + B is a homomorphism if and only if f is transition generated and it preserves transitions with respect to elements of thc input alphabet.
5.1. State homomorphisms of automata
157
Proof. (e) Let f be a transition generated function from A(s) to B which preserves transitions with respect to literals of the input alphabet C. Let X E C+ (we omit consideration of cases, when Irl=0 or Irl= 1, because then the transition preserveness follows immediately from the assumption). Let us assume now that for every r E sACS) and for every V E C* such that Ivl = k f we have fcdA(r, v)) = d,Mr), v). Let additionally lul=k+ 1. Then u = YCT and O E C and for each rE SACS)we have
u>)=f(dA(aA(r* v), 0))= d,(f(aA(r, v)), aB(d,Mr>, v), 0 ) = a,Mr), VO)= &Mr), u).
f@A(r,
0)=
Therefore function f preserves transition for elements from set C . (*) The proof is immediate. Q.E.D. Let us consider now the relationship between the concept of homomorphism and the Nerode relation.
Theorem 5.2. Let A(s) = (aA(s), C, a,) and B = (S,, C, a,) be automata; (i) there exists state homomorphism f: A(s) +B if and only if there exists state r E S, such that for every y, z E C* [r f z 3 y 7 23 (5.1)
(ii)
there exists state isomorphism f : A(s) +B if and only if there exists state t E gen(B) such that for every y. Z E C* [r 7 z w y f z] (5.2)
Proof. (i) Let us assume that there exists state t E S, fulfilling implication (5.1). We define function f: A(s)+ B as follows fcdA(s, w ) ) = d,(t, w ) for arbitrary W E C*. Based on (5.1) we have
and therefore function f is well-defined. Now we will show that function f preserves transitions. Let r = dA(s,u) E dA(s) and x E Z*. Then
and therefore f is a homomorphism. The reverse result is evident from the assumption. (ii) From condition (5.1) it is sufficient to prove that f is a single-value function. Q.E.D.
158
5. Automata homomorphisms
The above presented characterization of homomorphisms and isomorphisms is not very useful in computation of these functions because it requires the computation of characteristic semigroup of automaton which in the worst case can contain nn elements, where n = card(S).
Theorem 5.3. There exists a homomorphism of automaton A(s) into automaton B mapping s into t if and only if there exists precisely one function (s, [)-transition generated from A(s) into B . Proof. (G) Let f and g be two transition (s, t)-generated functions such that f # g . Then, there exists state r e SA(s) and words w,, V , E C* such that
w = v, and t can not be a homomorphic image of state s. But then w, 5 v, ‘T (*) If only one transition (s, t)-generated function can be defined from A(s) to B then for arbitrary y, Z E C* follows
Such function is a homomorphism according to Theorem 5.2. Q.E.D. From previous theorems we have that iff is (s, t)-transition generated function from A(s) to B then two following conditions are equivalent: (i) f preserves transitions with respect to elements of the state set (i.e. there exists a homomorphism), (ii) f is the only transition (s, t)-generated function from A(s) to B. Now we introduce a concept of the length of state which will simplify the computation of such states t which together with state s define the transition (s, t)-generated function (Bavel [ 11). Let s be a state of an automaton A . The length of the state s is said to be Is1= max (minlxl I dA(s, x ) = r ) . sA(s)
Therefore a length of state s is a length of the shortest path leading to the most distant state from state s. The following characterization of the length of state holds with respect to the state homomorphism.
Lemma 5.1. Let f E Hom(A, 0) and s E SA; then
lf(f(s)l<
lsl.
5.1. State homomorphisms of automata Proof. If Is1= k then for every r E S,(s) w ) and Iwl5k. Additionally
159 there exists word x E C' such that r = a,@,
Hence, for every state f ( r ) of automaton Ams)) there exists word w such that f ( r )=f(a,(s, w))= a,(f(s), w) and IwI 5 k. Therefore lf(s)l I Isl. Q.E.D. Remark. From the above considerations we conclude that one can determine a set of homomorphisms Hom(A(s), B) by selecting an element r with minimal length from a set gen A(s) and then considering as possible homomorphic images of r such states t of automaton B that It1 Ir. Now we will consider state homomorphisms of arbitrary automata. The crucial role is played here by the concept of the set of generators and the minimal set of generators of an automaton A = (S., C,, a,). Subset RA of a set of states S, of automaton A is said to be the set of generators if and only if A = u A(r), where r E R,. rE R, A minimal set of generators is composed of generators for primaries. From the fact that every automaton can be uniquely decomposed into primaries we conclude that homomorphism of automaton A is totally defined by values on the arbitrary set of generators of automaton A. However calculating the values of function f for the set of generators we have to take into consideration the fact that different primaries can have nonempty common parts for which homomorphisms must have the same values to fulfill the requirement that their composition is a function. The following theorem concerns decomposition of homomorphisms.
Theorem 5.4. Let A and B be automata and f c Hom(A, B) and let A , , ..., A, be primaries of the automaton A. Then f has a unique decomposition k f = u f,, where f; E Hom(A,, B ) . i= 1
Proof. We define functionf, in such a way that it is a restriction of function f to the set of states of primary Ai. The uniqueness of decomposition follows from the fact that homomorphism of the automaton A is uniquely defined by its values on the set of generators of A. Q.E.D.
160
5 . Automata homomorphisms
Based on the previously presented considerations we can formulate the first algorithm computing the set of homomorphisms based on decomposition of an automaton onto primaries. Algorithm 5.1. (Computation of state homomorphisms of automata) Input: Deterministic complete automata A = (SA, C, a,) and B = (S,, C, a,). Output: Set of state homomorphisms Hom(A, B). Step 1: Assign a set of primaries A(s) of automaton A. Step 2: Determine the set of generators gen A($ of an automaton A(s). Step 3: Select state T E gen A(s) such that it has minimal length of state; as images of state r choose such states t E S, that It1 I Irl. Step 4: Define a transition (r, 1)-generated function f,: A(s) + B . Verify whether ,. If yes, then f , is a function f, preserves transitions with respect to CJ E C homomorphism. Step 5: Repeat steps 1 to 5 for all primaries A,, A,, ..., A , of automaton A . Step 6: Verify whether functions f are equal on intersections of primaries; if yes, then
k
f = ufi,
i= 1 wheref,E Hom(Ai, 0) andfe Hom(A, B).
Algorithms computing the set of isomorphisms, the semigroup of endomorphisms and the group of automorphisms are similar and can be derived from Algorithm 5.1 by appropriate modifications. Let us characterize now the automorphisms of strongly connected automata by means of characteristic semigroup. The relationship between automorphisms and SP partitions has been given in Chapter 2. Theorem 5.5. Let A be strongly connected automaton and let g be a permutation on the state set S; g E G(A) if and only if for every i E ( 1, 2, ..., n), 11,= I g ( , ) , g(l,, where I l , i =( X E C+:a(sl, x ) =si). Proof. ( 3 ) From the fact that x E 11, follows a(s,, x ) = si; then sg(Q= g(si) = g(d(s,, x)) = d(g(sl), x ) = d(ss(l),x), and therefore x E Ig(l),g(l,. Hence, we have shown that 11,i . ~ I g ( g(iy l l , Because for given g E G(A) there exists g-' E G(A), therefore by analogy one can prove that Ig(l),g(l, LI,, i. Hence '1, i = 'g(l), g(i3.
5.1. State homomorphisms of automata
161
(G) For every si E S there exists y E C+ such that d(s,, y) = sj; hence d(sj, x ) = a(s,, yx). Then
Theorem 5.6. The automorphisms group of a strongly connected automaton is semiregular. Proof. A group is semiregular if and only if h(s)=h’(s) implies h = h’. This means that cycles in permutation are of length one. A semiregular group can contain only n permutations, where n=card(S). Let us assume that h(s)=h(s’), and let us select s’E S ; and compute h(s’). From strong connectedness of the automaton we have that there exists a word X E C+ such that a(s, x ) = s’;the h(s’)= h(d(s, x)) = a(h(s),X ) = d(h’(s),X ) = h’(a(s, x)) = h’(s’). The theorem has been proved because s’ is an arbitrary state. Q.E.D. Theorem 5.7. If A is a strongly connected automaton, then card(C(A))/card(S).
A subsequent theorem presents a relationship between the group of automorphisms and the characteristic semigroup of an automaton (Fleck [l]).
a)
Theorem 5.8. For a strongly connected automaton A = (S, C, with n states there exist two subgroups H , and H2 of the characteristic semigroup I@) such that H , a H , and H11H2 is isomorphic with G ( A ) . Proof. Let us assume in subsequent considerations that a(s, [x])=d(s, x), where x E [XI. Let us define H G [(A) for fixed so E S in the following way
We will prove that H is a subsemigroup of semigroup IQ), i.e. H is closed with respect to operation of equivalence classes compositions:
to achieve this goal we have
and [x1x2]E H , because g,g,
E
G(A).
162
5 . Automata homomorphisms
In subsequent step we prove that G(A) is a homomorphic image of subsemigroup H . Let a: H +G(A) such that a ( [ x ] ) = g , where g(s,J=a(s,, [XI); we show that a is a homomorphism of H onto G(A). The property of operation preserving is proved as follows: a([x]. [r]) = a([xyl)=g, where for fixed so E S, g(so) = a(so, [xy]). The last expression can be written as:
We now select a subsemigroup H , of semigroup H . One can distinguish here two cases: (i) H has only one idempotent, (ii) H has k idempotents [ell, led, ..., [e,]. In case (i), let this idempotent be [el; then a($,, [el) = so and [el = [el . [el; hence according to the definition of H we have
By comparison we have the following implications
In case (ii) we construct a set H 1 = [e,]H[el] c H , where [el] is two-sided entity for H 1 . This follows from the fact that arbitrary [a] = [e,][b][e,], and hence
If [el] is the only idempotent in H I , then H 1 = H,. In opposite case there exists different idempotent, for instance, [e2] E N 1 and then we construct Hz = [e,] .H,[ez], @ c H 1 , and [e,] is two-sided entity for fl. If [e,] is the only idempotent of HZ, then H2 = H 1 . In opposite case we conduct our considerations in a similar manner. We shall reach subsemigroup H , in at most k steps; H , has precisely one idempotent which is a two-sided entity. In subsequent step we show that a: H , + G ( A ) is a homomorphism. For [XIE H there exists [r] E H I such that a
bl = [e,I ...[e where
[eu]
[eill ...[qJ,
are idempotents in H ; then
5.1. State homomorphisms of automata
163
and therefore a([y]) = g(so), and a is a homomorphism. Now we will show that H , is a group; we will verify two conditions - H , contains only one idempotent, - for every [XI E H , there exists n E N such that [xIn+l= [XI. Let us mention that &so, [XI) = g(sJ * a(so, [XI") =gm(sO).Automorphism g has a cycle of length t. Therefore in some place of the sequence [XI, [x12, ..., [XI" we have [XI"= [XI', where u>v. Of course, gu(so>= gv(so) implies that g"(s) = g'(s) for every s E S, and u = v + mt for some fixed m E M. Then
Therefore we have proved the second condition, bexause ( [ ~ l ~ ) ~ [XI'. ~ + l = Now let us observe that [ ~ ] ~ q x ][xIzmt y ~ == [xImt; and therefore [XI"' is the idempotent; but the only idempotent in H , is entity; a(so, [xlm? = a([xlm? = gmi(so) =so; and therefore H, is a group. As H2 we choose a kernal of homomorphism; a: H , + G(A), i.e. the set of [XI such that [XI E H , and [XI are transformed into entity of G(A); then H2 is a normal subgroup of H , (H, QH,), and we can construct a quotient group H,IH2. This group is isomorphic with G(A) what follows from the above presented definitions of a and H,. Q.E.D. 5.1.2. Computation of state homomorphisms of automata
A different approach to the problem of computing state homomorphisms of automata is based on the decomposition of the automaton into autonomous factors. First we introduce several concepts associated with graphical representation of autonomous factor Ai = (SA, {q},aA,i ) . A graph G(Ai) of an autonomous factor Ai is defined in similar manner to the graph T(A) of an automaton A. Connected subgraphs of graph T(Ai) are said to be components. A finite sequence of not necessarily different edges of graph T(Ai) such that k-th edge ends in the vertex in which (k+ 1)th edge starts is said to be a path. A cycle (compare Chapter 2) is said to be a path with its last vertex equal to its fist vertex. If edges of a path (or a cycle) are all equal, then path (cycle) is said to be simple. A length of path (cycle) is equal to the number of edges in the corresponding simple path (cycle). Of course, every component contains only one cycle. A set of all paths entering a vertex'of a cycle in some component and such that
164
5 . Automata homomorphisms
they do not contain edges from the cycle is said to be a tail of the component. A set L of all vertices of a tail of some component such that the length of the path leading from an arbitrary vertex of set L to the first vertex of the cycle is equal to v, constitutes v-th level of component. Arbitrary vertex of the cycle is on the level 0. Finite and connected sequence of edges in some component is said to be a chain. A length of a chain between vertices (s,, sj) which are connected with single edge is equal + 1, if the edge is directed from si to s,, and - 1 in opposite case. A length of a chain between vertices (s,, sj) is equal to the difference between the number of compatible and incompatible edges in the chain from s, to s,. If s, and s, are vertices of the same component C then by Is,, sjd denotes the length modulo d of an arbitrary chain between si and sj, where d is a divider of the cycle length in component C. The number Is,, sjd is unique. Now we characterize the levels of states in an automaton and its homomorphic image (Grzymala-Busse [5]). Lemma 5.2. Let A = (S,, C, a,) and B = (S,, C, a,) be two autonomous automata; let f E Hom(A, B ) , and let state s, belong to component C, in T(A), and let s, be on the v-th level. Let f(s,) = sJ belongs to the component C, in T(B) and let sJ be on the v'-th level; then v' Sv.
Proof. Let us assume that v' 2 v. Let component C, has cycle of the length equal to d. Then a,(s, 0.)= aA(sl,"+d). Additionally, d,(f(s,), 0.) does not belong to the cycle of component C,, because v'>v. Then we have a,(SJ, 0 ') f
a,(s,
(Jv+d), but a,(s,
(Jv)
=f(aA(S,, by))=f(a,(s, (J"+d)) = d,(S,,
(J"+d),
and hence we got a contradiction. Q.E.D. In a subsequent lemma we shall characterize the lengths of cycles in an automaton and its homomorphic image. Lemma 5.3. Let A = ( S , , {(J}, a,) and B=(S,, (01, a,) be two autonomous automata; let f E Horn(A, B ) , and let state si belongs to the component C, in T(A), and Asi) = sj belongs to component C, in B , then the length d' of cycle in component C, is a divisor of the length d of cycle in component C,. Proof. Let us assume that state si is on the v-th level. Then a,(s, ow)belongs to 0")belongs also to a cycle in cycle in C,, and from Lemma 5.2 the state C,. Let us assume that d' is not a divisor of d . Then a,(f(s,), 0") # a,(f(s,), W+d). However J,(S~, 0")= aA(si,(~"+d)and a,(f(si), 0") =f(aA(si,0")) = f ( a , ( ~ i , @+d) = ds(f(si,tsv+d)),and hence a contradiction. Q.E.D.
5.1. State homomorphisms of automata
165
Corollary 5.1. I f f is an isomorphism in Lemmas 5.2 and 5.3, then v’ = v and d’ = d . A subsequent lemma characterizes influence of number Isi, morphic transformation.
s,ld
in the homo-
Lemma 5.4. Let A = ( S , , {G}, a,) and B=(S,, {0}, a,) be two autonomous automata, and f E Hom(A, B ) ; let states s,, s j € S, belong to the same component CA;then ,, (i) Asi) and f(sj)belong to the same component C Is,, sjls = If(si), f(sj)ld, where d‘ is a length of a cycle in C,. (ii) Proof. (i) There exist two natural numbers k and 1 such that because si and sj belong to the same component C,. Then
a,(f(si), 0‘) = A a A ( s i , ok)) =f(aA(sj?
a,@,, ok)= a,(sj,
o’),
09) = a,(f(sj), 09,
and thereforefls,) and f(sj) belong to the same component C., (ii) Let the length of the cycle in component C, be equal to d , and for component C, be equal to d‘. From Lemma 5.3 d’ is a divisor of d; then h i , sjld = k - f(mod d)
and v(si),f(sj)I,y = k - f(mod d‘).
Therefore Isi. sjls = If(si).f(sj)Id’. Q.E.D. Lemmas 5.2, 5.3, 5.4 introduce four restrictions onto homomorphisms of autonomous automata: connectivity condition, level condition, divisor condition and distance condition. These conditions constitute very important criteria for Computation sets of homomorphisms, and have influence on time and space complexity of these computations. Lemma 5.5. Let A(s) = (S,’, {0}, a,’) and B = (S,, {o},a,) be two autonomous automata; let S E .S, and let s belong to the v-th level in graph r(A(s)). Let r(A(s)) have the length of the cycle equal to d; let t be an arbitrary state in S, belonging to component C,. Let C, have the length of the cycle equal to d ’ , and let state t belong to the v’-th level, where v’ S v, and d‘ is a divisor of d . Then (s, ()-transition generated function f: A(s) + B is a homomorphism of automaton A(s) into B .
Proof. Let f: A(s) -+ B be a (s, t)-transition generated function, and let r be an arbitrary state in S;’, then for state r there exists natural number k, k < v + d - 1 such that r = aA(s, d),Let AdA($,05) = a,((, ok)for k = 0, 1, ..., v + d - 1, and
166
5. Automata homomorphisms
f(a~(s,@""?) =.f@A(s, 6"))=a,(t, 6")=a,((, ~ " + d ) ,because v' Iv and d' is a divisor of d. Additionally for k Iv + d - 2 we have
However if k = v
+ d-
1, then
Therefore f is a homomorphism of automaton A(s) into automaton B .
Q.E.D. We will now introduce a concept of regular transition generated function. This concept forms a further characterization of homomorphisms and will be useful in their computation. Let A(s) = (SA', { o } , dA') and B = (S,, {o},a,) be two autonomous automata. A function fi A(s) -+ B is said to be a regular transition generated function if and Only if for every k € [ O , 1, ..., v + d ) we have f(aA'(s, ok))=a,([, ok),where t =f(s), and d is the length of a cycle in r(A(s)),and state s is on v-th level in this graph. Let A = ( S A , {o},3,) and B = ( S B , {o},3,) be two automata. A function f: A -+ B is said to be a regular transition generated function, if there exists a set of generators (so, sl, ..., sm-l}cSAsuch that fp: A(sp)-+B is a regular transition generated function for every p E (0, 1, ..., m - 11, where fp is a function f restricted to A(sp). Let us mention that for autonomous automata function f is a regular transition generated function if and only iff is a homomorphism. Let (so, sl, ..., s,,,-~) be a set of generators of automaton A = (SA, (6). dA) and let state sp belongs to the level vp of component Cip of the graph r ( A ) with the length of the cycle of this component equal to dp for p E (0, I, . . ., rn - 11. If we select nondeteministically an ordered subset (to, t l , ..., t,,,-l) of the set S, in automaton B = (S,, {cT}, a,), for ordered set of generators (so, sl, . . ., s,,,-~), and if we define a relation P={(aA(sp,
@), aB(tp,
6 q ) ) l p ~(0,
1, ...m - 1 ) and
q E
(0, 1, ...v p + d p ) ) ,
then relation p is a homomorphism of A into B if and only if p is a function. A function f: A +B for automata A = (SA, CA, 3,) and B = (S,, C,, 8,) is said to be regular transition generated -if and only i f f is regular transition generated function for every autonomous factor A, and B. From the above considerations we derive the next theorem.
5.1. State homomorphisms of automata
167
Theorem 5.9. A function f: A --+ B is regular transition generated function if and only iff is a homomorphism of automaton A into B; additionally Hom(A, B) = n Hom(A,, B,). (T€
c
Algorithms to compute the set of isomorphisms Zs(A, B), the semigroup of endomorphisms E(A) and the group of automorphisms G(A) are simple modifications of Algorithm 5.2. From these algorithms we have the following evaluations card(E(A))I min ( card(E(A,))J , (TE
c
card(G(A))I min(card(G(A,))) . (T€
c
Algorithm 5.2. (Computation of state homomorphisms of automata) Input: Two complete deterministic automata A = (SA, C, )3, Output: Set of state homomorphisms Hom(A, B).
and B = (S,, C, dB).
Step 1: Compute autonomous factors A, = (SA,{0},dA,,) and B , = (S,,{(T},~~,,). Step 2: Compute graphs T(A,) and Z'(B,) for autonomous factors A,, B,. Step 3: Assign components CAo, CAI, ..., CAO-l of autonomous factor A, and Components CEO,C,', ..., CB'+l of autonomous factors B,. Step 4: Define state subautomata A,, ;= (SAa, i' {(T}, dAo, ); and B,, .k = (SBo, k, {o}, a,, ,) for j = O , 1, ..., a - 1; k = O , 1, ..., R- 1 associated with components CAjoand CEk,. Step 5: Determine lengths of cycles dA, ,O, dA, ,I, ..., dA, ,a-l for components CA,,O, CA,2, ..., CA, ,a-1 and lengths of cycles d,, 2, dB, 2, ..., d5, ,B-1 of components C ,, ,O, C ,, ,I, ..., C5, ,"I. Step 6: Verify whether in the Set of lengths of cycles dA, dA, 2, ..., dA, there exists a number d such that in a set d,, 2, d,, 2, ..., d,, 2-l there exists a divisor of number d; if this condition is not fulfilled, then Hom(A,. B,) = 0. among all Step 7: Select all such components C ,, ak, O, C, ak* I, ..., C, ak* components C ,, 2,C, 2, ..., C , 2 - I of the graph f ( B o ) such that d,, ,".O, d,, 2 I, ..., d,, ak* Y1 are divisors O f dA,2. Step 8: Determine minimal set of generators (sA,o, sA, ..., sA,E-l] for A,, 0. Step 9: Select arbitrary state sB, from S,, Lo such that vo2v,', and sA, belongs to the level v, in CAo,and s,, belongs to the level v,' in CEm. Step 10:Determine states s,, ..., s,, from a set S,, for states sA, 1, ..., ..., sB, E-l are chosen in such a way that v1 2 vl'. such that , s , sA,
,',
,
5 . Automata homomorphisms
168 v22v2’, ..., v,-~ > v , ~ ’ ,and
Step 11:Verify whether relation
is a function; if “yes”, then this function belongs to the set Hom(A, M), Bcr, M)).
Step 12:Verify all conditions starting with step 7, and ending with step 11 for other possible ordered &-tuplesof states from the set S,, ko. Step 13:Verify all conditions starting with step 8 and ending with step 12 for subautomata B,, kl, ..., Bo, ky-l; in this manner one can determine sets of homomorphisms Hom(A, O, Bo,kl), ..., Hom(A, o, B,, +J. Step 14:Determine $1
Hom(A,, o, B,) = n Horn(& , B,, 3. k = k, Step 15:Compute Hom(A, 1, B,), ..., Hom(A,, a-l, B,) repeating steps 8 to 14 for every j = 1, ..., a- 1. Step 16:Determine p = u2,f:, . . ., f,. a-1)E Hom(A,, B,), where E Hom(A, ,, B,); f/’ is a function resuicted to SAo,I’ Step 17:Verify whether Hom(A,, B,) is a set of homomorphisms for other autonomous factors (verification can be performed using, for instance, a definition of state homomorphism); Hom(A, B ) is composed of these homomorphisms from Hom(Ai, B i ) which are homomorphisms for all autonomous factors.
fi
Example 5.1.
Compute the set of homomorphisms Zfom(A, B ) for automata given in Table 5.1. Graphs of autonomous factors components have been presented on Figures 5.1-5.4. After computations we obtain
5.1. State homomorphisms of automata
169
Table 5.1. Automata A and B from Example 5.1
1 s'4
j
3.4
I-
-22.J
1 2 3
1 2 I 1 3 0
6
3 i
3 ' 4
5 5 5
A B C D E
7 8 6
Therefore 0123
0123
0123 EEEE
Fig.5.I. Graphs of autonomous factor A,
components from Example 5.1
5. Automata homomorphisms
170
Fig.5.2.Graphs of autonomous factor A,,
components from Example 5.1
0 I
8 Fig.5.3.Graphs of autonomous factor B,
components from Example 5.1
8
components from Example 5.1
Q
Fig.5.4. Graphs of autonomous factor B,,
5.1. State homomorphisms of automata
171
Similarly we compute homomorphisms for the second component Au,ll. As a result we obtain
Hence
HoNAu,,B U . 1 ) = (0 1 2 3 4 5 6 7 8
\I
Now we verify whether obtained homomorphisms are also homomorphisms for the second autonomous factor. In Step 11 we must reject h, and 4. Therefore finally we got only one homomorphism for automata A and B, i.e. 0 1 2 3 4 5 6 7 8 Hom(AB)= E E E E E E E E E With this homomorphism one can associate an SP partition in which all states of automaton A belong to a single block (trivial partition). 5.1.3. Automata representation problems In this part we shall consider problems associated with the substitution of a single automaton for a set of automata known as problems of representation of a set of automata by means of one automaton (Grzymala-Busse [13]). In general we ask a question when for given set of finite automata a there exists a finite automaton A such that for every automaton A’ from set a there exists a subautomaton A” of automaton A such that there exists a state-input homomorphism &, h& of automaton A’ into subautomaton A ” . Especially we shall consider the case when subautomaton A” is a subautomaton associated with the change of operating time (Chapter 4). In section 5.2.3 problems of automata representation are extended to the case of generalized homomorphisms, and named automata set simulation problems. Input subautomata A(1) and A(9, of automaton A are said to be subautomata associated with the change of operating time of automaton A, because automaton can be substituted by automaton A in which transition generated functions fu, for every O E C, are acting in subsequent moments of time 1, 2, 3, ..., and states
172
5 . Automata homomorphisms
of automaton A are observed in moments 1, i + 1, 2i + 1, ... . Automaton A(O, can be substituted by automaton A in which arbitrary transition generated function fa acts i-tuple (i.e. is fixed from moment 1 to i, from i + 1 to 2i+ 1, etc.) and states are observed also in moments 1, i + 1, 2i+ 1, etc. Representation problems of a set of automata have application in hardware and software implementations of automata because a set of automata can be substituted by a single automaton and a multichannel clock working with frequencies being multiple of the basic one. Now we present these problems in formal way. Automata set representation (1) Instance: Given a set of automata a = {Al = (Sl, C,, dJ, A , = (S,, C, = ( s k j Ck, 33).
Q, ...,
a)
Question: Does there exist automaton A = (S, C , such that for every automaton Aj‘ a there exists a subautomaton associated with the change of operating time A(’) = (S, C(I), W )such that Hom,(Aj, A(Q)= 0? Automata set representation (2) Instance: Given a set of automata a = { A , = ( S , , C,, a,), A , = (S,,
q,ad, ...,
Ck. zd). Question: Does there exist an automaton A = (S, C, a) such that for every automaton A j € a there exists a subautomaton associated with the change of operating time A(gd = (S, C ( ” d , 3(ll,J such that Hom,(Aj, # @? Problem (2) is a subproblem of problem (1) because subautomaton A@), is a subautomaton of subautomaton A(0 of automaton A . The above questions concern
A,=
(Sk,
synthesis problems, because corresponding design problems require a definition of automaton A. If automaton A is given a priori then representation problems of a set of automata are called analysis problems, and these problems are reduced to verification whether for every Aj E a follows that Hom,(Ai, A(’))= 0 or, H o r n & , A(’),J=O),respectively. Synthesis problem is still open in its nontrivial form, i.e. such solutions that the number of states of automaton A is smaller then the maximal number of states in arbitrary automaton in set GI/. On the other hand the analysis problem requires consideration of properties and computation of stateinput homomorphisms. From our considerations we have conducted so far (Chapter 5.1.2) we conclude that for two given automata A = (SA, C,, a,) and S, =(S,, C ,, a,) one can determine the state-input homomorphisms in the following way Hom,(A, B ) =
n
u { (h,, h,) I h,(a) = (3’ and h, E Hom(A,, Bas)).
O E ZA (3’E
c,
5.1. State homomorphisms of automata
173
In the next part of the chapter we are interested in these properties of stateinput homomorphisms which indicate when Hom,(A, B ) # 0. All results will be formulated as corollaries and left without proofs because proofs. The proofs follow directly from Lemmas 5.2, 5.3, 5.4 for state homomorphisms.
Corollary 5.2. Let A = (S,, C,, 3,) and B = (S,, C,, a,) be two automata; then for an arbitrary function h,: A -+ B the following equivalence holds Hom(A,, Bus)# 0 a Hom(AC,, Bc,,)
f
0,
where o ' = h , ( o ) ~ C, and AC,, Bco, are state subautomata of autonomous automata A,, B,, with restriction to the states of the cycle.
Corollary 5.3. Let A = (S,, C,, 3,) and B = (S,, C,, every h,: C, -+ C, there exists B E C, such that Hom(AC,, BC,.) = 0
a,)
be two automata. If for
* Hom,(A, B ) = 0,
where B'= h,(o)E C,, and AC,, AC,, are state subautomata of autonomous automata A, and B,. with restriction of the state set to the cycle.
Corollary 5.4. Let A = ( S A , C,, 3,) and B =(S,, C,, a,) be two automata; then the following relationships hold: (i) HornXA([),, B ) = 0, ElomXA([l,B ) = 0 (ii) I-lomXA, B(')) = 0 , EIomAA, B([ld= 0 (iii) HomXA, 8)= 0, EZomXA('1, B ) = 0 (iv) HomXA, B(B) = 0 , HomXA, B ) = 0 (v) HomXA, B ) = 0, HomXA, = 0.
5.2. Generalized homomorphisms of automata 5.2.1. Properties of generalized homomorphisms
Let A = (S,, C,, a,) and B =(S,, C,, 2,) be two automata; a generalized homomorphism of automaton A into B is said to be a pair of functions h = (hs, h,) such that h,: S, -+ S,, hx+:C,+ -+ C,+ and for every s E S, and x E CA+
A set of generalized homomorphisms of automaton A into B will be denoted GHom(A, B ) , a set of generalized isomorphisms Gls(A, B ) , a set of generalized endomorphisms GE(A), and a set of generalized automorphisms GG(A). General-
174
5 . Automata homomorphisms
ized homomorphisms of automata are nontrivial generalizations of state homomorphisms and state-input homomorphisms, because GHom(A, B ) = 0 * Hom,(A, B ) = 0 3 Hom(A, B ) = 0,
but Hom(A, B ) = 0 for XA = C, =b Hom,(A, B ) = 0 =b GHom(A, B ) = 0.
Example 5.2. Let us assume that two Mealy’s automata A and B accept fractions 419 and 113, respectively. The fractions are written in binary representation (4 I 9 = .0(111000) and 113 = .0(01). A problem arises whether automaton A accepting the fraction 4 / 9 can substitute automaton B accepting the fraction I /3. This problem has also technical relevance in a case when automata A and B are hardware or software implemented, and one of them is faulted; it is important to have possibility of substituting one automaton by the other. Graphs of automata A and B have been presented on Figure 5.5 and Figure 5.6. We assume that binary numbers are written starting from the most significant position, and that we have assumed that an admissible acceptability of the number is as small as possible.
Fig.5.5. Mealy’s automaton accepting the fraction 1I3
5.2. Generalized homomorphisms of automata
175
Fig.5.6. Mealy’s automaton accepting the fraction 4 I 9 In the case of greater precision of number acceptability the only change would be in the output function (for precision .requiring taking into consideration the number of bits not greater than the period of the fraction) or transition and output functions (for precisions requiring takmg into consideration the number of bits greater than the period of the fraction). Let us observe that mappings a b c hs=(
2 5 8
j
hx+=
(
0
1
111 000
j
1
0
ha+=( 111 000
j
constitute a generalized homomorphism. Technically this denotes that hardware implementation of automaton A with logical negation on the input, and with clock working with three-tupled frequency comparing with the basic frequency can be applied as hardware implementation of automaton B . Let h = (hs, hx+) be a generalized homomorphism of automata A and B . Then a triple h(A) = (h,@A), h,+(ZA), where a,’ is for automaton A = ( S A , &, a restriction of transition function a, to hs(SA)x[hx+(ZA)], is said to be a generalized subautomaton associated with h = ( h , hz+). Let us mention that for t E hs(SA) and X E h,+(y) we have
a,),
a,’),
5.Automata homomorphisms
176
for some s E S, and y E CA+. Now we will investigate the Myhill relation with respect to generalized functions preserving operations (Mikolajczak [101).
Theorem 5.10. Let A = (SA, CA, a,) and B = (SB, C,, a,) be two automata, and and are Myhill's relations for automata A and h(A), respectively. If h = (hs, h,+) E GHom(A, B ) then
Proof. From the definition of Myhill's relation and from the property of generalized homomorphism we have
-
Corollary 5.5. If h = (hs, hz+)E Cls(A, B ) , then x fi y
h,+(x) B h,+(Y).
Theorem 5.11. If h = (hs, h,) is a generalized epimorphism of automaton A into B then there exists a homomorphism of characteristic semigroup Z(A) into characteristic semigroup Z(13). Proof. Let hz+: C+, -+ C+,. f ( [ x ] ) = h,+(x) for every
Let us define a mapping f: [(A) +Zg)as follows: [XI E ID). Then by property of generalized homo-
morphism we have:
By comparison of underlined expressions we obtain
-
Now we prove that f l [ x ] [yl) = f ( [ x ] ).f([y]) in the homomorphic image h(A) of automaton A . First, let us assume that f([x]) -f([y]) ~ f ( [ x ] [y]). Then we get:
177
5.2. Generalized homomorphisms of automata By comparison of underlined expressions we obtain
Q.E.D. Remark: There exist automata such that their characteristic semigroups are equal independently of the fact that Hom,(A, B ) = @ and HomI(B, A ) = @ . Figure 5.7 shows an example of such automata.
0
B
A
Fig.5.7.Automata f o r which I(A) = I(B), and HomLA, B ) = 0 and HomkB, A ) = 0 Let us verify now a relationship between automata for which there exist nontrivial generalized homomorphisms (Mikolajczak [ 131). Theorem 5.12. Let two automata A = (S,, C,, 3,) and B = (SB, CB, 3,) be given, and let h = (hs, hz+) E GHom(A, B ) be a generalized homomorphism. Then there exists a state isomorphism cp of generalized quotient automaton A l n associated with h = ( h s , h,) and of some state subautomaton B’ of automaton B. Proof. We define a generalized quotient automaton A l n = (S,’, Z,’ follows S,’ =n, where partition n is induced by an equivalence relation
si = sj(n)
hs(si) = hs(sj).
where si, sj‘ S,. Let us observe that n is a SP partition because
a,’)
a~
178
5. Automata homomorphisms
A state subautomaton B’ of automaton B we define as follows: B’ = (S,’, CB’, and SB’XCB’ +SE’ is a restriction of a,
aB’)where SB’ = h,(S,), aB’= h,+(C,)
a,’:
to SB’xCB’. Now, let us define a mapping cp: S,’ +SB’ as follows cp(B,) = t w (V s E B,)(hs(s)= f),
where ions:
rE
S,’. cp is 1 to 1 and onto function. We show that cp preserves operat-
Q.E.D.
Corollary 5.6. Let h = (hs, A,+) E GHom(A, B). Then there exists a generalized isomorphism (cp’, yf) of quotient automaton
a,’),
A / IC: = (S,’, C,’, where S,’ = IC:, ZA’= C,, : S,’X C, + S,’, and (V Bi E x)(v (T E CA) a ~ ’ ( B i0) , = Bj a d~(si,(T) = S),
a*’
a,’)
where sie Bi, s j e Bj, and for some subautomaton B’ =(S,’, Z,’ of automaton B such that SB’ = hdS,), B = h,+(X,), 8,: S,’XC, +S,’ is a restriction of dB to SB’xCB’. A generalized isomorphism is defined as follows: c p ’ = c p (as in the proof of Theorem 5.12) and y’=h,+. In the subsequent theorem we present necessary and sufficient conditions for h=(h,, h,+) to be a generalized homomorphism. First, let us introduce a concept of alphabet generated function. A function h,,: C;-+C; is said to be an alphabet generated if and only if for every X E CA+,and (TE C,, and ? E h&S,) we have
Theorem 5.13. Let A = (S,, C,, 3,) and B = (SB, C,, a,) be two automata. A pair of functions h = (h,, h,+) is a generalized homomorphism of automaton A into B if and only if h,+ is alphabet generated, and for every S E S,, and X E C,, holds
Let h=(h,, hL+) be a generalized homomorphism; then from the Proof. (a) definition of generalized homomorphism and from the definition of transition function 3, we obtain:
5.2. Generalized homomorphisms of automata
179
If the above relationship is applied for y = o , then our function is alphabet generated. (e) Based on equation (5.4) and on our assumption that h, is alphabet generated we conduct an inductive proof with respect to the length of word x ; let for Irl=k the equality (5.3) be fulfilled; let us take into consideration a word x' = X G for arbitrary Q E CA. Then we get
Q.E.D. From Theorem 5.13 we conclude that generalized homomorphism can be determined by giving h,+(o) for every Q E A . This means that mapping hz+ of infinite countable set CA+ into infinite countable set C,+ has been substituted by a mapping of finite set C, into infinite countable set CB+. In the following part of the chapter assume that functions h, are alphabet generated. Some generalized homomorphisms can be computed easily using state homomorphisms. (i)
if for automata A and B , CA=C,=C and hSe Hom(A, B), and (hs, h , + ) ~GHom(A, B ) , then
and also
Therefore based on a set of state homomorphisms one can assign such generalized homomorphisms that h,(o) = Q with respect to h(A). for every pair of automata there exist trivial generalized homomorphisms i.e. such that there exists state t E S, and X E C,+ such that for every s E SA we have hs(s) = t , where in the pair of functions (hs, hz+), function hs is such that h,+(o) = x, where &(t, x ) = t. The set of such generalized homomorphisms-we will denote by TGHom(A, B). Let us introduce the following notation (ii)
NTGHom(A, B ) = 0 e GHom(A, B ) = TCHom(A, B).
180
5 . Automata homomorphisms
Next we will introduce a concept of canonical generalized homomorphism to reduce, for computational reasons, the infinite set GHom(A, B ) to a finite set. A generalized homomorphism h = (h,, h,) is said to be canonical if and only if it is not trivial and hx+: CA-+IG).In the following part of the chapter we will consider canonical generalized homomorphisms. For automata with outputs A = (S,, C,, a,, a,, yA) and B = (SB, C B , a,, a,, yB) a generalized homomorphism is a triple (h,, h,+, ha+), where h,, h, are defined as previously, but ha+: sZ,+ -+ QE+, and in addition to (5.3) we have
for Mealy’s and Moore’s models, respectively. We shall formulate a sufficient and necessary condition as to when for two automata with outputs there exists a generalized homomorphism by means of alphabet genemted functions (Mikolajczak [131). Theorem 5.14. Let A = (S,, C,, a,, R,, JJA) and B = (SB, C,, a,, RE,J B ) be two Mealy’s automata. A triple of functions h = (h,, h,+, ha+) is a generalized homomorphism of A into B if and only if h,+ is alphabet generated and for every s E S,, and (3 E C, we have
Proof.(*) It is similar to the proof of Theorem 5.13. (e) We shall prove (5.10) only, because the condition (5.9) has been proved in theorem 5.13. The proof will be conducted by induction with respect to the length of word x; for hi=1 the relationship is fulfilled by assumption (5.10). Let us assume that relationship (5.10) is. fulfilled for Lx( = k. Let us assume x’ = xo for arbitrary o~ C,; then we have
Remark. In the case of Moore’s automaton with outputs the proof of Theorem
5.14 is similar.
181
5.2. Generalized homomorphisms of automata
Corollary 5.7. Computation of function ha+ can be reduced to the computation of function ha+: Q, -+ QB+, such that for every z E a,+ we have
where: z=w0ol ... on- and Q,, i = O , 1, ..., n - 1. In turn ha+: QA -+ QB+ one can reduce to ha+: QA -+ SZ,’, where
If (hs, h,+)E GHom(A, B ) is a canonical generalized homomorphism, then QB’ is a finite set. Hence, we compute canonical generalized homomorphisms (hs, h,+, h,) in such a way that at first we assign generalized canonical homomorphisms (h,, h,+), and next we define h,+ applying (5.9) and (5.10). 5.2.2. Computation of generalized automata homomorphisms
In this section we formulate an algorithm computing generalized automata homomorphisms applying Theorem 5.13. First, we will prove a theorem which reduces computation of generalized homomorphisms to the computation of state homomorphisms (Mikolajczak [ 151).
a,)
Theorem 5.15. Let A = (S,, C,, and B = (S,, C,, a,) be automata. Then a set of generalized canonical homomorphisms can be assigned as follows
where, A, is an autonomous factor associated with autonomous factor associated with [x] E I@).
OE
&, B[,] is an extended
Proof. From definition of generalized homomorphism follows that GHom(A, B ) =
n GHom(A,, B ) . (3E CA
A set of generalized canonical homomorphisms of autonomous factors A , into B is a set of pair of functions h = (h,, hz+) such that h,+(o) = x and hs E Hom(A,, Brxl); and therefore
Q.E.D.
182
5. Automata homomorphisms
By virtue of Theorems 5.13 and 5.15 we formulate an algorithm computing generalized canonical homomorphisms. Algorithm 5.3. (Computation of generalized automata homomorphisms) Input: Deterministic complete automata A = (S,, C,, a,) and B = (S,, C,, Output: A set of generalized canonical homomorphisms GHom(A, B ) .
a,).
Step 1: Compute characteristic semigroup I@) of automaton B. Step 2: Determine set T,,(B), where
P T,,(B) = u ~ i n [ x [xi] ~ , E z ( B ) , p = card(Z(B)), i= 1 and Min[xi] = y e IyI = rnin{lzl: z E [xi]].
If several words in class [xi] have identical minimal length then as a Min[xi] we choose an arbitrary word y among words of minimal length in [xi]. Step 3: Determine extended autonomous factors B, = S (, { X I ,a,, 3 for every x E T,,(B), where d,, ,: S+{x} +S, is a restriction of function 3, to
-
SBXCx).
Step 4: Determine GHom(A,, B ) such that (hs, h,+(o)) E GHom(A,, B )
hs E Hom(A,, BJ,
where h,+(o) = x. Step 5: Determine GHom(A, B ) , where
Example 5.3.
Compute a set of nontrivial generalized canonical homomorphisms GHom(A, B ) for automata A and B from Figure 5.8 and 5.9. It is easy to verify, applying
Algorithms 5.1 and 5.2, that for these automata Hom(A, B ) = 0 and Horn,@, of automaton B (compare Chapter 2) is equal to
B ) = @ A characteristic semigroup)’1
5.2. Generalized homomorphisms of automata
183
Table 5.2, Extended autonomous factors B, of automaton B from Example 5.3 No.
x
B,
1 0 2 1 3 0 0 4 01 5 10 6 000 7 001 8 010 9 101 10 100 11 0010 12 0100 13 0101 14 1010 15 00100 16 00101 17 01010 18 10100 19 001001 20 001010 21 010100 22 0010010 23 0010100 24 00100100
(a c a b b c a b a b b a c a a c a c c b c b a b c
b a b c a a b b c a c a b b c c a a b b c c a b c
c) b b a b a c a a a c c c a c b b c b b a b a c c
A set T,,(B) is composed of sequences representing equivalence classes from I@). The extended autonomous factors B , of automaton B for X E Thn(B) are given in Table 5.2, and nontrivial generalized canonical homomorphisms (hs, h,,, hc2+)have been given in Tables 5.3 and 5.4. Corollary 5.8. Algorithms of computing generalized isomorphisms, generalized endomorphisms and generalized automorphisms are corresponding modifications of Algorithm 5.3. Corollary 5.9. The following evaluation on the number of generalized homomorphisms holds
card(GHom(A, B ) ) I min {card(GHom(A,, B ) ) ). (3E
c,
184
5 . Automata homomorphisms
Fig.5.8.Automaton A from Example 5.3 of automata from
Table 5.3. Nontrivial generalized homomorphisms (hs, h,+, h,) Example 5.3 for (3 = 0
h,(defgh abacb babba babba abaab acaac abaab acaac acaac babba cbccb cacca cacca cacca abaab abaab abaab babba babba acaac cbccb acaac acaac cbccb cacca cacca bcbbc bcbbc cbccb bcbbc bcbbc cbccb
01 01 01 01 10 01 10 10 101 010100 10 10 10 101 101 101 101 101 001010 010100 001001 001010 00100 001010 001010 010100 010100 010100 00 100 00100 00100
d
e
f
g
10 00 00 10 10 10 10 10 100 110011 11 11 11 010 010 010 100
00 10 10 00 11 00 11 11 010 001001 10 10 10 100 100 100 010 010 100100 001001 100111 100100 01001 111001 111001 110011 110011 001001 10011 10011 01001
10 00 00 10 10 10 10 10 100 110011 11 11 11 010 010
100
111001 110011 111010 111001 10011 100100 100100 001001 001001 110011 01001 01001 10011
100
11 00 00 10 10 10 10 10 100 110011 11 11 11 010 010 010 100
100
100
111001 110011 111010 111001 10011 100100 100100 001001 001001 110011 01001 01001 10011
111001 110011 111010 111001 10011 100100 100100 001001 001001 110011 01001 01001 10011
010
h 00 10
10 00 11 00 11 11 010 001001 10 10 10 100 100 100 010 010 100100 001001 100111 100100 01001 111001 111001 110011 110011 001001 10011 10011 01001
5.2. Generalized homomorphisms of automata
185
FigJ.9.Automaton B from Example 5.3 Table 5.4. Nontrivial generalized homomorphisms (hs, h,, Example 5.3 for 6 = 1
ha+) of automata from
hX+U)
d abacb babba babba abaab acaac abaab acaac acaac babba cbccb cacca cacca cacca abaab abaab abaab babba babba
10 001001 00 10100 00101 0101 00 10010 010 0010010 00 1 100 0100 01010 0100100 0010 00101 00 10010 001001 0010100 0101 1010 010 0010010 100 01010 00 100100 10100 001001 00 100100 10100 001001 00100100
i cbccb
cbccb cacca cacca bcbbc bcbbc cbccb bcbbc bcbbc cbccb
01 010010 0100011 11100 1000 1110100 100 1110100 010 001 1101 11001 10011101 1110 11100 1110100 010010 0100011 1000 0001 100 1110100 00 1 11001 10011101 10011 010010 10011101 10011 010010 10011101
e 10 111010 1110011 01000 1100 0100100 110 1001110 111 101 1001 10001 11101001 0100 01000 0100100 111010 1110011 1100 1001 110 1001110 101 10001 11101001 00011 100111 01001001 00011 100111 10011101
f 01 010010 010010 11100 1000 1110100 100 1110100 010 001 1101 11001 10010001 1110 11100 1110100 010010 0100011 1000 0001 100 1110100 00 1 11001 10011101 10011 010010 10011101 10011 010010 10011101
g
00 010010 010010 11100 1000 1110100 100 1110100 010 001 1101 11001 10011101 1110 11100 1110100 010010 0100011 1000 0001 100 1110100 00 1 11001 10011101 10011 010010 10011101 10011 010010 10011101
h
10 110010 110010 01000 1100 0100100 110 1001110 111 101 1001 10001 1110100 0100 01000 0100100 111010 1110011 1100 1001 110 1001110 101 10001 1110100 00011 100111 0100100 00011 100111 1001110
186
5 . Automata homomorphisms
5.2.3. Automata set simulation problems As a generalization of automata set representation problems by means of one automaton we shall formulate automata set simulation problems by means of one automaton (Mikolajczak [14, 151). We say that automaton A simulates automaton B if and only if there exists a generalized homomorphism h = (hs, hz+)E GHom(A, B ) . A relation “to simulate” is a special case of relation “to have possibility of another automaton” discussed previously by Hartmanis and Stearns [l]. This relation is an equivalence relation. Automaton A = (SA, C,, 8,) has possibility of automaton B = (S,, C,, a,) if and only if there exist functions ( h , , hd such that h,: S,+P(SA), h,: C,+-CA*, and for every s E S, such that s’E h,(s) and (3 E B we have h,(x)) E hl(dA(s’,
a,(&
0)).
Now we are in a position to formulate automata set simulation problems.
Simulation of automata set (1) Instance: Given a set of automata CI, = ( A , = (S,, C,, a,), A, = (S,, &, 89, ..., A, = (Sk, &, Question: Does there exist automaton A = (S, C, such that for every automaton A j € GI, there exists a subautomaton associated with the change of operating time A(’)= (S, Z(I1, a(J)) of automaton A such that a set of nontrivial generalized homomorphisms from Aj into A(’) is nonempty, i.e. GHom(Aj, A(‘))# 0?
a&].
a)
Simulation of automata set (2) Instance: Given a set of automata CI, = ( A , = (S,, C,, a,), A, = (S2, q,39,..., Ak=(SkP Ck, 83). Question: Does there exist automaton A = (S, C, a) such that for every automaton Aj‘ GI, there exists subautomaton associated with the change of operating time A(O,=(S, C(I),, of automaton A such that a set of nontrivial generalized homomorphisms from Aj to A(lId is nonempty, i.e. GHom(Aj, A(&)>#0? The problem (2) is a subproblem of problem (l), because subautomaton A(i3d is a subautomaton of subautomaton of automaton A. The automata set simulation problems, as formulated, are synthesis problems because construction problems corresponding to them require the definition of automaton A. If automaton A is given a priori then automata set simulation problems are said to be analysis problems and are reduced to verification whether for each A j e CI, there exists such subautomaton A(0 of automaton A that GHom(Aj, A(’])# 0 or subautomaton of automaton A that GHom(Aj, A(92 # 0, respectively. Synthesis problem is still open. The analysis problem requires computation of generalized homo-
5.2. Generalized homomorphisms of automata
187
morphisms or, in some cases, considerations of properties of the set GHom(Aj, A('') or GHom(A? A(']>, respectively.
MulticbanneI
clock Fig.5.10. Block scheme of a circuit simulating a set of automata
On Figure 5.10 the block diagram of a simulating system for a set of automata by means of one automaton is given. Additionally a multichannel clock with different frequencies being multiple frequency of the fundamental one, and a simpler automaton (with number of states smaller than in automaton A ) uansducing literals of input alphabet Zj into words from C,+ are used. Synthesis problem for AUTOMATA SET SIMULATION has always a positive solution if we assume that automaton A is universal (see Chapter 3) with the number of states card(S) = max (card(S,)1 i = 1, 2,
..., k ) .
However from the point of view of technical implementations the most interesting are automata with possibly minimal number of states, and additionally such that (i) maximal length of word h,+(o) = x is the smallest possible (assuming uniform distribution of literals in input words), (ii) total length of all words h,+(o) = x is the smallest possible (assuming uniform distribution of literals in input words). In solving synthesis problem in AUTOMATA SET SIMULATION very helpful are results presenting relationship between generalized automata homomorphisms and their subautomata associated with the change of operating time. Relevant results have been collected in a subsequent theorem.
5.Automata homomorphisms
188
Theorem 5.16. Let GlZom(A, B ) be a set of generalized homomorphisms of automata A and B ; then the following relationships hold (i) GHorn(A('J)= 0 =) GHorn(A(I1,B ) = 0, (ii) GHorn(A, B ) = 0 =$ GHom(A, B('1) = 0 3 GHom(A, B(03 = 0 (iii) GHom(A, B ) = 0 =bGHom(il(l1,B ) = 0 (iv) G H O ~ ~ ( A=( ~0~& , J GHom(A, B ) = 0 (v) GHom(A, B ) = 0 Sk GHorn(A('1,, B ) = 0.
Proof. (i) Follows from the fact that A(B, is an input subautomaton of automaton A(1J: GHorn(A(l1,, B ) = 0 e x
n XE
n E
GHom((A(lJJ,, B ) = 0
c*(l>,
*
GHom((A(')),, B ) = 0 e GHorn(A('),B ) = 0
C,(+
(ii) Automaton B(lJd is an input subautomaton of automaton B('1, and automaton B(IJ is an input subautomaton of automaton B. The following relationships hold for characteristic semigroups of these automata:
Therefore the following implications hold GHom(A, B ) = 0 e.n GHom(Ao, B ) = 0 CTE
c,
(iii), (iv), (v). Follow from the fact that autonomous factors of automaton A arc not state isomorphic with autonomous factors of automata A(1)and A('),, respectively. Q.E.D.
5.3. Comparison of automata properties
189
5.3. Comparison of automata properties with respect to functions preserving operations In this section we investigate various automata properties with respect to such transformations as state and generalized functions preserving operations; especially, homomorphisms (state and generalized) and isomorphisms (state and generalized). Only some of these results will be proved. All results are collected in Table 5.5. Word YES on the intersection of i-th row and j-th columns indicates that i-th property is preserved using j-th transformation. Formulas appearing on intersection of i-th row and j-th column indicate the precise relationship under specific transformation. Let A = (S,, C,, a,) be an automaton; R z S A is said to be a genetic subset if and only if dA-'(R) z A ( R ) (Bavel [2]). We will show that generalized homomorphisms do not preserve genetic subsets, i.e. that generalized homomorphic image of a genetic set is not equal to the genetic subset of generalized homomorphic image (Mikolajczak 1131). If (hs, hx+) E GHom(A, B ) and R zSAis a genetic subset, then hdR) is not, in general case, a genetic subset. This follows from subsequent considerations
It is easy to give an example of automata for which h,(R) is not a genetic subset (Figure 5.1 1). Automaton A =(SA. C,, a,) is said to be semiretrievable if and only if for every O E C,, and for every S E a,(S,, 6) there exists a word X E CA* such that X O ) = s (Bavel [1, 21). We show that generalized homomorphisms preserve automata semiretrievability (Mikolajczak [ 131). Theorem 5.17. Let A = (SA,C,, a,) and B = (S,, C,, 8,) and let h = (hs, hx+)E GHorn(A, B ) . If A is semiretrievable, then also h(A) c B is semiretrievable.
5. Automata homomorphisms
190
Fig.5.11.Automata for which genetic subset is not preserved Table 5.5. Comparison of automata properties with respect to function preserving operations
Automaton
I 1
1
i I
-
State/generalized
State/generalized
isomorphism
homomorphism
Primary Intersection of primaries
YES
NOT
h,(<s> n n
h,(<s> n n
Set of generators
YES
YES
Connectedness; strong connectedness Retrieveability; semi-retrieveability; partial retrieveability
YES
YES
I
I
i
I
5.3. Comparison of automata properties
191
Automaton A = (S,, C,, a,) is said to be partially retrievable if and only if , there exists X E ' , C such that for every for every CTE C,, and for every S E S tE S , follows: a,(t, 0) = s implies a,(s, x ) = t. We prove that generalized homomorphisms preserve partial retrievability of automata (Mikolajczak [13]). Theorem 5.18. If A = (S,, C,, a,) is a partially retrievable automaton and h = (hs, h , + ) ~GHom(A, B ) , then h ( A ) c B =(S,, C,, a,) is also a partially retrievable automaton.
Q.E.D.
5.4. Complexity of computing generalized automata homomorphisms
In this section we will analyze computational complexity (especially, time complexity) of computing functions preserving operations. This denotes that we simultanously discuss problems of computational complexity for automata representation and automata simulation problems which have been reduced to the problem of computing state-input and generalized homomorphisms, respectively. From Levin [l] we know that decision problem, whether a set of graph homomorphisms is nonempty, is NP-complete (for both directed and undirected graphs); similar problem for graph isomorphism is "-intermediate. One can prove NP-completeness of graph homomorphisms by means of polynomial transformation to the problem of k-colorability of graph vertices. As we have proved the problem of computing generalized homomorphisms of automata can be reduced to the problem of computing state homomorphisms of automata, and therefore the problem of verification whether a set of nontrivial generalized homomorphisms is nonempty is also NP-complete. We can now summarize these considerations as theorems.
192
5 . Automata homomorphisms
Theorem 5.19. The following decision problems are NP-complete: (i) decision problem, whether Hom(A, B ) = 0 (ii) decision problem, whether Hom,(A, B ) = 0 (iii) decision problem, whether NTGHom(A, B ) = 0 (iv) two problems of automata set representation (v) two problems of automata set simulation.
Proof. (i) Follows directly from Levin [l]. (ii), (iii) Follow from the fact that computing state-input homomorphisms and generalized homomorphisms can reduced to computing state homomorphisms. (iv), (v) Follow from the fact that representation and simulation problems for a set of automata can be reduced to the problem of computing state homomorphisms. Q.E.D. Theorem 5.20. The following decision problems are "-intermediate: (i) decision problem, whether Is(A, B ) = 0 (ii) decision problem, whether Is,(A, B ) = 0 (iii) decision problem, whether GIs(A, B ) = 0 (iv) two problems of automata set representation (with state-input isomorphisms), (v) two problems of automata set simulation (with generalized isomorphisms). Proof. For problems (i)-(v) the polynomial algorithms have not been found and at the same time NP-completeness of the problems has not been proved (compare Both [ll). Q.E.D.
It is worth to mention at this point that NP-completeness of problems (iii), (iv), and (v) in Theorem 5.19 follows from NP-completeness of problem (i) in this theorem. This means that decision problem, whether NTGHom(A, B ) # 0 for automata for which automaton B has characteristic semigroup I(B) of complexity dependent polynomially from the number of states of this automaton, is also NPcomplete problem. Remark. Strongly connected asynchronous automata with card(C) = 2 have property that card(l) = O(n), and ( k , 0)-asynchronous strongly connected automata have property such that card(l) = O(nk) (Bocian [l]). These are the two only known classes of automata with polynomial complexity of characteristic semigroup. Now we shall conduct an analysis of time computational complexity of computing state homomorphisms of automata using Algorithm 5.2; this algorithm
5.4. Complexity of computing homomorphisms
193
is composed of the following main steps (in all considerations n = card(S)): (i) computation of connected components of autonomous factors of automata - this step has worst case time complexity equal to O(nz>,because it requires a verification of autonomous factors connectivity with simultaneous extraction of connected component, (ii) computation of cycle length of autonomous factors components - this step has worst case time complexity equal to O(n2>, because it requires a verification of condition a(s, 09 = s, for an arbitrary state s and k in the worst case can be equal to n, (iii) computation of components of autonomous factors of automaton B with lengths of cycles being divisors of cycle lengths for autonomous factors of automaton A, with Computation of these divisors - this step requires in the worst case O(n2) time, because we have to compare the cycle lengths for arbitrary pair of autonomous factors, (iv) computation of minimal set of generators for every Component - this step requires t h e complexity O(n2) because computation of a set gen,,(A) requires the computation of S \ $(S, (3) for every state s E S , and also the Computation of S\&S. Q), where S is a set of states of an arbitrary component, (v) computation of states-images of states belonging to minimal set of generators has time complexity O(2"), because it requires a nondeterministic choice of states-images with simultaneous fulfillment of connectivity, level, and divisor conditions, (vi) verification whether the relation p is a function - this step requires in the worst case O(n4), because for n-state automata the relation p has at most O(n2) elements; and verification whether relation with n2 elements is a function requires n2 over 2 moves of one-tape Turing machine. From the analysis we conclude that the dominating role in this algorithm is played by step (v).
194
5 . Automata homomorphisms
Exercises
5.1. Give an example of automata such that (hs, h , + ) ~GZs(A, B ) does not imply that ( h S - l , hx+,)E Gls(B, A ) .
5.2. Show that if A is k-asynchronous automaton, and B is arbitrary automaton, then (i) GHom(A, B ) = 0 @ CHom(A(’),, B ) = 0 (ii) GHom(A, B ) = 0 e GHom(A(I3,B ) = 0.
5.3. For automata on Figure 5.12 and Figure 5.13 compute the group of automorphisms. Are these automata total? 5.4. For automata A and B in Table 5.6 compute the set of state isomorphisms.
5.5. Prove that for perfect automaton A = (S, C, 3) function h,: S + S, such that h,(s) = 3(s, x) is an automorphism.
5.6. Prove that for strongly connected automaton A = (S, C, 3) a semigroup of endomorphisms E(A) has property card(E(A))= card(S). 5.7. Prove that for strongly connected automata A and B the following relationship holds for groups of automorphisms G(A) x G(A)L G(AxB).
\ Fig.5.12. Automaton A from Exercise 5.3
Exercises
195
Fig.5.13. Automaton B from Exercise 5.3 Table 5.6. Automata A and B from Exercise 5.4
5.8. Prove that if for arbitrary strongly connected automata Hom(A, B ) # 0 or Hom(B, A ) +@,then the direct product AxB is not strongly connected.
Bibliographic note The concept of functions preserving operations of automata has been considered by Fleck and Weeg in 1962. The algorithm of computing state homomorphisms by means of decomposition of automaton into primaries has been presented by Bavel in 1968. Bavel also studied properties of homomorphisms in his subsequent papers, and finally he summarized these results in the monograph. The algorithm of computing state homomorphisms by means of decomposition into autonomous factors has been formulated by Grzymala-Busse in 1971, and algorithm of computing generalized automata homomorphisms has been presented by Mikolajczak in 1979. Theorem on the relationship between homomorphism and SP partition appears in the Hartmanis-Stems’ monograph in 1966. Karpow has studied a relationship between the automorphism group and the lattice of SP
196
5 . Automata homomorphisms
partitions of an automaton. He has given an algorithm of computing G(A) by means of a lattice of SP partitions. Karpov’s algorithm is in fact a continuation of Schutt’s ideas on the relationship between automorphisms and SP partitions. This relationship has been also studied by Barnes. Bavel has given an upper bound on the cardinality of automorphism group. The relationships between endomorphisms and SP partitions have been studied by Grzymala-Busse; M a s o n and Smith have formulated a necessary and sufficient conditions on linear realizability of automata (Chapter 11) by means of endomorphisms semigroup. Arbib and Weeg have studied properties of automorphisms group of a direct product of automata. Effective algorithms of computing the isomorphisms of automata have been presented by Chao Chih Yang.
6. Realizations of automata. State assignment
All automata considered here belong to the class of DFA. Definitions of fundamental concepts of realization of an automaton by another one are presented in this chapter. The most general definition of realization was introduced by Hartmanis and Steams. The other concepts discussed here are: a homomoqhic realization, a Herman realization, an isomorphic realization and a state realization. We start by showing relations between some of these concepts. Then state realizations of complete automata without outputs are discussed in detail. The state assignment is shown here to be a fundamental problem because of its implications on the structure and in consequence for the complexity and cost of realization of automata. We show how these implications relate to the flow of information in an automaton and how they can be determined using a lattice of Mm state partition pairs. The problem of choosing state assignment is restricted here to the reduction of dependencies. First, two-state components of delay type are considered and the rules of choosing state assignment are presented using analysis of the coding partition indices. Then the selection of state assignment is discussed in the case of multi-state delay components and of arbitrary two-state components. At the end, a method for determining the minimum of input information for arbitrary components is proposed, which can be used to evaluate the value of these components for the realization of a given automaton. 6.1. The concepts of realizations
The formal concept of a realization of an automaton was introduced to describe precisely relations observable among the real automata-like objects. As an example of a pair of such objects consider: - an algorithm B for controlling calculations of the mean-square value of a given set of numbers, and - a device A which controls the process of the above calculations in some specialized processor. Commonly it is said that the controller realizes the algorithm, or that automaton A is a realization of automaton B . It is important then to describe formally the relations between automata A and B in all those cases when in applications we say that object A realizes a given object B .
6. Realizations of automata
198
The preservation of all operations in the object B under a morphism of B into A is of basic importance. It was found that in practice many different definitions of realization may be useful especially when the outputs, i.e., the behavior of automata is considered. We will present some of these definitions and the relations between them. Let there be given two automata A = (SA, ZA, dA, aA,yA) and B = (SB, CB, a,, a,, yB). Let us recall that either ?=A, if A and B are both of Moore type, or y=B if they are of Mealy type. By a coding of automaton B by means of automaton A is a triple of functions:
such that
and
for Moore automata, or
for Mealy automata.
I
I
Fig. 6.1. Realization A of automaton B with coding
(a, t, C)
An automaton A is said to be a realization of an automaton B if there exists any coding of automaton B by means of automaton A. Figure 6.1 shows how this
6.1. The concepts of realizations
199
realization is understood. Notice that if automaton A is a realization of automaton B with a coding (a,1, C) then
The above condition means that automaton A when starting from any state a(s) will behave, under the interpretation of mappings t and 5, like automaton B starting from state s. Behavior is understood here as the process of generating by an automaton its output letters O E Q in response to an input word. The condition (6.4) may also be expressed in the following way: s’
E
Theorem 6.1. An automaton A is a realization of an automaton B if and only if there exist functions t: C , + CA and C,: QA +SZ, such that
Proof. Is omitted. Let us note that if an automaton A is a realization of an automaton B, then both automata need to be related neither by a state-input isomorphism nor by a state-input homomorphism. However, such relation holds in some cases. Theorem 6.2. An automaton A is a realization of an automaton B with coding (a,t, such that t is an injection and C, is a surjection if and only if some state subautomaton A’ of the automaton A (A’ LA) is projected under some stateinput homomorphism onto the minimal automaton B , of B.
c)
Proof. Let us note that if the automaton A is a realization of automaton B, then it is a realization of its minimal form Bd,,. Since the function t: C,+CA is also injective we are justified to assume that B is minimal. (+) We only need to show the existence of A’ r A which is projected onto B under a state-input homomorphism. Let S’ = u { a ( s )1s E S,), C’= u (t(o) I o E C,), Q’ = QA and let functions a’ and B’ be the restrictions of a, and BA to S’xc’, respectively. From the definition of coding (a,t, 5) it follows that s’ E a(s) implies a’(a(s),t(o)) G a(a,(s,o)), so we have
This means that A’ LA. We will show now the existence of a homomorphism (hs, h,, h& of automaton A’ onto automaton B. We assume that (hs(s’)=s) w s’ E a@) since by minimality of B the function a is a function into disjoint subsets of the set SA, SO S’ c S A holds a~ well. Supp~sealso that h,=t-’ and h,= 6. Since for all s’ E a(s) hold a’(s’, ~ ( 6 )E)a(a,(s, 0)) and c(flA(s’, ~ ( o )= ) )&(s, o), then we have
6. Realizations of automata
200
and
But it means that (hs, h,, h& E HomXA’, B ) . (e) If (hs, h,, h d HomXA’, ~ B ) , then we have the following coding of the automaton B: - ~ ( ois) an arbitrary, fixed o’E C’ such that h,(o’)=o, - a(s)= {s’ E S’ 1 hs(s’) = s) and
- (=ha. Let (s, o)E S, x C,. For s’
E
a(s) h,ds’) = s holds, so because of
we have aA(s’,t(o)) E a(d,(s, o)), and thus aA(a(s),t(o)) ca(d,(s, 0)).Since also [(BB(s’. t(0))) =.LIB(& a), the automaton A is a realization of the automaton B with coding
(a, L, 6).
Q.E.D. Theorem 6.2 shows connections between the concept of realization and the concept of homomorphic realization. The latter is defined as follows. Let A’ c A . If an automaton B is an image of an automaton A’ under certain state-input homomorphism, then the automaton A is called a homomorphic realization of the automaton B . We illustrate this in Figure 6.2. From the above definition and Theorem 6.2 it follows that any homomorphic realization of a given automaton B is also its realization. Moreover, if some automaton A is a realization of a given automaton B with coding (a, t, 6 ) such that t: C,+CA is is surjective and a is a function from S, into dlsjoint injective, 6: sZA+sZ, subsets of the set ,S, then the automaton A is also a homomorphic realization of the automaton B . Let us present now definition of a realization according to Herman. An automaton A is said to be a Herman realization of an automaton B , if there exist functions w: S, +P(SA), t: C, + CA and injection X : a, 3 a,, such that
and
6.1. The concepts of realizations
20 1
Figure 6.3 illustrates this concept of a realization.
Fig. 6.2. Automaton A as a homomorphic realization of B
Fig. 6.3. Automaton A as Herman realization of B
We will discuss now relations between both definitions of realizations.
Theorem 6.3. Let A and B belong to DFA. (1) If automaton A is a Herman realization of automaton B then A is also a realization of automaton B. (2) If automaton A is a realization of automaton B with coding (a,c, such that is bijective, then it is also a Herman realization of automaton B.
c)
c
Proof. (1) If automaton A is a Herman realization of automaton B with the functions yf, L and x then the conditions (6.1) and (6.3) will be satisfied if we choose a=yt and the function SzA+Szg in such a way that either c(w)=o’ in the case of o’E SzB and ~ ( 0=’ o, ) or c(w) is an arbitrary element from QB - in the other case. (2) The proof of this part of theorem is analogous. Q.E.D.
c:
202
6. Realizations of automata
Theorem 6.4. Let A and B belong to DFA. (1) If the automaton A is a homomorphic realization of the automaton B, where in the homomorphism (hs, h,, hd E Hom(A’, B) function h is injective, then A is also a Herman realization of automaton B. (2) If the automaton A is a Herman realization of automaton B such that its function w: S, +P(SA) is a function into the disjoint subsets of S, and L: C, + C, is injective, then A is also a homomorphic realization of automaton B.
Proof. (1) Let automaton A’ = (S’, c’,8 , SZ’, j”) L A be projected onto automaton B under a homomorphism (hs, h,, hn). We choose the functions yf, t and x as follows. Let t(0) be an arbitrary element 0’E c’ such that h,(o’) =6. Let x = hn-l and w(s) = {s’ E S’ I hdh’) = s). Suppose now that (s, 0)E S, x C, and s’E ~ ( s ) .Since (hs, h,, h& is a homomorphism from A’ onto B , then
holds and we have
Thus, the condition (6.6) is satisfied. Similarly, since (hs, h,, h , ) ~ HomXA’, B), then
holds and we have
and the condition (6.7) is satisfied. Thus automaton A is a Herman realization of automaton B. (2) If A is a Herman realization of automaton B then by Theorem 6.3 automaton A is also a realization of B with coding (a,L, [) such that a=yf is a function into disjoint subsets of the set SA, L is injective and C=x-’ is surjective. Thus on the basis of Theorem 6.2 automaton A is a homomorphic realization of automaton B. Q.E.D.
6.1. The concepts of realizations
203
isan iryection Lnlo T.SA
Fig. 6.4. Diagram of implications for distinct notions of realization
Figure 6.4 shows the conditions which must be fulfilled by the coding (a,L, <) in order to imply that a realization of automaton B by automaton A in some sense is also its realization in some other meaning. If the function a: S, +P(S,) is a function into the disjoint subsets of set S,, then we denote that a is injection into K,,, where by zSAwe mean a partition of the set SA. 6.2. Structure of realization
In this subchapter we focus our attention on automata without outputs. In most cases in structural theory of automata this does not restrict the generality of considerations. In all cases when the outputs are necessary one can always treat an automaton A = (S, C, 13) as Moore type assuming that R = S and h =id. We will use mostly the definition of homomorphic realization. Thus if automaton A = (S,, CA, 8,) is a homomorphic realization of B = (S,, C,, 3,) we will describe it by means of a state-input homomorphism (hs, h J , where h,: S’+S, and h,: c’+ C,, of state subautomaton A’ = (S’,C’, d’) of A onto the automaton B . In the case when (hs, h a is an isomorphism of A’ onto B y the automaton A will be called a state realization of the automaton B . The term coding will be used to both: functions of realization a and L assigning the states and inputs of realized automaton B , as well as to functions h, and h,. Moreover, let us assume in the sequel that any realized automaton B = (S,, C,, 3,) has inputs assigned by C, = C =X. In consequence our state realization with (hs, hJ = (h,, id) E Is(A’, B ) may be determined by the state homomorphism h=hP Note that the assumed definition of a state realization of an automaton is more general than the following definition of an isomorphic realization. An automaton A = (S,, C,, 3,) is said to be an isomorphic realization of an automaton B = (S,,
204
6. Realizations of automata
C,, a,) with c d n g (a, L) if the function a: S , + S A is bijective and the condition (6.1) is satisfied. Let us introduce now the notion of a component automaton Ai = (Si, Xi, ai) to be an automaton associated with an arbitrary state realization A = (SA, X , a,) of a given automaton B = (S,, X, a,). We shall assume that for the automaton B its state realization A with component automata Ai, where i E { 1, 2 , ..., n ) is such an automaton that
s, = s, xs,x
. . . xs,
and
where x E X , s = (sl, s,, ..., s,J is from the set S,, and inputs oi are determined by the functions f;:S, x X + Xi. The function f; is said to be an excitation function for the component Ai of the state realization A of the automaton B . Let the variable yi has its values in the set Si. We shall call it an internal variable of the state realization A (with component automata A;) of the given B . Assigning the states of a realized automaton B to the states of its realization A we can determine function a by means of n functions ai: S, +Si such that a(s)= (sl. s,, ..., s,,) implies ai(s)= si for i = 1, 2, ..., n. Then the value of internal variable yi for a state S E S,, when encoded by a, is given by ai(s).The function ai is said to be a partial assignment of states of a given automaton B by the states of a chosen automaton Ai. Let us assume the excitation function of the i-th component of an isomorphic realization A of a given automaton B to be of the form:
We denote by Ni the set of all subscripts of those internal variables which are substantial among the arguments of the excitation function of the i-th component of A . We have then Ni = {i,, i,, ..., iG} and card(Ni)= ai. The number ai is said to be the number of dependencies of the internal variable yi or of the component automaton A;. Suppose that the components Ai are ordered according to their ascending numbers of dependencies ui.Then the n-tuple (al, q,..., a,J will be called the structure of realization. Let G = ( N , I ) be such a graph that N = { 1, 2, ..., n ) is the set of its vertices and the set I of its edges is given by (j, i) E I w ; > Ni. j ~ The graph G is said to be the structural graph of the state realization A of B . The graph G will be called also the scheme of dependencies between component automata Ai in the automaton A.
205
6.2. Structure of realization
The function assigning the states of an automaton B to the states of an automaton A is usually described in terms of partitions ni= (Bi(l3) of the set S,. An assigning partition xi is defined as follows: for s, t~ S, we have Bi(9(s) = Bi(i)(t) (denoted also by s= ?(xi)) if ai(s)= ai(r)= j , and J E Si. It follows from the definition that any partition xi of a set S, determines uniquely some partial assignment ai: S, +S, where elements from Si are interpreted as names of blocks of the partition q. A set K of partitions nl. %, ..., K, will be reffered to as a set of assigning partitions of an automaton B. A set of assigning partitions always satisfies the condition K, .%. ... .K, = 0, which means that each element of S, has a distinct code. Let us illustrate now the introduced notions. Example 6.1. Let there be given an automaton B = (S,, X, a,), where S,= (1, 2, 3, 4, 5), a, is given in Figure 6.5. Let us assume that automata A i = ((0, l ) , (0, I], ai) such that (VSE Si)[a,(s, 6)=01 are to be used as components in a realization of B. They are known as two-state delay elements or simply D type flip-flops. Let us consider now two different decisions of choosing the state assignment of the automaton B. They are given in the form of functions from some subsets of the set S,xS2xS3=(0, 113 onto S, and are shown in Table 6.1.
X = (00, 01, 10) and
Table 6.1. Assignments h, and h2
I
Y1
Y2
Y3
0 0 0 0
0 0 1
0 1 0 1 0 0
1
1 1
1 0 1 1
1
I
hl
h2
1 2
1
I
4
3 4 5
3
5 2
The partial assignments in both cases are given by the columns of the values of variables yl, yz and y3. The assigning partitions are as follows. For the first case with h,: e y l = I l , 2, 3, 4; 51, eS={1, 2, 5; 3, 4), Qy3=(1,3, 5; 2, 4),
6. Realizations of automata
206 and for the second case with Qyl=
(1, 4; 2,3,
&:
51, Qy2=(1, 3 , 4;2, 5 ) , ey3= (1, 3 , 5; 2,4).
The excitation functions are of the form: for the first case of state assignment with h,:
and for the second case of state assignment with
4:
00 70 -
Fig. 6.5. Transition diagram of an automaton B from Example 6.1 In equations the values of excijation functions are denoted by Y i r )= yif+I), since they are equal to the next state for the chosen components. The values of variables x1 and x2 are from the alphabet 2, = X = (00, 01, 10). It is seen that various assignments may lead to dstinct structures of realization, namely (3, 3 , 3) and (1, 2, 3). The schemes of dependencies of components are shown in Figure 6.6.
6.2. Structure of realization
207
Fig. 6.6. Graphs of structures of state realizations of the automaton B implied by two distinct assignments h, and h,
In what follows, by the measure of complexity of the structure of a state realization A of a given automaton B we will mean a number c = ai + % + ... + a,,. In Example 6.1 it was shown that for automaton B the complexity of its state realization is implied by two decisions: the. selection of the realizing components and the selection of a state assignment. Choosing a state assignment is well known in the literature as the state assignment problem. In the case of delay type components, looking for a state assignment which leads to the minimal complexity cmin of structure is called the reduction of dependencies (in the excitation functions of components). In the following part of the chapter we will present the state assignment problem, first using the reduction of dependencies aspect. This is a classic approach. Nevertheless, there are still many papers contributing to the problem and it is still practically useful. The reduction of dependencies in technical projects, in digital circuits mainly, gives the chance to obtain cost reduction by simplifying the structure which may appear possibly even in the modem digital circuits where the combinational logic of automata is implemented in ROM form.
6.3. Partition pairs and information flow in automata We are interested in evaluation of the structure graph of a realization of a given automaton B which is implied by deciding an assignment h. However, it is not necessary to compute the excitation functions of realizing components. The desired information may be obtained for any given function h from the lattice of some special partition pairs of automaton B introduced below. We will show how to utilize these pairs of partitions in the state assignment problem.
6. Realizations of automata
208 6.3.1. Mm partition pairs of an automaton
Let n be a partition of some set S. We will use the following notations:
where ]p[ is the least integer not smaller than p . If 8 and n are some partitions of a set S such that 0 2 n , then by the symbol 0 l n we will denote the partition 6 of the set n. Let there be given automaton B = (S, C, and let (n, 2) be a pair of partitions of the set S such that
a),
(Vo E C)vu is a function n +TI,
where f,: S + S is defined by fu(s) = a(s, 6) for any S E S. Such a pair will be called a partition pair of automaton B and will be shortly referred to as a p.p. for B. Analogously the input-state partition pair for automaton B is defined to be a pair (p,2) of partitions on the sets C and S, respectively, such that (Vs E S)lf, is a function p -+ zl,
where f,: C + S is defined by f,(d) = d(s, 0)for any d E C. Let us note that if (n, n) is a p.p. for B, then the partition n on S is an SPpartition of automaton B. Suppose now that a pair (n, ‘5) of partitions on the set S is a p.p. for automaton B. Since any function f,: S + S acting on subsets of S maps n into T then, as it is easy to see, for such a partition there are always two particular partitions of S for B. These are: M ( z ) - the greatest partition,,n such that (n-, z) is a p.p. for B , and m(n) - the smallest partition zh,, such that (n, zh;3 is a p.p. for B . If in a partition pair (n, 2) for automaton B n = M ( z ) and z=m(n), then i t is said to be a Mm partition pair for B . More formally:
ni
m(n) = {ziI (n, zi)is a p.p. for B } , M(z) = Xi {niI (xi, z) is a p.p. for B}. The symbols Hiand Xi are used to denote the product and the sum of partitions. The above formulae are not very convenient to compute partitions m(n) and M ( z ) . We will show a more practical method of computation based on the transition table of an automaton.
6.3. Partition pairs and information flow
209
The transition table of an automaton B with all next state symbols d c + I ) replaced by the symbols ai(s)according to a coding partition xi is said to be the partially encoded table associated with the partition xi of S. For a given state s E S of an automaton B = (S, C, and a partition xi of S consider the following sequence RN(s, xi):
a)
where k=card(C). This sequence can be interpreted as a number given in a position system, thus we will call it the row number. Note that the symbol ai(s) stands for the number of the block B ( ~ ) xi. E Then the following theorem holds. Lemma 6.1. Let xi be a coding partition of an automaton B = (S, C, a). Then s=t(M(ni))if and only if RN(s, xi)=RN(r, xi). Proof. (*) Let M(ni)=2. If (7,xi) is a p.p. for automaton B, then the function f, is from T into n for any O E C. Since s = t(T), then B('J(a(s, a))= B('J(a(t, a)), and thus also ai(a(s,a))= ai(a(t,a)). We have RN(s, xi)=RN(t, xi). (c')Let M(ni)=r. Suppose that s & t ( ~ ) . Then, there exist O E C such that d(s, b)fa(t, o)(ni)because the pair (z, xi) is a p.p. for B and there is no T' > T such that (T', xi) is a p.p. for B and s = f ( ~ ' ) . This means that ai(a(s, a))# ai(a(t,a)), which contradicts the equality of row numbers. Q.E.D.
When looking for the lattice of Mm partition pairs of an automaton B we will use additionally the following lemma. Lemma 6.2. If P i = (xi, T~)and P j = ( x P T~)are the Mm partition pairs of an automaton B, then the pairs Pi +Pi = (M(Ti + Ti>, Ti + Tj), Pi .Pi = (xi xj, m(xi. xi))
-
are Mm partition pairs for automaton B.
-
Proof. Let us note that the pairs of partitions (xi + xi, T~+ T~)and (xi T~ zj) are such p.p. for an automaton B' that m(xi + nj) = T~+ T~ and M(zi.'cj)= xi*xi. which follows from m(ni + xj) = m(ni) + m(xj) and from M(zi * zj) = M(Ti) -M(Tj). From the definition of partitions m(p) and M(p) for a given partition p it can be shown that m(M(m(p)))= m(p) and M(m(M(p)))= M(p) hold. Then from the f h t equality it follows that ( M ( T ~ + T ~zi) ,+ z j ) forms an Mm partition pair for automaton B and from the second equality it follows that (xian> m ( n i - x j ) )
210
6. Realizations of automata
forms an Mm partition pair for B .
Q.E.D. From the above lemma we have immediately the following.
Corollary 6.1. The set L of all Mm partition pairs of an automaton forms a lattice (L, +, .). Proof. The proof follows immediately from the fact that both operations do not lead out of the set L and fulfill the rest of axioms for the lattice.
Q.E.D. Now let us present an algorithm which can be used to determine the lattice of all Mm partition pairs of an automaton. Algorithm 6.1. (Determining the set of the lattice of Mm partition pairs of automaton). Input: A given complete automaton B = (S, C, a). Output: The set L of the lattice of Mm partition pairs of B . Step 1: Generate partitions of the form n8, = isl; s2; ...; s, t; ...; sp) for all s, t E S, where s # t . Step 2: Determine all partitions m(x,, $. Step 3: Generate transitive closure (7;)of the set (rn(x8,J ) under the operation of +. Step 4: Compute partitions ni=M(zi). Step 5: Include the pair P,(O,, 0,) and PI&, 1,) into the set ((xi,2;)).
In order to compute partition m(n) for a given IC on a set S it is convenient to use the transition table of an automaton. It suffices to determine all pairs of ) to compose successors a(s, 6) and d(t, 6) for all s, t~ S such that s = ~ ( I cand these pairs into the minimal partition z with a(s, 0)= a(t, O)(T). Example 6.2.
Let us determine the lattice of Mm partition pairs for automaton B given by its state diagram in Figure 6.5. After two steps of the algorithm, using the transition table of B we obtain:
6.3. Partition pairs and information flow
211
During Step 3 we obtain z1 +z2= l,, z2+z3= 11, 4; 2, 3, 5 } =z9 and z2+ z5 = (1, 2, 4, 5; 3) = zl0 which completes the set (zi);card( (7;)) = 11. Table 6.2. Computing the partitions M(zi) in Example 6.2
1
2
4
3 1
2
3
4
5
1
112
253
445
443
535
1 2 3 4 5
CCC CCD CCD CCD CCD CCD CCD CCD CCD CCC
CCC DDE DED DDD DDE DDD DEE DEE DDD CCD
DDC CCD CCE DDD DDD EED FFE EEE CCD CCC
DDC CCE CCD DDD DDE EED FFE EEE CCD CCD
ccc
ccc
ccc
ccc
ccc
ccc
xi = M(Qi)
6 7 8 9 10 11
DED EDE DDD DED DDD EEE EEE DDD CDC
Fig. 6.7. Hasse diagrams of a subset of partitions (zi) and of the lattice of Mm partition pairs of automaton B
6. Realizations of automata
212
The computations within Step 4 are shown in Table 6.2. Column 3 of Table 6.2, contains the transition tables partially encoded by zi,thus for all partitions zi,the following 5-tuples of row numbers are placed RN(1, zi),RN(2, zi),RN(3, zi),RN(4, zi) and RN(5, zJ. For example for partition z6 they are of the form: CCD, DDD, EED, EED and DDD, respectively. By Lemma 6.1. the row numbers allow to determine all partitions xi= M(.si). In Figure 6.7 the Hasse diagram for a set of partitions derived after Step 2 of the algorithm (with included partitions 0, and 1,) as well as the diagram of the lattice of all Mm partition pairs of automaton B are shown. 6.3.2. The flow of information in an automaton
In order to show the importance of the lattice of Mm partition pairs of automaton B let us consider at first an information interpretation of partitions. There is a close connection between a partition pair (K, z) of an automaton B = (S, C, and a change of amount of information which we have about its states in two consecutive moments of discrete time. The transition function allows to determine the T-information associated with a next state on the basis of xinformation associated with a current state of automaton. By the x-information associated with a state we mean that the state is determined with accuracy to the block of partition x. Similarly, the 7-information associated with a state of automaton B allows to determine Tc-information associated with its predecessing state. In particular the partition m(n) describes the largest amount of information which can be obtained about the next state of B assuming given Tc-information about its current state. And the partition M ( z ) describes the least amount of information which must be assumed about the current state of B to obtain desired 7-information about its next state. We will shortly say that m ( r ) gives the maximal succeeding information and M ( z ) gives the minimal predecessing information. Additionally, note that the above minima and maxima of information can be related to the input-state partition pairs of automaton as well. The role of these partitions, especially the minima of predecessing information, namely M ( z ) - for state-state p.p, of B and Mx-s(z) - for input-state p.p. of B , is described precisely by the following theorem.
a)
Theorem 6.5. Let there be given an automaton B = (S, X, 7 on the set S and p on the set X. Then
a) and partitions p and
hold if and only if there exists a function f: p x p -+z, such that (6.10)
6.4. Binary state assignment
213
Proof. (e) Suppose that such function f does exist. Then for s = t(p) there holds
for any X E X. It means that fBcp) is a function p +z and f,(p) is a function p+z. Thus (p, 7) is a p.p. for B and (p, 7) is an input-state p.p. for B; therefore the inequalities (6.9) are true. (3) If the inequalities (6.9) hold., then (p, z) is a p.p. for B and (p,z) is an input-state p.p. for B. Thus for s=t(p) and x = y ( p ) we have
and hence the next state function a extended over partitions p and p on the sets S and C, respectively, is also a function into partition z. This extension deter-
mines the functionf: p x p + z which fulfills the condition (6.10). Q.E.D.
The above theorem may be formulated more generally for the sets {pi) and (pi]of partitions on the sets S and X, respectively. In such case the conditions (6.9) and (6.10) are understood with p=llipi and p=IIjp> The inequalities given in (6.9) are said to be the information flow inequalities in the automaton B. They play a fundamental role in structural theory of automata. Among other reasons, they allow to determine the structure of any state realization A of automaton B, and even the scheme of dependencies among components Ai in realization A, solely on the basis of the lattice of Mm partition pairs of automaton B. In the following part of the chapter, in Example 6.3 we shall show how the information about the structures of any state realizations of given automaton B can be extracted from the lattice of its Mm partition pairs.
6.4. Binary state assignment
We are now going to consider the state assignment problem in the case of two-state components. They are commonly used in digital technology projects, where the reduction of dependencies permits to reduce the cost of such projects. We shall assume at first the reaIizing components A i = ( S i , Xi, ai) to be of the delay type, which means that Xi = Si and (VSE S)[a,(s, 0 ) =GI. As it has been mentioned, the next states in such components Ai in a realization A of a given B are identical with the values of the excitation functions fi: S, X X -+ Ci of these components. We will present the algorithms for choosing the state assignment which leads to the minimal complexity of a realizing structure. Some other two state components will also be considered.
6. Realizations of automata
214 6.4.1. The binary coding with delay elements
At first let us focus our attention onto the information flow in an automaton B = (S, X , 3) which is realized with the assumed components.
Theorem 6.6. Let internal variables y,, y2, ..., y,, in a state behavior realization A of an automaton B are encoded according to the set K = (Q1, 6,,..., 8,) of partitions of the set S. The excitation function of the i-th component Ai, i E N = ( 1, 2, ..., n ) , is of the form:
if and only if
(ViE N)(3Ki = {ei1, O,, ._., eiai} c K ) [(xi,Oi) is a p.p. for B ] ,
(6.12)
where xi= Oil . Qi,. ... . Oi, and N = [ 1, 2, ..., n ) . Proof. The formal proof will be omitted; only a sketch of the proof will be given. (e) If for all i E (1, 2, ..., n ) the pairs of partitions (xi, Qi) are p.p. for B , then the states represented by Qi may be determined on the basis of x,-information (so may the excitation functions of all components Ai). Since this information is contained in subset K i c K , then it is available from the values of the variables yil, yi2, ..., yki, thus the excitation functions are of the form (6.11). (q) In this part the line of reasoning is analogous to the proof of the sufficient condition of Theorem 6.5. From the existence of function (6.11) it follows that the partition Qi is a function of partitions Oil, Q,,, ..., 0,;for fixed X E X , and therefore it is a function of xi. Hence (xi, Qi) is a p.p. for B for all i E (1, 2, ..., n). The subset Ki c K exists because (Vj E Ni)[Oj E Kil, where Ni = (il, i,, . . ., i a i ) . Q.E.D.
The condition (6.12) can also be expressed in the form: (ViG N)(~icN)[M(Qi)a-I;oj].
(6.13)
where j~ Ni.These are the flow information inequalities in the state behavior realization of B with states encoded according to partitions from a set K. Let us explain now, how for the given components (of delay type) and the coding K = (el,Q,, ..., 0,)it is possible to determine the structure of realization of an automaton B just from the lattice of its Mm partition pairs. For all i = 1, 2, ..., n the “position” of Oiin the lattice of Mm partition pairs must be found, which means that the greatest pair (xi, T~)such that z i l O i must be localized in the lattice. Therefore, the minimal predecessing information is found for Oi, since
6.4. Binary state assignment
215
for the localized pair (xi, zi) holds: M(Oi)= M(zi) = xi holds. Now if there exists a minimal subset Ki = {8,,, ei,,..., 0,d c K such that ei,.ei2. ... . O i k lxi, then the number of dependencies of the internal variable yi is given by ai = k. In this way without computing any excitation function it is possible to determine the structure (u,, u,, ..., k, ..., a,,) of a realization A for a given automaton B. The K fulfills difficulty in this approach is in finding the minimal subset K i ~ which the required inequality condition. The difficulties are even greater in the problem of finding a set K of coding partitions which minimizes the structure complexity, i.e.. the number c = a, + a,+ ... +a,. Example 6.3.
Let us consider again the automaton B given by its state diagram in Figure 6.5 and with the lattice of its Mm partition pairs in Figure 6.7. We are going to determine the structure of its state behavior realization A for a given coding set K = CSyl,e,, ey3), where 0 , , = [ l , 3, 5; 2, 4), Sy2=[1,3, 4; 2, 5), 0 y 3 = [ l ,2; 3 , 4 , 51. All partitions zi are known from Example 6.2; thus, it is easy to localize given partitions in the lattice f?om Figure 6.7. Their places are determined by: z, I eYl, z25 efland T~I eY3. One may easily verify that
-
q 2 eY20y3, a, 2 eYlefland as2 a,, - Oy3, and identify the minimal subsets Ki: Kyl ={Oyz, eY3}, K , = { O y l , Ofl) and Ky3= {eYl., eY3]. Hence the foreseen structure of realization A is (2, 2, 2) for given coding set K and the excitation functions are expected to be of the form:
6.4.2. Determining the state assignment which minimizes the structure complexity
It follows from the flow information inequalities that determining the value of yi in the next state code needs not less than M(Oi)-information about the current state of automaton B . Then b(M(Oi))Iaimust hold. Because of that b(M(Oi)) represents the minimal number of internal variables y which must be expected among arguments of the excitation function of the component Ai, of delay type, representing the states of the automaton B in the automaton A according to the partition €9;. For given Oi the number b(M(O,)) will be called the partition index of 0,. If for the set K of coding partitions with Oi there exists a subset Ki such that card(Ki)= b(M(Oi))and M(0,) 2 II@lj, where ej are from Ki, then for the partition
6. Realizations of uutomata
216 Oi we say that in the coding K its index is utilized.
We shall present now a formal definition of partition admissibility for coding. The notion is useful in determining minimal subsets Ki of two block partitions of possible candidates to compose a given partition xi. The problem was mentioned in the previous section. We will say that a given set of partitions (q,z, ..., z ~ )is admissible for coding the values of r binary internal variables by means of a coding set K = {el, Q,, .,,, €$) of two block partitions if for any i E (1, 2, ..., k) there exists a subset N i €( 1 , 2, ..., T ] of N such that each partition zi may be binary encoded, which means that T~2 I'IjO,, where j E Ni. Moreover, we require N ito be minimal, which means that no other subset exists having less elements and fulfilling the same conditions. Such a set of partitions will be referred to as an r-admissible set for coding. Let us recall some useful properties of partitions.
Lemma 6.3. Let z and n be arbitrary partitions of a set S such that ~ 2 n Then . the minimal numbers of two block partitions 8 of the set S such that
are: C, = b(z), C, = e(z) and C, = e(.r In). Proof. The proof is left to the reader as an exercise. Note only that the product of n distinct two block partitions of a set S forms a partition which has no more than 2" blocks. For a single partition x: its admissibility is given by r = e(n) + b(n). For a set K j = {el,O,, ..., Oj) of two block. partitions of S its admissibility is given by r = j + e(O), where 0 is the product of all partitions from Kj. In the algorithm which we are going to present the admissibility of a set of the form [Ql, O,, ..., Oj, M ( Q j ) ) will be evaluated using the following theorem.
Theorem 6.7. Let Kj= (el,Q,, ..., Q j ] be a set of two block partitions of a set S and let w be a partition of S such that card(V) > 2. Let K;.= KTju KKp where KTj= { OiE Kj I Oi2 W) and KKj= Kj \ KTj.
Let us denote the products of all partitions from the sets KTj and K . by .rj and ?LJ xi. respectively. Then the r-admissibility of the set K j = Kj u (yr] is given by r(KIj) =j
+ e(zjI W) + e(nj.yr).
(6.14)
6.4. Binary state assignment
217
Proof. The product of the empty set of partitions is assumed to be equal to 1,. If the set R j is admissible for coding the values of r binary variables by means of some set K of two block partitions of the set S, then K j r K . Let us assume then that in the set K there are still other partitions, say Qj+l, 6j+2, ..., 6,,..., 0,. Suppose they are ordered in such way that first k of them encode binary partition thus zj.63j+l....-Qk=yr,and the rest of them numbered from k + 1 up to r are needed to guarantee the unique coding for the set K, thus n j - w .Q,, ... .Q, =OF Now, on the basis of Lemma 6.3 and remarks preceding Theorem 6.7 we which leads to (6.14). can conclude that k -j = e(zj I and r - k = e(xj Q.E.D.
w,
-
- w),
w)
Theorem 6.7 will be used in completing the set K of coding partitions which may guarantee a state behavior realization of given automaton B with the minimal structure complexity. The completion of the desired set K will be performed in steps of choices beginning with j = 1 up to j = n = e(ls). In each step some partition Qwj is chosen and attached to the collection of partitions to form the set in order to satisfy the following from the previous step Kj = {Ow,, Q,, ..., eWj) criteria: - the uniquness of coding the set K,,= K, - utilization of indices of partitions Q,,, Q,, ..., QWj-,, - minimal n-admissibility of the set K ’ j = Kj u {M(OWj)). It must be emphasized at this point that only the minimum number n of coding variables is considered. If the set KIj is r-admissible, then the partition w=M(Qw> is the product of precisely b(v)two block partitions if and only if r = n . This means that for a number of coding variables greater than the minimum n the index of partition 0, may be unutilized. Thus if greater number of coding partitions is allowed, r > n, the computation of r-admissibility of any partition ni must take into account the number of partitions which are admitted to coding by assumption.
w.
Let us focus our attention on some property of partition Note that for a for which the following holds given there may exist such partitions
w
w’
A partition with the above property is called a refinement of a partition v. All partitions of this type must be considered carefully during the computation of r(rj). Note that attaching a refinement set M’(Oj) to Kj instead of the original one w = M ( O j ) may result in “transposition” of certain partition Qi from the set K$ to the set KtT As a consequence we have in general:
218
6. Realizations of automata
It means that the test for minimal, equal n, r-admissibility of given set K j is negative only if for all possible refinements M’(Oj) of M(Oj) it has been verified that r(Kju { M ’ ( O j ) } )> R. Algorithm 6.2. (Reduction of dependencies in a state behavior realization A of automaton B) Input: A complete automaton B = (S, X, a); n = e(ls), card@) = k. Output: A set K = K , of coding partitions for automaton B which leads to the minimal structural complexity of A. Step 1: Number the two-block partitions. In a two-block partition Q = (B,, B 1 ) the 0- and 1-block are distinguished, assuming always that s1 E B,. The number i of the partition Qi is obtained by interpreting the sequence ai(sl)ai(s2). ..ai(s&as its bhary representation. Step 2: Compute the generating partitions, i.e., partitions Oi with i = 1, 2, 4, 8, 16, .... Compute also all those two-block partitions which are n-admissible. Step 3: Form the partially encoded transition tables for automaton B to determine the row numbers for generating partitions. Step 4: Compute the row numbers for remaining partitions Qiby adding the row numbers of those generating partitions whose numbers in sum result in i. Step 5: Compute the indices of partitions Qi according to cardinality of the sets of their row numbers. Step 6: Determine the simplest, with respect to indices of partitions, realization structure ( a l , a,, ..., a,,). Step 7: Complete the set K = K , of coding partitions in such a way that in the sequence of steps of choices, for j = 1, 2, ..., n, any set of the form Kj = {@, Q,, ..., Owj]will satisfy:
and either r(Kj u {M(Owj)}) = n or r(Kj u {M’(Qw>}) = n for some refinement M’(OWj)of M(Owj). The partitions M(O,.) are computed in their full form only if they are needed in r-admishbility test. Step 8: If the set K = K , cannot be completed, then there does not exist any state realization A of a given B which has the assumed structure. In this case assume a new realization structure with the complexity increased by 1 and then execute Step 7. Note that Algorithm 6.2 always produces a solution since any automaton has the realization with the structure (PI, n, ..., n).
6.4. Binary state assignment
219
Example 6.4. Let us find state assignment reducing the dependencies in a realization of the automaton considered in the previous examples. The results obtained after the fist five steps of Algorithm 6.2 are shown in Table 6.3. Some partitions M ( e i ) which will be utilized are also included here. When executing Step 6 it is determined that the structures (1, 1, 1) and (1, 1, 2) are not realizable since no two partitions with indices 1 guarantee the unique assignment; e.g., for 6, and 6 1 3 we have b(6,. 013) + e ( 6 , . 0,J= 2 + 2 > n = 3. Let us start then with the structure (1, 2, 2). In order to complete a set K we shall follow Step 7 of Algorithm 6.2. For j = 1 let us choose 8,,= 0,. We calculate M(03 = 8 6 and r( (S,, 8 6 ) ) = 1 + e ( l S I 8 d + e ( 8 , . 8 ~ = 1 + e ( ( (2,l , 5; 3, 4)))+e((l, 2, 5; 3; 4 ) ) = 1 + 1 + 2 = 4 . It means that the first step of choice done for 6,, must be changed. Note also that the choice would be rejected later because of the index of partition 0,. Table 6.3. Calculating of indices of partitions 1
2
eifor Example 6.4 4 1
3
1
2
3
4
5
112
253
445
443
535
1 2 3 4 5 6
OOO OOO OOO OOO OOO OOO
OOO
001 110 111 OOO 001 110 111
OOO
7 8
010 OOO 010 001 011 001 011 100 110 100 110 101 111 101 111
101 000 101 010 111 010 111
I
9 10 11 12 13 14 15
001 001 001 001 001 001 001 001
OOO 001 110 111 OOO 001 110 111
110 110 001 001 111 111 000 OOO 110 110 001 001 111 111
5
21 3
OOO 101 OOO 101 010 111 010 111
(1,3;2;4;5) (1;2;3,4;5)
1
Let us start again with j = 1 taking Q,, = @13. We calculate M(OI3)= 0,. For the set K',= (el,, 0,) we test its r-admissability: r(K',) = 1 + e ( l s I 6,)+
220
6. Realizations of automata
e(O13 * 0 9 ) = 3. The second step of choice, for j = 2, must be Ow,= 0, (in order to utilize the index of the partition Old. We find M(8,)=(1, 3; 2; 4; 5 ) . The test for radmissibility of the set K‘,= (Q,,, e,, M(0 , ) ) gives r(K’;?)= 2 + e(@,I M(O,)) + e(O1,.M(O,))=2+e(((l, 3; 41; ( 2 ; 5 ] ] ) + e ( O S ) = 2 + 1+0=3=n. We are allowed then to pass to the third step of choice with j = 3. Typically the quotient partition (‘sjly) can be used to choose an appropriate Bi. Here ( [ l , 3; 4); (2; 511 suggests that only such partitions ei may be considered as candidates for 0,,which separate blocks (1, 3 ) from (4) and (2) from [ 5 ] . This condition is met only by 0, and el*The index of partition 0, equals 3, so it implies the structure (1, 2, 3). The only chance to obtain structure of realization ( 1 , 2, 2) is then to take Owl= el*We compute M(O,,)= (1; 2; 3, 4; 5 ) . The test for 3-admissibility of the set K ’ , = (@I,, O,, O,,, M(O,&) is negative, because r(K’,) =4. The choice done for Ow,= 0 1 3 must be rejected. Notice, that this conclusion could be derived also after searching for two-element subset (O,, Q q )c ( 0 1 3 , O,, el,)such that Op-8,IM(OlO)=(1; 2; 3, 4; 5 ) . No such subset exists. It can be easily verified that the structure of realization (1, 2, 2) cannot be obtained even if the first step of choice were OW,=Ol5. It means that the simplest possible structure which might be assumed, before Step 7 of Algorithm 6.2 starts, is (1, 2, 3) or (2, 2, 2). Both attempts lead to success. Starting with the structure (1, 2, 3) will result in K = (O,,, O,, O,,), while starting with (2, 2, 2 ) will lead to K = (0,, O,, el,).Both assignments have been already presented in Examples 6.1 and 6.3. Let us show now the role of a refinement in r-admissibility testing procedure. Consider the set K‘, = (O,, O,, M(O,)). We have r(K‘3 = 2 + e(O, I M ( 0 , ) ) + e( (1; 2; 3, 4; 5 ) )= 2 + 1+ 1 = 4. However, if the Same computation is repeated with the refinement M’(@,)=( 1 ; 2; 3, 4; 5 ) of partition M(O,)= ( 1 ; 2; 3, 4, 5 ) , we have r( { O,, @, M’(C3,))) = 2 + 463, e 0 , I M’(0,)) + e(( 1; 2; 3, 4; 5 ) )= 2 + 0 + 1 = 3. 6.4.3. Binary state assignment with arbitrary components
In Chapter 2 it was mentioned that in practical realizations of automata by means of digital circuits the current state buffer is very often composed not of delay elements but of some other automata, however usually they arc still twostate automata (flip-flops). In this case deriving the minimal information necessary to control some component must take into account not only the predecessing information M(0,)for a given coding partition 0, but the transition function a, of the component as well. We will denote this information for the component P by Mp(C3,). We will present now an algorithm for deriving the partitions Mp(O,) for automata from the set ( T , RS, J K ) which have transition functions shown in Table 6.4. In this algorithm one computes the maximal separation relation among
6.4. Binary state assignment
221
states which is understood for two states s, of some partition R.
t E
S as belonging to distinct blocks
Table 6.4. Transition tables of automata T, RS, JK aRS
aT
0 1
aJK
0
1100
01
1 0 / 0 0 01
10
11
0 1
1 0
1 1
0 0
1 1
1 0
0 1
0 1
0 0
Algorithm 6 3 . (Deriving the partitions Mp(@) for automata P ) Input: A complete automaton B = (S, C, a) and a two-block partition 8 of the set S. Output: The set of partitions M p ( 0 ) .
Step 1: Derive the auxiliary sets Sob(@; a , b e (0, I ) , such that S,b(O) = { S E S I s E BJO)A a(s, 0 )E Bb@)). Step 2: Determine the relation Rp(@)= {(p, q) E S2 I W p ) , where the condition W p is defined for component P as follows:
Step 3: Calculate the partitions M p ( 0 ) E MPQ = M#+l), where at the beginning we take:
and for the succeeding j = 0, 1, ...:
, the where T,, T ~ M E p 0 and T ~ ,E &Ip(-*). The symbol T ~ ,_ _ _denotes minimal partition of set S which covers the set of states declared in the subscript. Let (S, Ep) denote the complement graph of the relation R p ( 0 ) , thus
222
6. Realizations of automata
Note that in the last Step of Algorithm 6.3 the maximal partitions M p ( 0 ) covering the set MP(O) are derived. This can be interpreted as a decomposition of the graph (S, Ep) onto disjoint cliques (or complete subgraphs). Example 6.5.
Let there be given an automaton B = ( ( l , 2, 3, 4, 5 ) , ((3,. 0 2 ) ,a) with the transition function shown in Table 6.5. Suppose the component P E { T , RS, J K } represents the states of B in some realization A according to the partition 012= [ 1, 4, 5; 2, 3 ) . We will compute the minimal internal information which is necessary to control the component P in the automaton A . After the first Step of Algorithm 6.3 we have:
The relations RP(OIZ)which were obtained after the second Step are shown in Figure 6.8. Table 6.5. Automaton for Example 6.5
Fig. 6.8. The graphs of relation R,(O,J from Example 6.5
6.4. Binary state assignment
223
Execution of the Step 3 of Algorithm 6.3 results in: MT'O)=((l, 2; 3; 4; 5), (1, 4; 2; 3; 5), (1; 2, 4; 3;
5))=(7,,,,
q 4 ,
72,4)3
MRS'O'
= (71. 4 9 ?z,
M,,C0)=
(71, 29 21,
5
1,
39
71, 4 9 72, 4 9 72. 5 9 73, 4 7 73.5).
And then for j = 0:
And for j = 1: M,(2)=MT(1)=( ( 1, 2, 4; 3; 5]), M R p = M R p =((1, 4; 2, 5; 3 ) ) , MJk2)= (71, 2 4 + 7 3 , 71, 3, 4 -+ 72, 5 9
59
71, 2 + 73. 4, 71, 3 + 7 3 . 4 ) .
Since M,,(3)=MJK(2)=((1, 2, 4; 3, 5 ) , (1, 3, 4; 2, 5), (1, 2; 3, 4; 5 ) , (1, 3; 2, 4; 5)), the computations are finished. The result obtained means that for the chosen JK component the minimal internal information in a realization A which is necessary to control this component is not unique. For the components of other types (encoded by the partition e1d the minimal predecessing information is unique. 6.5. m-ary assignment
If the components of some realization have m states then the coding partitions are of the form (Bo, B,, ..., B,,,-l) and we are talking about multi-valued or mary assignments. Let us focus our attention on the number of possible ways of establishing such assignments. A method of choosing the state assignment which may lead to reduced dependencies, based on comparing complexities of structures derived for distinct encodings, must be rejected because of the number of state assignments which increases rapidly with the number of states. The following theorem describes precisely this relation.
ai),
Theorem 6.8. Let B = (S, X, a), where card(S) = k. Let automata Ai= (Si,Ci, for i = 1, 2, ..., n, be components of some realization A of automaton B, where
6. Realizations of automata
224
..., n))[card(Si)=mE N and n=]log,(k)[.
( V i e ( 1 , 2,
The number of distinct state assignments of B by means of A is d = (m")!/(m" - k)!n!(m!)".
Proof. The k states of automaton B may be assigned to m-ary n-tuples in d' = m". (mn- 1) .. . (m" - k + 1) = (m")!/(m" - k)! ways. If we reject all those assignments which differ only by permuting n internal variables then we have d' =d"ln!. However, the assignments which differ only by permuting the partial assignments ai lead to the same complexity of the structure of realization, hence they are not considered to be distinct. We have then d=d'l(m!)".
-
Q.E.D. For the automata with only 9 states with m = 3 (so with n = 2 ) the number of state assignments is d=20, 140. A better way of choosing the desired state assignment Seems to be an extension of Algorithm 6.2. onto m-ary case. To proceed with this idea we have to introduce the following concepts: the notion of r-admissibility of a set of partitions for coding, the numbers b(x) and e(n) and at last the generating partition. The set ( p l , p2, ..., p p ) of partitions of the set S is said to be admissible for assigning m values to the r internal variables yl, y2, ..., y, by means of a set H = [el,8,,..., 63,) of rn-block partitions of S (simply is r-admissible). if each partition pi may be obtained as the product of some number of partitions taken from H and the condition cannot be satisfied for any H such that card(H') < r. Let b,(x) = ]log,(card(lc))[ and e,(x) = llog,(~(x))[. The generating partitions are such that all the states from S except one belong to the block B,. This allows to use still the same rules of numbering partitions and of calculating row numbers for partial assignments. Now, we can utilize the test which is analogous to that given by formula (6.14):
Wj'1 =j +
I w>+
. w)
where again the refinement partitions of y~ must be taken into account. The formal details are omitted here, instead we shall show in the following example how to proceed in order to reduce dependencies among m-state components.
Example 6.6. Let B = ( S , X , a) be an automaton with the transition function shown in Table 6.6. We are going to find its state realization with three-state (ternary) components.
6.5. m-ary assignment
225
Table 6.6. Automaton B = ( S , X,
4
1
a) considered in Example 6.6
3
2
The upper part of Table 6.7 contains generating partitions. In the lower part there are row numbers calculated for all three-block partitions, because all of them are 2-admissible, i.e. satisfy the condition b3(Qi)+ e3(Qi) = 2 = n. The 4th column of Table 6.7 lists the indices of coding partitions and for those equal to 1 the appropriate predecessing partitions M ( 0 , ) are calculated.
Table 6.7. Computing the indices of three-state partitions for the automaton given in Table 6.6. 2
I
oi
Bo
B1
4
3 B2
1
@,I2 @0102 @0112 Q0120 o0121
Qom
5
1 2 3 4 421 142 321 123 b3(v) v = M(Oi) 100 000 010 200 000 020
010 OOO 001 020 000 002
000 100 010 OOO
000 001 010
200 210 210 010 110 210
020 021 021 001 011 021
100 010 110 210 210 210
001 010 011 012 012 012
000 020 020 020 020
2
The set H = (@0102, 00122) is 2-admissible for coding. It is easy to verify that the following inequalities hold: M(@OlOJ 2 @0122
and
M(Q0122) 2 QO,O,,
226
6. Realizations of automata
so assigning the states accordmg to partitions OoIo2and O,,,, will guarantee the structure of realization (1, 1) and the excitation functions (of three-state delay elements) of components of the form Y , =fi(x, yJ and Y, =f2(x, yl). Indeed, if the state assignment a: S -+ (0, 1, 212 is arranged according to Oo122and O,,o, in such a way that a(1)= (2, 2), a(2)= (0, 0), a(3)= (1, 2) and a(4)= (1, l), then the excitation functions are:
and
where: xy = Min(x, y), x mined in Table 6.8.
+ y = Max(x, y) and the one-argument functions are deter-
Table 6.8. Notation for function ( 0 , 1, 2 ) -+ (0, 1, 2)
6.6. Minimal control information for a component So far there are no known algorithms leading to the state assignment with reduced dependencies in general case of state realizations, i.e., in the case of various number of states of components and with nontrivial next state function block (not based on delay elements). It means that in the general case the structure of realization can be determined only after the set of components and the state assignment are chosen. However, before deciding to use an automaton Ai as a component in some realization of a given B it is possible to evaluate its usefulness in this role. To this end we introduce a notion of minimal control information for a component. By minimal control information for an automaton Ai representing the states of a given automaton B = (S, X, a), as determined by some partial assignment ai: S + Si,we understand the maximal partition T of the set S such that
6.6. Minimal control information for a component
227
The set of all maximal partitions z which satisfy the above condition will be denoted by MAi(nJ,where partition ni is induced in the set S by partial assignment q. Let for an arbitrary automaton B = (S, C, a) for u, v E S the following set will be defined: X u , . = { d E Cla(u,
o>=v).
This set will be referred to as the control conditions for the transition (u, v) of automaton B. Let us assume that for the transitions (u, v) and @, q) of automaton B holds Xu," n X P ,q#O. We will say in this case that the control conditions for these transitions are nonexcluding. The following theorem holds.
Theorem 6.9. Let an automaton Ai be a component in some state realization A of a given automaton B = (S, X, a) with a partial state assignment ai: S -+Si (according to partition xi). Then s = t(z) A T E MAi(ni) if and only if (vx E x>[Xa;(s).a;(a(s,
x))
nXa,(t),a ; ( ~ ( r , x))
+ 03.
Proof It follows directly from the definitions of minimal control information and of nonexcluding control conditions. Q.E.D.
The above theorem allows to derive the partitions from the set MAi(ni)for any given Ai and ai in similar way as it was presented in Lemma 6.1. Instead of the transition table of automaton B, partially encoded with ni it suffices to use such a table in which the next state symbols are replaced by control conditions Xaics),ai(a(s, The sequence of control conditions for the consecutive inputs from X plays the role of row numbers. Nonexcluding control conditions may be utilized in determining the partitions from MAi(ni), like in Algorithm 6.3, by decomposing the graph of nonexcludeness relation onto disjoint cliques. Exercises
6.1. The excitation function Yi =f,(yl, y,, ..., y,,, x ) of an i-th two-state component is said to be monotonic with respect to internal variables yl, y2, ..., y,,, if it can be represented in the disjunctive expression which contains any internal variable only in one form, either in affirmative or in negative one. (Cl, C, ..., C,) of the set S separates S, i.e., let (V(s, t ) Let the cover E S x S)(3CiE [(s E CJ A (t E CJl. A binary state assignment K = [O,, O,, ..., 6,)is said to be consistent with the cover w if 6,= {Ci IS \ C i ) and i -+ei# ej for i, j E ( 1, 2. ..., k). Prove that if a state assignment for S
w= w)
228
6 . Realizations of automata
is consistent with a cover which separates S, then the excitation functions for components in an isomorphic realization are monotonic with respect to internal variables (Mago [ll). 6.2. Determine the number of two-block partitions of a set S which satisfy the condition of n-admissibility as a function of card(S). These partitions are completed during Step 2 of Algorithm 6.2.
6.3. Let an automaton B = (S, X , 8) be encoded by some automaton A with twostate components Ai of delay type ( i [~1, 2, ..., k), k=card(S)) in such way that a: S -+ S1 x S, x ... x S, is determined by a(sJ = (1, 0, 0, ..., O), a(sd= (0, 1, 0, ..., 0), ..., a(sk)=(O, 0, ..., 1). Determine the relation between the graph of the structure of state realization A of automaton B and the transition graph of B. 6.4. Let ( I , be the characteristic group of an automaton B = (S, X, &). Let A = ( I , X , a,) be such an automaton that 8,(~,x ) = s [XI holds for all s E I and X E X . Prove (see Hartmanis, Steams [ll) that if B is strongly connected, then A is its homomorphic realization. a )
-
Bibliographic note
The field of the realization of automata is very extensive. In this chapter we have omitted a number of problems belonging to this field, emphasizing the flow of information in automata as well as its role in choosing the state assignment. Our presentation have been restricted to the state assignment problem based on determining such state encoding function that will minimize the complexity of the structure of realization. The first definitions of realization have been introduced by Hartmanis and Steams [l]. The connections between distinct notions of realization were presented after Herman [2]. The rules of the algorithm for the reduction of dependencies have been taken from Weiner and Smith [l]. Further extensions onto multi-state components of delay type and some two-state components were presented on the basis of papers of McDonald, Singh and Philokyprou and others. Extensive presentation of state assignment problem, some detailed results and bibliography can be find in Haring, Siwak [4] and also in Dervisoglu, Novansky and Leake.
7. Realizations of automata. Structures of nets
The previous chapter contains discussion of selection methods of state assignment for a given automaton B which would result in a state realization A with the minimal structure complexity, i.e., a realization A with components A , i E N = ( 1, 2, ..., n) that for its structure (al, a2, ..., a,,) the number c = al + u2 + ... + a, has a minimal value. The structure complexity (determined by the number c) and thus the complexity of the excitation functions is one of two parameters determining the cost of the realizing automaton. The second parameter is the structure of component aulomata. In this chapter the discussion will be focused on the structures of component automata and will utilize an analysis of the graph of the structure G = ( N , E). Note for example that the case when more than one excitation function depends on the same set Q of internal variables does not affect the value of c. However, it may be valuable for giving the possibility to use a typical component automaton to represent variables from Q in realization A . This means that we shall be interested in those realizations whose dependency graphs satisfy some given conditions. In the fist part of the chapter we present the state realizations of complete automata, without outputs, which have the form of a loop-free net of component automata. Such nets or more precisely some subsets of the set of components in these realizations are uniquely related to SP-partitions of the state set of the realized automaton. Two particular cases of loop-free realizations, namely serial and parallel decompositions are presented. Further, state realization of a given automaton B with a preassumed automaton C is discussed, where C indicates the only realizing component. The necessary conditions are derived for realizability of a given automaton B in the case when automaton C is a shift register. The presented algorithm makes use of inequalities of the information flow in the realized automaton.
In subchapter 7.4 we present state realizations of automata by means of nets of components which do not cooperate synchronously. In order to describe them, some generalization of an SP-partition of automaton has been introduced. This generalization is called a T-valid partition with respect to A, where T is a subset of the state set of A. Then a cellular structure of nets of automata is considered and the problem of the existence of nonreachable states in such nets, which is known as GOE configuration problem of cellular automata is presented. It is shown how this
7. Realizations of automata
230
problem may be reduced by verifying the existence of nongenerable words for certain simulator of a given structure. At the end of the chapter we present some resmctions on realizations of nets of automata. The restrictions occur as a consequence of feedback (permutation size) in a realized automaton. This problem is presented for the case of homomorphic realization of automata.
7.1. Loop-free realization
Let P denote a set of automata Ai = ( S , Xi, 9), where ie { 1, 2, .. ., n } = N . Let A = S (, X , zA) be an automaton such that S, = S, x S, x ... X S, and 6,(~, x) = 6,.&(~,, $2’ ..., s,), x ) = (6,(sl, fl(s, x)), 6,(sZ, f2(s, x ) ) , ..., 6(,s, f,(s, XI), where the functions are of the form S, X X 4 Xi. Automaton A is said to be a net of automata Ai. In the previous chapter we have already considered state realizations in the form of some nets of components with functions fi determining the connections and referred to as excitation functions. Let A = (S,, X , )6, be a state realization of a given automaton B = (SB, X, )6, with a state assignment a: S, 4 S,. Then, by zi we denote the partitions of the set S, such that s = t(zi) holds for (sl. s2, ..., s,) = a($)and (t,, t2, ..., t,J=a(t) if and only if si=ti for i = l , 2, ..., n.
si* I
CL Fig. 7.1. Component
4 of a synchronous net of automata
In Figure 7.1 the position of a component Ai in a net of automata is shown. Notice that several interpretations of the net’s component is possible. Automaton Ai may be treated as a component and in this caSe its inputs are computed by the function f;. on the basis of input x and states of some components Ail, A,,, ..., Aial As a component of the net the delay type automaton D i = ( S i , Zi, SD.) may
23 1
7.1. Loop-free realization
be interpreted, being such that Xi’ = Si and ( V o i E Xi’)(VsiE Si)[GDi(si,oi’)= oi’l and in this case its inputs oi’ are computed just like next states of automaton Ai. At last as a net’s Component one may choose certain automaton Ci = (Si, xi x X , &,) with input alphabet xi x X , where xi = zil zi, ... ziai. The signal CL shown in Figure 7.1 determines (simultaneously for all components) the moments of discrete time changes, i.e. the moments of switching from an interval t of time to the next interval t + 1. We say that the components cooperate synchronously. In this what follows the third interpretation of the notion of component from those shown in Figure 7.1 will be in use. For two components Ai and Aj of a net A we say that Ai is a predecessing component of Aj if the states of Ai are used directly as inputs to A? Let Q be a subset of the set P of all components from a net A. We will say that Q is closed in the network A if it contains all predecessors of components from Q. Let Q’ G P. Then the smallest subset Q closed in the network A and such that Q’ G Q will be called the closure of Q’ and denoted by cl(Q’). For a single component Ai we shall write cl(Ai) instead of cl((Ai]). A network A with a set of Components P will be called loop-free if in the set P does not contain a pair of distinct components Ai and Aj such that A i e cl(Aj) and Aj‘ cl(Ai). If a loop-free network A is a state realization of an automaton B , then it will be called a loop-free state realization of automaton B or simply a loop-free decomposition of B. The partitions zi are those encoding set S,. Let A be a decomposition of an automaton B with a set of components P. Let us denote by cp a function given by
- -
for any subset Q of P. There is a correspondence between the closed subsets of components in the network and SP-partitions of the state set of automaton B. Lemma 7.1. Let network A with a set of components P be a state realization of automaton B. Then, for subsets Q, Q, and Q, of P the following hold: (a)if Q is closed in A, then q(0) is an SP-partition, @)if Qi G Qz then ( ~ ( Q i )(P(QJ, 2 (c)(P(Q~ u Q3= (P(QJ. HQJ-
Proof. We will give only an outline of the proof. Note that for (a) since the set Q is closed in A, then (p(Q)IM(cp(Q)) which means that ((p(Q), (p(Q)) is a p.p. for automaton B or that (p(Q) has SP for B . The proofs of part (b) and (c) follow from comparison of sets of subscripts of components from Q. Q1 and Q, and of associated products of encoding partitions. Q.E.D.
7. Realizations of automata
232
In order to state the converse of Lemma 7.1 it is necessary to consider a redundancy in some realizations. A set K of partitions of S, is said to be irredundant if for any subset K i c K and for each Z E K
for some partition T~ from the set Ki.
Theorem 7.1. If automaton B has a loop-free decomposition in the form of a network A with components [Ai) such that cp is an injection over closed sets, then the set of partitions (cp(cl(A,))) is irredundant. Proof. Suppose that (cp(cl(A,))) is redundant. Then the following two cases are possible: (1)For dlstinct j and k cp(cl(Aj)) = cp(cl(Ad holds. However, since A is loop-free, then cl(Aj) # cl(Ad, and thus function cp is not an injection. (2)Some subset K c {zi) and a- partition z = cp(cl(A,)) violate the condition (7.1). Thus T 2 I - l (T’IT’ E K ) implies (‘cP(Cl(Aj))
E K)[c~(cl(A& 2 (cl(Aj))I.
Hence A,e Q,, where Q, = u cl(Aj) over K , therefore the closed sets Q1 and Q2 = Q, u cl(A& are distinct. We will show that cp(Ql) = ( ~ ( 4 2holds. ) From the assumption q(cl(A&)2 nK(p(cl(Aj)) = (p(Ql) after multiplying both sides by cp(Ql), and taking into consideration condition (c) of Lemma 7.1, we obtain: (p(Q2)2cp(Ql). Because Q 2 z Q l , thus by condition (b) of Lemma 7.1 we have: cp(Q2) 5 (p(Ql). In consequence cp(Ql) = (p(Q2) holds and the function cp is not an injection. Q.E.D.
Theorem 7.2. Let K = [xl, x2, ..., x,) be a irredundant set of SP-partitions of the state set of an automaton B = ( S B , X , aB) which fulfills the condition of uniqueness of assignment. Then there exist a loop-free network A of components A , , A,, ..., A,, such that (a) A is a state realization of automaton B , (b) A, E cl(Aj) e xi 2 nj, (c) cP(Cl(Ai)) = xi, (d) cp is an injection over closed sets of components. Proof. Let us create the partition
7.1. Loop-free realization
233
where 1, is the product of the empty set of partitions. Let for any J = 1, 2, ..., n, zj denotes an arbitrary partition such that z j - x / ’ ) = x p Since xj is an SPpartition, then m ( z j . x p ) ) 5 x j I z p This means that if the partial assignment aj is defined as aj: S,+zi. then there are functions fi and Sj which satisfy the condition (Vs E S,)(VXE X)[Gj(aj(s), fi(Bi(s), x ) ) = ~ . ( G , ( s , x ) ) ] . Therefore the above construction leads to automata Aj = (T~,x i > j x X , Gj) and satisfies the conditions (a), (b) and (c). In order to show that the last condition is satisfied, suppose (p(Ql) = (p(Q2) for some distinct closed subsets Q, and Q2 of components. Let ALE Q2 and A,e Q,. Let K = (xi IAj‘ Q,). By (7.1) there exists Ai E Q, such that xkk2?rp In consequence A k cl(Ai) ~ and also A k e Q, since cl(Ai) cQ,,which contradicts our assumption. Q.E.D. The above theorems show that. there is a one-to-one relationship between irredundant sets of SP-partitions of the set S, and all loop-free decompositions of the automaton B = (S,, X, S,). To illustrate this relationship let us consider the following example. Example 7.1.
An automaton B = ( ( l , 2, 3, 4, 5 , 6 ) , ( x , , x z } , S), is defined by Table 7.1. All SP-partitions of its state set are shown in Table 7.2, and Figure 7.2 shows the lattice of these SP-partitions. Table 7.1. Automaton B from Example 7.1
Using this lattice one can easily determine irredundant sets of SP-partitions forming unique assignments. Note, that some sets like [q,x2, x3), [x2,x3. x4) and [x4, x,, n6) are not irredundant, but all the sets [x4, x 5 ) , ( x 3 , T ) , (q,. xs) and (x4, x5, x 8 ) are irredundant and, moreover the products of these partitions equal 0.,
234
7. Realizations of automata
Table 7.2. SP-partitions of automaton from the Example 7.1
no =OsB= (1; 2; 3; 4; 5; 6) n1 = ( 1; 2, 6; 3; 4; 5 ) n2 = ( 1; 2; 3; 4, 5; 6) n3 = (1; 2, 5; 3; 4, 6) n, = ( 1 , 3; 2, 5; 4, 6) n5 = ( 1 , 4, 5; 2, 3, 6) n6 = (1; 2, 4, 5, 6; 3) q = 11; 2, 6; 3; 4, 5) ng = ( 1 , 3; 2, 4, 5 , 6) ng = lSB = (1, 2, 3, 4, 5 , 6) Consider now three loop-free decompositions of the automaton B: - decomposition I according to the set (n4,n5), - decomposition I1 according to the set [no,nS),
decomposition I11 according to the set [n4,n5,ng]. By condition (b) of Theorem 7.2 we may interpret the relation 2 between partitions of the set K as diagram of a cascade connection among components: “Aiis a predecessor of A;. Such diagrams are shown for all three decompositions in the Figure 7.3. They are drawn without a formal definition as portions of the lattice of SP-partitions of automaton B , with addition of inputs X . -
Fig. 7.2. Lattice of SP-partitions of the automaton B considered in Example 7.1
235
7.1. Loop-free realization
A
X
'
--4
X
Fig. 7.3. Diagrams of decompositions I , II and III of automaton B introduced in Example 7.1 In order to complete decompositions we select the assignments and determine the components according to the proof of Theorem 7.2. For decomposition I there are two components A, and A, which represent the states from S, according to partitions z, =x, and 2, =x,. We have cl(A,) = {A,], cl(A,) = {A,) and also cp(cl(A,)) = x, and cp(cl(A,)) = n,. The components A, and A, are determined from the quotient automata BIZ, and BIx,. In the decomposition II there are two closed sets of components (A,] and (A,, A,] associated with the partitions cp(cl(A,)) = x8 and cp(cl(Ak)) = cp({A,, AJ) = x,,. As the coding partitions we choose 78 = z, and z, being arbitrary partition such that z,-xo(>)=n0, where xg(,)=x,. The components are: A, is the quotient automaton B/x8 and A, = (za, K, x X , 53. The transition diagram of automaton A, is shown in Table 7.3 with z,= (1, 2; 3, 5; 4; 6 ) and the blocks of partition xg denoted by c = ( 1 , 3) and d= (2, 4, 5, 6 ) . The transition function
5,: z, x xgx X +z, is constructed as follows:
if B@o)nB@8)= s # 0. The function 6, is not determined otherwise. In the decomposition 111 we associate with partitions x,, "8 and x, the closures of components A,, A, and A,, and the Sets (A,], (A,), and (A,, Ab). The state assignment is chosen according to partitions (z,, 78, zb], where zS=x5, z8=x, and z, is an arbitrary partition of the set S, such that zb.x4=x4. Since for the set (n,, x,, IT,)we have n,(>)=x,, then we may choose zb= (1, 3, 2, 5; 4, 6) = (u,v). The components A, and A, are derived as the quotient automata BIn, and B h , , and the component A, = (Tb, x8 x X , 6), is determined by the transition diagram shown in Table 7.3.
236
7. Realizations of automata
Tuble 7.3. Transition diagrams of automata A, and A, from decompositions II and 111
7.2. Serial and parallel decompositions of automata
The SP-partitions of automata can be utilized to derive such realizations that some components in the realizing network operate independently from others. In the Example 7.1 for automaton B in decomposition I the two components A, and A, cooperate independently from each other. They work in parallel, realizing given automaton B. In decomposition I1 a serial connection of A , and A , has been achieved. Only the component A , is independent. In such cases we say that there are a tail automaton (like A,) and a front automaton (like A,) in a network. The serial or parallel decompositions are some particular cases of loop-free decompositions. We shall recall here the definitions and the conditions of existence for such classical decompositions, but the details of the proofs will be skipped. We focus our attention on the nontrivial decompositions of a given automaton B , namely decompositions with all component having less states than automaton B.
For two automata A , = (S,, C,, 6,) and A, = (S,, C,, 6.J where C,= S, xC, the serial connection of A , and A , is an automaton A = (S, xS,, C,, 6) such that
In the case of an automaton A with outputs, its output function is given by h: S, XS,XC,
+a.
We say that an automaton B has.a serial decomposition with front automaton
7.2. Serial and parallel decompositions
237
A , and some tail automaton A, if the serial connection of A , and A, is a state realization of given B .
Theorem 73. An automaton B = (S, C, 6,) has a nontrivial serial decomposition if and only if there exists a nontrivial partition n of the set S which is an SPpartition for automaton B. Proof. Only a sketch of the proof will be given. First, note that the front automaton of a decomposition is determined by the quotient automaton Bln, and the tail automaton A,= (7, X X X , &) by any partition which fulfills z.n:=O,. The transition function 8+ z x n x X - + z is such that
The partitions (n, 2) are coding partitions. On the other hand, if A is a state realization with components A , and A,, where B is encoded by an injection a: S +S, x S , , then for a(s)= (s,, sJ and a(t)= ( t , , tJ the condition s = t(n) w s, = t , determines an SP-partition of S for the automaton B. Q.E.D.
By the parallel connection of automata A , = (Sl, C,, 6,, R,, p,) and A, = (S,, A , and A, is also used) we mean the automaton A = A , x A, = ( S , x S,, C, x q,6, Q, x Q,, p) such that
&, S,, R,, j.33(the term ‘simple product’ of
and
for any s,
E
S,,s,
E
S,,
0, E
C, and
0, E
C,.
We say that an automaton B has a parallel decomposition with components A , and A , if A , x A , is a state realization of automaton B .
Theorem 7.4. An automaton B = (S, X, 6 ) has a nontrivial parallel decomposition if and only if there exist two nontrivial SP-partitions IT, and R;! of the set S for which X , n, = 0,. Proof. (*) Follows immediately from Lemma 7.1 and Theorem 7.1. (e)If X , . ~ , = O , , then neither X , 5 % nor x 2 5 n , , hence a nontrivial decomposition follows from Theorem 7.2. Q.E.D.
238
7. Realizations of uulomata
Example 7.2. Suppose an automaton B =(.YE, C,, 6,) is given as presented in Table 7.4, with S, = (1, 2, ..., 16) and C, = (0, 1)3. The state realization using ROM type memory implementation of transition function, as shown in Figure 7.4, requires, for automata with 16 states and 8 inputs - the ROM capacity of 27 words of 4 bits each. Note however that the automaton B has a parallel decomposition based on SP-partitions:
n1= (1, 6, 12, 16; 2, 3, 5 , 8; 4, 7, 9, 14; 10, 11, 13, 15) = ( E ; F ; G; H ) , n2= (1, 8, 13, 14; 2, 6, 7, 15; 3, 4, 11, 12; 5, 9, 10, 16) = (J; K ; L ; M ) . Thus the automaton B can be realized by means of automata A , and A, which are shown in Table 7.5. If we have decided to realize them using ROM type memory for their transition function blocks, then we need only two ROMs each of capacity 24 two-bit words. Thus, the realization with a parallel decomposition requires 64 bits of ROM capacity, which is the reduction by one order comparing with the realization shown in Figure 7.4. Table 7.4. Automaton B realized in Emmple 7.2
I i
1
SB ~
000
001
011
010
5 12 6 6 1 3 12 16 1 8 2 2 5 16 3 8
9 11 15 6 13 4 12 10 1 8 2 7 5 16 3 14
7 11 15 6 13 4 12 15 1 8 2 7 2 6 3 14
2 12
~~
110
111
101
100
1
14 10 15 6 10 9 16 13 16 9 7 7 14 1 9 9
4 11
12 3
I
1 2
l
34
‘
5 6 7 8 9 10 11 12 13 14 15 16
I
I
1
6
5 2
6 1 3 12 6 1 8 2 2 2 6 3 8
6 5 16 16 8 16 9 7 6 14 1 9 16
10
5
16
16 3 12 12 3 12 4 9 16 4 12 4 12
11
4 12 11 12 4 9 9 4 12 4 4
239
7.2. Serial and parallel decompositions
Table 7.5. Components of state realization of the automaton B associated with its SP-partitions xl and x2
64 (x,, x3)
SAI
E F G H
&A2 (x1, X J
SA2
00
01
11
10
F E E F
G H E F
G H E G
E F E G
J K L M
00
01
11
10
M L K J
K L K J
J M K M
L L M L
I
I
XI I I I
I I
728 x 4
127
__..
1
State
buffer (Delay fype automaton) I
JY4
I
Fig. 7.4. State realization of the automaton ROM of capacity 512 bits applied
Yl
Y2
93
I
B (introduced in Example 7.2) with
230
7. Realizations of automata
7.3. Realization with a shqt register A binary n-stage shift register is an automaton R = ( ( O , l),, (0, l ) , 6), that for any state (yl, y 2 , ..., y,J from (0, 1)" and any input z E (0, 1)
such
Hence the formulae for the next state function are of the form:
The number n indicates the length of register. Let A = (S, C, 6) be an automaton such that
hold for some shift register R,, where f, is the excitation function of this register. Suppose that A is a state realization of a given automaton B . The structure of the realization of such B is of the form (1, 1, ..., a,J, where a , l n . The automaton B will be said to have a state realization with shift register. Dctermining whether a given automaton B has a realization with shift register can be achieved using the definition of realization. Note that in the case when automaton B = (S, X , 6,) has a state realization A = ((0, l}", X , 6,) with a shift register R, the assignment a: S, -+ (0, l}" induces the bijection h: Q' -+SB from a subset Q' of states of register R, onto the set S, such that for any transition t = 6,(s, x ) in automaton t3 there exists a corresponding transition a([)= 6,(a(s), z) in R, for some Z E C,. Considering the non-labelled transition graphs G, = (S, E,) and G, = ((0, l}", E,) of automata B nad R,, the above mentioned bijection h implies an isomorphism of some subgraph GI,= (Q, E,') of G, with the graph G,. Let us emphasize that the isomorphism between non-labelled graphs is considered here. Since the relation holds for arbitrary automata we may express it in a more general form. Theorem 7.5. An automaton B has a state realization with an automaton C if and only if there exists an isomorphism of some subgraph G,' of the non-labelled transition graph of automaton C onto the non-labelled transition graph G, of automaton B . Proof. The proof follows directly from the definition and remarks preceding Theorem 7.5. Q.E.D.
241
7.3. Realization with a shift register
From theorem 7.5 follows that the state realizations of given automaton B with shift register may be derived by means of graph algorithms which determine isomorphic embedding of non-labelled directed graphs. A method which we are going to present is based on the flow information inequalities of a given automaton B. The main difficulty in verification of realizability of an automaton A with a shift register is caused by the fact that the length n of the register of potential realization is not known. For a given automaton B the number n may be assessed. Usually, the cycles of transition graph of automaton B are checked for that purpose. The isomorphism of graphs GR,' and GB requires the preservation of lengths of all cycles of automaton B in register R,. Note, however, that the number of cycles with a given length q is restricted in the graphs GR, and moreover, cannot be increased by enlarging the length of the register, It has been proved by Harring [l]that the maximal number p of multiple cycles of the same length q equals to the number of irreducible polynomials mod 2 of power q. In Table 7.6 there some values of the function p ( q ) are shown. Additionally the register R , contains always all cycles of the length q = n + 1.
Table 7.6. Marimal numbers p of cycles of length q in shift registers R,,
1
q l l
2
3
4
5
6
2
1
2
3
6
9 1 8 3 0 5 6 9 9
p
7
8
9 1 0
Let us quote Jump, Marathe [l] to show some other restriction on the length of the register R , based on the length of cyc!es in automaton B realized with R,.
Theorem 7.6. Let an automaton B have a realization with a shift register R , and let state S E SB belongs to two distinct cycles of lengths i and j . Then there holds
n < i +j
- GCD(i,j ) .
Proof. The proof based on the following fact is omitted: if two binary sequences used for coding the states from cycles of periods i and j are identical on at least i +j - GCD(i, 5) positions, then they are identical on all positions. Q.E.D. We now present an algorithm for determining a state realization A with some shift register for a given automaton B, if only such realization exists. This algorithm follows from comparison of an information about the states of realization A with an information which may be derived from some partitions of the set S,.
242
7. Realizations of automata
Let z=m*(n) denote the minimal partition which together with given partition x forms an input independent partition pair (IT,z) of a given automaton B = (SB, X, ~ 3 ~This ) . is such a pair that for all inputs x E X all the functions f, of the form n -+z are identical. Let z1 =m*(Os) and let zi+l = m*(Ti) for i = 1, 2, ..., r. Deriving the consecutive partitions zi results in enlarging of z1 up to such z, that T , + ~ =z,. Let us assume that the number r is the smallest number fulfilling the condition. We shall also assume that card(X) 2 2 and that
To all internal state variables yl, y2,
..., y,
of a state realization A = (SA, X , el,O,, ...,
5,) of automaton B with register R, we assign two block partitions 0,in such a way that
holds for Oi= {Bo('l, B , ( ' l ) , where z E (0, 1 ) is the value of variable yi; i = 1 , 2, ..., n. Let us present now some relations between partitions z,, z2, ..., z, and partitions O,,02,..., 0,.
Theorem 7.7. Let an automaton B have a state realization A with a shift register R, and a coding set K = (el,O,, ..., 0,). Then for the partitions zi of the set S, we have: ~
,
.
z
~
=
O
~ for~ i = A l ,~2, ~...,- n -~1 . ~
~
~
(7.4)
Proof. The partition T~ =m'(O,) represents the information which may be obtained about the next state of automaton B when the input is not specified. In this case the value of y, cannot be determined, But z1 0, determines the state uniquely, thus '5, 0, = 0, and z1 = 0, 0,. ... . Then we have then a,,-,27,. From the properties of operator m'(p) it follows that
-
3
But Y,-2 = y,-, so the pair (en-,,@,-Jis such a p.p. for automaton B that m*(@,-,) = 0,,-2 We have 2 z2. It can be shown analogously that the relation holds for the consecutive partitions up to 0,Z T,-~. Q.E.D.
7.3. Realization with a shiji register
243
Corollary 7.1. The length of a shift register R , which may be used in a state realization of an automaton B =(S,, X , 6,) does not exceed r. where r is the smallest natural number such that T,+~ =z,. Proof. Suppose that n > r which means that @,2 2, In the case of z, = 1, the partition €9, would not be a coding partition. Let us assume then that z,=z,+, Il,. But the pair (zr, z), is an input-independent partition pair for automaton B , thus if 0,= z, then Y , = y1 which is not possible in automaton R,. If 0, >z,, then we have M(@,) > M(z,) > T, which means that @,>z, and further 0,>2,, ..., Qn>z,. Hence 0, ... @,2z, or 0 , 2 ~ ~holds but it is in a contradiction with condition (7.3). We conclude that n Ir. a@,-
-
Q.E.D. Theorem 7.8. Let an automaton B has a realization A with a shift register R , with a coding set K = [el,Q,, ..., 0,). Then for the partitions zi of set S, we have:
for i = 1, 2,
..., n -
1.
-
Proof. Since z1 5 0, 0,. ... On-,, then from comparison of predecessing information for the partition zi it follows that M ( q ) S @, 0, ... . @ ., Then we have 8,-M(z,)=O,. Note that the operator M(p) preserves the relation 2 hence from the condition (7.4) we obtain M(@,-;) 2 M ( z i ) . But for a realization with the shift register M(@,-;) = Qn+l-i, thus 0,+,_;2M(zi) for i = 1, 2, ..., n - 1. Q.E.D.
- -
Theorems 7.7. and 7.8 determine the necessary conditions for the first and the last coding partitions in a state realization of an automaton B with a shift register:
and
-
@,2 M(zl) and 0, z1 = 0,.
We shall utilize them in the algorithm for determining the coding partitions. Let us consider now relations between consecutive coding partition pairs. For automaton B , for i = 1, 2, ..., n - 1 we have: m*(Oi+,)I Oi and
@i+l
= M(Oi).
244
7. Realizations of automata
This means that it may be more efficient to start with 0, instead of 0,. This was assumed in the algorithm. At fist the set of all two-block partitions, which fulfills the necessary conditions of state realizability of automaton B with register R, and which may play the role of first O,,is determined. Later on, the right partition 0,is chosen and the remaining partitions 0,, ..., 0, are derived. Algorithm 7.1. (Determining the state realization of a complete automaton B with a shift register). Input. A complete automaton B = (S, X , 6). 0utput.The state assignment of B leading to its state realization A with a shift register R,. Step 1: Determine partition 2, = m'(0,) on the state set of automaton B and then all the partitions z, = m'(2,) for i = 1, 2, ..., r, taking as r the smallest i such that T , , ~ =z,. Step 2: Determine partitions M(2,) for i = 1, 2, ..., r - 1. If either e(zl) > 1 or e(M(z,))> 1, then the realization for given B does not exist. Step 3: Determine possible lengths for registers with respect to the inequalities: ]log,card(S)[ I nI r. Start with the smallest possible r. Step 4: Determine set (0) of two-block partitions of the set S which fulfills the conditions: 0 2 z,-, 0 M(zl) = 0, and e( 0)5 n - 1. Step 5: Choose the next partition from the set ( 0 ) to play the role of 0,. For J = 2 , 3 , ..., n compute the partitions 0, =M(O,-,) checking the condition (7.5) and also checking if e ( 0 , 0,. ... I n - j . If any of the conditions is not satisfied, then repeat Step 5 of Algorithm 7.1; in the case when all partihons were chosen, increment n by 1 if it is allowed by inequality from Step 3 and continue the computations from Step 4. If number n cannot be incremented then we conclude that the given automaton B has no state realization wilh a shift register. Step 6: Basing on the derived set K = (el,O,, ..., 0,) establish the statc assignment a: S+ (0, l},. First choose a,(s) = z arbitrarily from (0, I ) , deciding that B(")(s)=B,(")(s). This implies the assignment of valucs of remaining variables y,-,, Y,-~, ..., y1 to the blocks of partitions On-,, On-2, ..., 0,; namely for i = 1, 2, ..., n - 1 it must be a,-,(b(s, x ) ) = a,-,+,@)for any X E X . 3
-
e 0 , )
Example 7.3.
In order to illustrate Algorithm 7.1, let us look for a state realization with a shift register of the automaton B = ((1, 2, 3, 4, 5, 6, 7), ( x , . x 2 ) , 6) which is described in Figure 7.5.
245
7.3. Realization with a shift register
After the computations of Step 1 we have: z1=m*(OS)= (1; 2; 3; 4, 5; 6; 7 ) ~ , = m * ( z ~ )[=1; 2; 3; 4, 5 , 6; 7) and ~ , = m ’ ( z J = (1; 2; 3; 4, 5 , 6, 7 ) .
n
Fig. 7.5. Automaton B to be realized with a shift register
Since z, = z, thus we have r = 3. Then, after Step 2 we obtain: M(T,)= [ 1; 2, 3; 4, 7 ; 5; 6 )
A
M ( T J = (1; 2, 3; 4, 5, 7 ; 6)
We have n = 3 and [0)=((1,2, 7; 3, 4, 5, 61, 11, 3, 7 ; 2, 4, 5 , 6 ) ) . Let us choose 0,= ( 1, 2, 7; 3, 4, 5, 6 ) . For j = 2 we compute that 0, = M ( 0 , ) = [ l , 6; 2, 3, 4, 5 , 7 ) . The condition (7.5) is satisfied, since 0 , 2 M ( z J . However, e ( 0 , .0J = e( [ 1; 2, 7 ; 3, 4, 5; 6 ) ) = 2 which exceeds n - j = 3 - 2 = 1. We stop the computations here and again execute Step 5 with another partition 0,. Then, let 0,= (1, 3, 7 ; 2, 4, 5 , 6). We have M ( 0 , ) = (1, 4, 5 , 7; 2, 3, 6) = 0,. The conditions 0,2 M(TJ and e ( 0 , 0J = e( ( 1, 7 ; 2, 6; 3; 4, 5 ) )I 1 are fulfilled. Thus we continue computations for j = 3, which results in 0, = M ( @ J = (1, 2, 3, 5; 4, 6, 7). Since 0, 2M(zl) and 0, 0, 0, = 0, hold therefore we conclude that the set K = O,, 0,)is the desired set of assigning partitions.
- -
Table 7.7. Coding a: S + (0, 1 ) 3 for state realization of the automaton from Figure 7.5 with a shift register
a
S (0,
113
1
2
3
4
5
6
7
101
011
111
ooo
001
010
100
Let us determine now the state assignment a: S+ (0, l),. For the partition 0, we choose arbitrarily B J 3 ) = (4, 6, 7) and B , ( 3 ) = ( 1 , 2, 3, 5 ) . The successors of states from block B,(3) belong to the block (1, 4, 5 , 7) of the partition O,, thus
246
7. Realizations of automata
we have to fix B J 2 ) = (1, 4, 5, 7 ) and B , ( 2 ) = ( 2 , 3, 6 ) . Verify, e.g., for x1 E X and 4 E BJ3) that q ( a( 4 , x,)) = a,(4) holds. Similarly we have to fix BJ1) = (2, 4, 5, 6 ) and B,(’)= { 1, 3, 7 ) . The derived state assignment is shown in Table 7.7. It is easy to verify that Y , = y,, Y, = y 3 and Y, y2, y,, x). We have obtained the realization with register R, of the structure (1, 1, 3).
=ml,
7.4. Asynchronous cooperation of components
State realizations of automata considered up to this point were viewed as some nets of component-automata cooperating in synchronous manner. It means that the changes of states are executed simultaneously for all components and triggered by clock pulses provided to all nodes of realizing network. In Figure 7.1 the clock pulse signals are labelled by CL and are fed directly to each component Ai. The distribution of external signal x depends on the states of components i,, i,, ..., i,, which determine the input oi of component Ai.Note however, that formally it is possible to change the roles of signals CL and x. Then each component is fed directly by external input x of the net but the operating time of each component, i.e. its individual clock pulse CL,, depends on the state of components from the set Ni. This situation is shown in Figure 7.6. It is clear that in such a network all components are cooperating asynchronously.
Fig. 7.6. Synchronous and asynchronous cooperation of component automata in a network
Let us now introduce the formal definition of an asynchronous net. Suppose there are given automata Ai= (Si,X , 3,) and a function f: S -+ Po(N), where S = S, x S2x...xS, and i E N = ( l , 2, ..., n). By an asynchronous network of automata Ai we shall mean an automaton A = (S, X , such that for (sl, s2, ..., s,,) and (t,, f2, ..., f,J E S and X E X the equality d,((s,, s2. ..., s,J, x ) = ( t i , f2, ..., t,,) implies
a,>
7.4. Asynchronous cooperation of components
247
(7.6)
The function f determines then the asynchronism of components in the network A. It can be also described by means of the n-tuple of functions g,: S x (CL, -CL) + (CLi, -CLi) such that
gi(s, CL) = CL,
@
i E f(s).
(7.7)
The symbols CL and -CL denote the Occurrence or nonoccurrence of a clock pulse changing the current instant of discrete time. The functions gi play an analogous role to the role played by the excitation functionsfi in synchronous net. They determine how the occurrence-of clock pulses for component Ai depends on the states of its neighbors Ni = {il, i,, ..., i a i ) .
X
si
___I
Fig, 7.7. Node of the asynchronous network
If an asynchronous network A of component automata Ai is a state realization of some automaton B , then we will say that B has an f-decomposition, where function f determines the asynchronism of components Ai in network A . An f decomposition will be denoted by (f, { A i ) ) . For a single node of a network A, i.e., for a component Ai together with its function gi which determines its operation rhythm, we shall use the symbol shown in Figure 7.7. To describe the cooperation of loop-free realizations in synchronous networks we used SP-partitions (n) and components were derived as the quotient automata B/n of realized automaton B . To describe the cooperation of components in
248
7. Realizations of automata
asynchronous network we shall use some generalization of the notion of an SPpartition. A partition n of a set S is said to be T-valid with an automaton B = (S, C, where T z S , if the following conditions are fulfilled:
a),
Evidently any SP-partition of an automaton B is T-valid with B for some T c S (e.g., for T = Q ) ) but , not in reverse. For an automaton B = (S, C, a) and a partition n = (C(n)) of the set S which is T-valid with B for some T c S , let us introduce a (T, &image of automaton B to be an automaton BI(T, n)=(n, C, a,J with a transition function a,: n x C - + n such that a,(C,(n), o)=C2(x) if only a((C,(n)\T), o ) ~ C , ( x ) .In the case of C , ( X ) c Tand C,(R)\T=O the function is not determined for such blocks Cl(x). Now, the conditions of state realizability of an automaton B in the form of an asynchronous network of components Ai will be given.
a,
Theorem 7.9. An automaton B = (S,, X , a,) has an f-decomposition if and only if there exists an n-tuple of partitions n of the set S, which are Ti-valid with B for certain Ti c S such that x, .n2. ... . n,, = OsB. Proof. (a) Let network A = (f, { A , ] ) be a state realization of an automaton B with a state assignment a: S,-+S, x S 2 x ... xS,. We show that the partitions ni of the set S, which are induced by partial assignments are T,-valid with automaton B. For a(s)= (sl. st, .. ., s,,) and a(!)= ( t l , t2, ..., t,,) let s = t(ni) si = ti. Since the function a is injective, then n1 an2. ... .n, = 0,. And now, let sets Ti be defined as follows:
-
Ti = {s E S, I i E f(a(s))).
Hence, if s E Ti, then the condition (7.6) implies (7.8). If for s, t 8. Ti s = t(ni) holds, then ai(si, x ) = d,(ti, x ) for any X E X and thus d(s, x ) x)(ni). This coincides with the second condition of Ti-validity, i.e., (7.9). (-) Let us assume the automata Ai = (Si, X , 3;) = B/(Ti, xi) for i = 1, 2, ..., n. Let the state assignment a: S, -+ S, x S, x ...x S, be such that
=a((,
Since S’ +P,(N)
7c1
-
. n2 ... K, = O,, the assignment is injective. Assume the function f: to be such that i E f ( ( s l , s2, ..., s,,)) if S E T,, where S’ = a(S,). Now it 1
7.4. Asynchronous cooperation of components
249
can be easily verified that the automaton A = K, { A , ) ) is a state realization of the given automaton B . Q.E.D. From the proof of Theorem 7.9. we can easily derive the methods of analysis and synthesis of an automaton with an f-decomposition.
Algorithm 7.2. (Deriving the asynchronous network realizing an automaton). Input. A complete automaton B = (S,, X, a),. Output. A state realization (f, { A , ) ) of the automaton B . Step 1: Compute the partitions xj of the set S, which are Ti-valid with B for some subsets Ti c S ., Step 2: Determine the set ( x i } of partitions which are Ti-valid with B , i = 1, 2, ..., n, and fulfill the condition x1- x 2 .... .x,= 0., Choose it as a state assignment for B , where a: S, -+S is induced by S = n1x x 2 x ... xx,. Step 3: Take the (Ti, xi)-images of automaton B to be the components A, of the desired realization of B . Step 4: Determine the asynchronism of components A, in network (f, {A,)), i.e., a function f: S -+ P,(N) such that i E f(cc(s)) w s E Ti. Step 5: Determine the functions gi of components to evaluate the obtained scheme of dependencies G = ( N , 0, where the set N , = {il, i2, .. ., iai} is implied by partitions zi = (Ti; S, \ T i ) and conditions T i 2 xi1* xi2 * .. . . ?ria,. When searching for the partitions of the state set which are T,-valid with an (, 4, where the automaton it is convenient to use its non-directed graph GB, = S set of edges J is composed of all pairs (s, t ) E S, x S, such that s or c are from T. Any transition (i.e., the pair (s, x ) E S,xX) in an automaton B which starts from state s is either said to be allowed with respect to T, if s E T or it is said to be not allowed, if S E T. Now we can define a partition p of the set S, to be implied by the classes of connectivity of the graph G,, T' We have then the following relation.
Lemma 7.2. A partition x of the set S, of an automaton B=(S,, X , 3,) is Tvalid with B for some T c S , if and only if ? r S p holds and the blocks of partition x are preserved by all transitions which are allowed in B with respect to T. Proof. The conditions (7.8) and (7.9) follow immediately from the definition of partition p. Q.E.D.
7. Realizations of automata
250
Example 7.4. Let an automaton B = ( ( l , 2, 3, 4, 5 ) , ( x , x}, 3,) be given as described in Table 7.8. From several partitions of the set S, which are T-valid with B let us choose the following:
They satisfy the condition of the uniqueness of coding. If we denote the blocks of partitions by symbols 0 and 1 then we have the assignment a: S, + (0, 1)3 shown in Table 7.9. The states of components A i =( ( 0 , l ) , ( x , x}, for i E (1, 2, 3) = N are represented by the values of variables yi. Note also the subsets Niof N .
ai)
Table 7.8. Transition table of the automaton from the Example 7.4
1
B '
X
i
12
1 '
3 4
1 1 2 4
5
3
t
a,
5i.
3
4 3 5 5
Table 7.9. State assignment and function f of a realization (f, maton from Example 7.4
(4))of
the auto-
7.4. Asynchronous cooperation of components
25 1
The asynchronism of a realizing network, i.e., the function f, is shown in Table 7.9. Functions gi gating individual clock pulses of components (compare Step 5 of Algorithm 7.2) are shown in the form of a diagram in Figure 7.8. According to this diagram the scheme of dependencies in the network is presented in Figure 7.9. The components Ai are presented in Table 7.10. Table 7.10. Components A,, A, and A,
9={7,4/
t
t
Fig. 7.8. Diagram of dependencies for gating functions gi Next, we will show a method for deriving the T-valid partitions for a given automaton in the case of two-state components.
Theorem 7.10. Let O = (Co, C,) be a two-block partition of the state set of an automaton B = (S, X, a). Let S p ’ = {s E C, I a(s, x ) E C,] for x E X and p E (0, 11. Let U, denotes the sum of all sets SxPP over p from (0, 1) for given x , and let L, denotes the sum of all those sets SXW over p from (0, 1) for which S,!’P#C, holds. Then the partition 0 is T-valid with automaton B if and only if
U = nxeXUx2 T 2 v
Lo = L.
Proof. (d)If the partition 0 is T-valid with automaton B, then the conditions (7.8) and (7.9) are fulfilled. The set U (upper) contains all states from the set S
252
7. Realizations of automata
which fulfill condition (7.8), hence T c U . Since the whole blocks C, of the partition 0 are not included in the sets Lx, so for each state s from L there exist such t E S and X E X that s = t(0) and simultaneously s=a(s, x ) #fact, x)(O). It means that s E L 3 s E T , hence L c T.
x -
9 L
CL
Fig. 7.9. Asynchronous network which realizes the automaton B from Example 7.4 (*) The set U contains only those states of automaton B which fulfill the condition (7.8). The set L (lower), contains all those states which cannot be excluded from the set T because of condition (7.9). Therefore, if L c U , then T is the set of validity of partition 0 with automaton B. Q.E.D.
Example 7.5.
For an automaton B = ( ( l , 2, 3 , 4, 5 ) , ( x . j}, 3,) described in Table 7.11, we show computations necessary to derive the sets of validity with B for certain twoblock partitions. We choose the following:
The computations for these partitions are presented in Table 7.12. The fourth chosen partition is an SP-partition and one of its possible sets of validity with automaton B is T = 0 .
7.4. Asynchronous cooperation of components
253
Table 7.11. Transition table of automaton B
1 2 3 4 5
3 4
5 2
5
1 2 4 4 3
Table 7.12. Computation of sets of validity for some partitions 0
Next, we will present a state realization of a given automaton B by means of an asynchronous network such with.a front automaton A, controlling the flow of input sequence and allowing the input letters to be used by precisely one from the remaining components A,, A,, ..., A,,. It means that at each moment of discrete time only two components in the network are allowed to change their states. Let A, = (x, X , a,, N, A) be an automaton with outputs, where N = ( 1 , 2, ..., n ) and 3L: x + N . Let automata Ai = (Si,X , a,) where i E N , be given. Let A = (S, X , a) be such an automaton that S = K x S, x S, x ... x S, and for each transition
ti = sj
holds for all j E N but ti = di(si,x ) a h(C("))= i.
The components A,, i E N , are said to cooperate with time sharing under the control of the automaton A,. If the automaton A is a state realization of an automaton B , then we shall say that B has a realization with controlled time sharing of Components. Theorem 7.11. An automaton B = (S, X , a,) has a realization with time sharing of components A,, A,, ..., A, under the control of some automaton A, if and only
7. Realizations of automata
254 if there exist partitions conditions hold:
(a) (b) (c)
(d)
IT, 2,
xl, x2, ..., IT,, of the set S, such that the following
n is an SP-partition for automaton B , {Cl, c,, ... CJ >IT, xi is a partition Ti-valid with B for i = 1, 2, ..., n, where Ti = S, \ Ci, X: * ~ 2... * -IT,,= 0,.
'5=
I
Proof. Only a sketch of the proof is given here. Note that the desired front automaton A, may be obtained by attaching the outputs to the quotient automaton B/IT. The conditions (c) and (b) determine the existence of remaining components and the uniqueness of state assignment. The existence of the partition z is associated with the output function X: x +N in such a way that C(") E C?) @ X(O%))=i. For each state 0") of the automaton A, C @ ) n T i = 8 holds, hence only the component Ai may change its state, which means that A;, i E N , cooperate with time sharing. Q.E.D. Algorithm 7 3 . (Determining a realization with time sharing of components of a given automaton). Input. A complete automaton B = (S,, X, a,). 0utput.A realization of automaton B in the form of a network with time sharing of components. Step 1: Determine the set (xj] of all SP-partitions of the automaton B and choose the quotient automaton A,,' = B/n for some IT E {xi). Step 2: Choose the output function h: n+N of automaton A,'. Note that a partition LIT is such that for z X: z + N is one-to-one. Step 3: Complete the sets Ti= ( S E S,IX(C(")(s))#i) for i= 1, 2, ..., n. Step 4: Determine the smallest partitions zi which are Ti-valid for automaton B. Step 5: Check the condition IT .zl z2. ... .q,=0,. If it cannot be satisfied for any output function h (in Step 2) and for any quotient automaton (according to X E (xi]chosen in Step l), then the given automaton D is not realizable in the desired form of network. Step 6: Minimize the number of states of components. It may be done for i = 1, 2, ..., n by enlarging the partitions zi to such xi that they are the SPpartitions for automata BI(T,, xi) and that the condition IT . x1 n,. ... .IT,,= O,, is still preserved. The components Ai are determined by Ai = B/(Ti, x,). The above realizing network allows the decomposition of the input sequences, hence it may be applied in devices oriented on analyzing sequences (e.g., words
7.4. Asynchronous cooperation of components
255
from X'). We shall illustrate how to use the method sketched as Algorithm 7.3, applying it to an automaton extrapolating binary input sequences. Example 7.6. Let us determine a realization of an automaton B given in Figure 7.10 in the form of a network with time sharing of components. The automaton B is shown here together with its outputs which may be used to evaluate the effectiveness of an extrapolation of any input sequence (note that at each state the automaton generates an output symbol which it expects to be chosen as input one). From the set (xi)of SP-partitions of the given automaton B let us choose 'IC=(Bo,
B1, B,, B3) = (1, 2, 8, 10; 3, 6, 11, 15; 0, 4, 9, 12; 5, 7, 13, 14).
We have A,' = Blx. In Step 2 let us choose n =4, N = (1, 2, 3, 4) and the output function for A,' given by I ( B j - l )= i, i E N . The sets Ti are as follows: T I = (0, 3, 4, T2= (0, 1, 2, T 3 = ( l , 2, 3, T4= (0, 1, 2,
5, 4, 5, 3,
6, 7, 5, 7, 6, 7, 4, 6,
9, 11, 12, 13, 14, 15), 8, 9, 10, 12, 13, 14), 8, 10, 11, 13, 14, 151, 8, 9, 10,. 11, 12, 15).
In Step 4 of Algorithm 7.3 we start by identifying the transitions of the automaton B which are not allowed with respect to sets Ti.Then based on the connectivity classes of graphs GB, T~we determine (by Lemma 7.2) the partitions: pl=(O, 1, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15; 2; 8 ) , p2=(0, 1, 3, 4, 15; 5, 6, 7, 8, 9, 10, 11, 12, 13, 141, p 3 = ( 0 , 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15; 7; 13), p4=(0, 11, 12, 13, 14, 15; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10).
The transitions of automaton B which are allowed with respect to sets Tiwhen combined with partitions pi lead to partitions '5i which are Ti-valid with B and such that T~2 pi. This way we have obtained: 21 =
(0, 1, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15; 2, 8 ) ,
72 = PZ?
7 3 = ( 0 , 1,
2, 3, 4. 5, 6, 8, 9, 10, 11, 12, 14, 15; 7, 13),
74 = P4.
The partitions K , T ~ ,T ~ ,T~ and 74 guarantee the uniqueness of state assignment, and this condition cannot be fulfilled by any enlargement of zj. We have
256
7. Realizations of automata
x,= T ~ ,x2= T ~ ,n3=z3 and x4=z4. Finally, the components are: Ai = B/(Ti, ni) for i = 1, 2, 3, 4 and A, = (n, X , aBh, [ 1, 2, 3, 4 ) , X). Let us note that in the realization we have obtained the front automaton A, is state isomorphic to the shift register with two delay elements.
\
Fig.7.10. Automaton B extrapolating binary input sequences
7.5. Problem of a predecessor in cellular structure
257
7 5 . Problem of a predecessor in cellular structure
Let us consider a net of components which cooperate synchronously according to a special form of a graph of dependencies called cellular structure or cellular net. All the components of such a net are identical and usually called the cells of the net. A cell k = (S, S P , a,) is an automaton such that a,: SP +S. A cellular net CN is defined as a 4-tuple ( K , q, S, a,), where K is a set of cells, q: K + K p is a function determining the p-tuple of neighborhood, S is a finite set of states containing a distinguished quiescent state so such that axso, so, ..., so)=so, and a,: SP -+S is a function called the local transition function of the net. If q(k) = (kl, &, ..., kp), then the cell ki is said to be the i-th neighbor of the cell k, where i = 1, 2, ..., p . The number p is called the neighborhood index of the net CN. The set of all'neighbors of a cell k will be denoted by Q(k) and of a set Q of cells - by T(Q). The graph of the structure of a cellular net will be denoted by G,-- = ( K , I), where an edge (ki,k) E I leading to the cell k is labeled by i. In cellular nets in order to determine their global state the notion of a configuration of a net is used. It is defined as a function f K + S which specifies the states of all cells in the net CN at moment t. The set of all configurations of a net CN will be denoted by SK. Note, that we do not restrict our considerations to finite sets K . The kernel of a configuration f E SK is a set supp(n = {k E K If ( k ) #so). If the kernel of a configuration is finite then all the cells but finite number rest in quiescent state; such configuration of a net will be called a configuration with a finite support. The state of neighboring cells for a cell k in a configuration f will be determined by the function h: S K x K - + S P such that h(f, k) = (f(ql(k)), f(q2(k)), ..., f(Tp))). With each cellular network CN=(K, q, S, a,) we associate a global function a,: SK +SK such that a,y)(k) = a,(h(f, k)) for all k E K . According to the formal definition from Section 7.1, a cellular network is an automaton. It can be determined for a given cellular net CN as A,-N = (SK, {a}, a,). A net CN forms an autonomous automaton. Note that no configuration with a finite support can be transformed onto an infinite one under the global transition function. If two configurations f, g E SK are related by d,(g) =f, then f is said to be the successing configuration of g, and g is said to be the predecessing configuration off. We will denote this fact by g E Let Q c K . The restriction of a configuration f to the set Q will be denoted by f i e . A restriction of a configuration f to a finite subset Q of K will be called a finite configuration, and the set Q - the array of that finite configuration. The array of a finite configuration f we will denote by D O , and the set of all finite
258
7. Realizations of automata
configurations - by R. If the mays of two finite configurations f and g are isomorphic as the subgraphs of G, then we write f ( D v ) ) = g ( D ( g ) ) if and only if they have the same states in all pairs of corresponding vertices. The cellular nets are also characterized by the dimension m, where it is assumed that K = Z m , and the cells can be represented by m-tuples of integers determining their position in the space 2”. In the case of a linear net (m = 1) a finite configuration f such that D v ) = klb..kj will be denoted by y =s,s 2...si, where y is from $ = S x S x ... xS and f(k,) = sl, f ( Q = s2, ..., f(k,) = sj. For the cellular networks of higher dimensions we shall use a similar notation; if DV) = C,C ,... Cj, holds for a finite configuration f, where C,, C,, ..., Cj are some subsets of K , then f will be denoted by f(C,) f(CJ.. Acj). Let Q be a finite subset of the set K. Then f G Q denotes that either suppv) L Q if f € SK or D v ) c Q if f s R. Let us introduce the relation < in the set R u SK. For any two elements f and g from R u S K we shall write f < g , which means that f IsupPo = g I mpp(n holds for f from S, and f = g I holds for f from R. I f f < g, then we say that the configuration g (being either from R or from SK) is an extension of configuration f and f is a (finite) subconfiguration of (finite) configuration g. Let us now define certain configurations without predecessors or so called GOE (Garden of Eden) configurations. For a cellular net CN with a global function as we define GOE(CN) = If€ SKI a8-l(f) = 0)
(7.10)
which will be referred to as the set of GOE configurations. Let for some cellular net CN a function agR:R -+ R be such that a,&) =f e >f and q ( D v ) ) c D ( g ) holds for any g E R and let exists no configuration f > f such that q ( D ( f ) )c D ( g ) . Note that a R(g) =f implies a&’) I =f for any g’ > g. For such ‘restricted’ global function ,$, we can define the set
a&)
For the net CN it will be called the set of restricted GOE configurations (RGOE configurations). Example 7.7.
In order to illustrate the introduced notions let us consider the cellular net C N = ( P , qM, (0, I ) , al(Con))introduced by Conway. It is a two-dimensional net. Each of its cells is a two-stale automaton k = (S, S p , 1 3 ~ ( ~with ~ ~ quiescent )) state 0 and excitation state 1. Each cell has p = 9 of neighbors k , , k,, ..., k , in the net
259
7.5. Problem of a predecessor in cellular structure
(they are all its predecessors in the net), and the next state of each cell depends which is on the number x of excited neighbors according to the function shown in the form of state diagram of a cell in Figure 7.11. In the net CN a Moore neighborhood is assumed, which is determined by
al(con)
or, if the spatial locations of cells in
ZZ are employed, by
x =3
dl (con) Fig. 7.11. Local function and neighborhood in Conway’s cellular net
9’= 91Q
Fig. 7.12. Configurations g and f of Conway’s cellular net; a,(g)=f
7. Realizations of automata
260
In Figure 7.12 two configurations g and f are shown such that a&) = f . Note that cells being in quiescent state are left empty (theirs symbols 0 are not drawn). In this what follows the problem of looking for the GOE configurations of a cellular net will be presented. First, let us consider how the GOE and RGOE configurations are related to each other. Theorem 7.12. For a cellular net CN with the sets RGOE(CN) and GOE(CN) we have
f E RGOE(CN) 3 f E GOE(CN), where the configuration f is an extension of the configuration J with a finite support. Proof. Let ag be the global function of net CN. If the configuration f with a finite support is such that f 4 GOE(CN) then agR-’(f)#0, where ’j =f I supPo. The we can above follows from the fact that for an arbitrary configuration g E
Q.E.D.
The property expressed in Theorem 7.12 will be employed in looking for the GOE configurations. Note also that the converse of the property is not true; indeed, if f e GOE(CN) then nothing can be said about the existence of a finite subconfiguration f off in the set RGOE(CN). Let us mention that for the set VGOE(CN) of GOE configurations with a finite support we have GOE(CN) c VGOE(CN),
(7.12)
where VGOE(CN)= If. Vla,&)=0], V denotes the set of configurations with a finite support and apv is a restriction of ag to the set V . It follows from (7.12) that there are configurations which do not have the predecessors in the set V with respect to ag but have these predecessors in the set SK. A cellular net CN=(K, q, S, a,) is said to be uniformly partitionable by a partition n = (..., Ci, ...). if there exists a sequence of ordered isomorphic subgraphs GCN(‘Iof the graph G, such that to each p’-tuple of consecutive arrays from x, say (Ci+l, Ci+2,..., Ci+p,)rone can assign correspondence the array Cj from some partition z = ( ..., Cj, ...), such that Q
where p is the net’s index of neighborhood. In fact we consider here not the
7.5.Problem of a predecessor in cellular structure
26 1
partitions of the whole set K , K and T are partitions of some tapes with a fixed width, which spread along the graph G , We treat configurations g(x) and AT) as words from tapes x and T , respectively. It is clear that if for global function of a cellular net holds a,(g) =f, then agR(g)(T)=f(7). Let a cellular network CN be uniformly partitionable with some tapes K and T . Let us construct for CN the Mealy automaton A(CN) = (T,C,a, R,B) such that T = {g(Ci+l,Ci+2,..., Ci+ps-l) I g E SKI and C= (g(Ci+p,) I g E SKI
for all blocks of the partition x = (..., Ci, ...). The transition function 2: T x C + T is such that
The output set a=MCj) If e SK) for all blocks of the partition T = (..., Ci,...). The output function B: T x C + R is determined by
where g” is a configuration which coincides with configuration g on the array Ci+lu Ci+2u ... u Ci+p,-land with configuration g’ on the array Ci+ps. For a given cellular net CN an automaton A(CN) will be called a simulator of CN. Lemma 7.3. Any simulator A(CN) of a cellular net CN, which is uniformly partitionable with some tapes x and T , transforms the words from tape x onto the words from tape T according to the global function of net.
asR
Proof. We have T = CP’-’, thus any simulator A(CN) realizes a mapping Tc*+a*. It follows from the construction of A(CN) that this mapping is identical to a, when restricted to the words of arbitrary finite length from tape x , and that it determines the words from tape T . Q.E.D.
We shall treat the simulator A(CN) of a cellular net CN as a generating device. Let
This is the set of all words generable by A(CN). For a simulator A(CN) let us construct the Rabin-Scott automaton B(CN)= (Po(T), R, a,, T , P(7)) with the set R as its input alphabet and with transition function 3,: Po(T)x R + P , ( T ) such that for T‘L T and W E R we have:
262
7. Realizations of automata
The automaton B(CN) is said to be the acceptor of the simulator A(CN).
Theorem 7.13. Let CN be a uniformly partitionable cellular net with some tapes n and z. Let B(CN) be the acceptor of the simulator A(CN). Then we have: y E RGOE(CN) w y E R \ L(B(CN)). Proof. (a) The automaton B(CN) accepts all words from the set W(A(CN)) and only such words; thus L(B(CN)) = W(A(CN)). Therefore if the word y from the tape z is not generable by the simulator A(CN), then it has no predecessor on the tape n, thus d g R - * ( y ) = 8 . (3) Any word y from a tape 2 of the given net CN which is a restricted GOE configuration is not generable by sirnulator A(CN) which reads such input tape x that z is its output tape. This means that the word y is out of the language WWN)). Q.E.D.
Example 7.8. Let us consider again the Conway’s cellular net CN in order to derive a configuration from set RGOE and (by Theorem 7.12) also from set GOE. The net CN is uniformly partitionable. Let us assume partition n to form the tape of width 1 = 3 and partition z to be from tape of width 1 = 1. The blocks Ci of partition n are shown in Figure 7.13 (a). The configuration f is chosen here in such a way thatf(C1, C,, C, C4, C,, C, C,, ...)=( 7, 4, 0, 6, 4, 0, 3, ...). where f(Ci) are specified by octal numbers. The simulator A(CN) starts from the state (7, 4). When reading the word x = 06403 it generates the word y = 01111 from tape z. In Figure 7.13 (b) the state diagram is shown together with output symbols as labels of transitions. The input symbols are omitted. Acceptor B(CN) of the simulator A(CN) is presented in Figure 7.14, where its state sets are given as follows:
75. Problem of a predecessor in cellular structure
a)
263
b)
+
Fig.7.13. Configuration (7, 4, 0, 6, 4, 0, 3, ...) on the tape of width 1= 3
0
7
Fig. 7.14.Automaton B(CN) for Conway's cellular net; 1 = 1
From the initial state To only these six states are reachable. Since all are final, the automaton B(CN) is equivalent to a one-state automaton which accepts any word from tape 7;indeed L(B(CN))=C2*. It is worth to mention that the first restricted GOE configuration (of length 117) has been found (Hardouin-Duparc in 1974) only on the tape of width 1=6. And it is not known if any configurations from RGOE(CN) are contained in a narrower tape.
264
7. Realizations of automata
With the above shown constructions some problems from investigating GOE configurations of given cellular net CN may be reduced to analyzing appropriate properties of language L(B(CN)). This language reflects certain properties of a cellular net, like e.g. isotrophism of local function.
Theorem 7.14. Let CN be a uniformly partitionable cellular net. Then the language of the acceptor B(CN) of simulator of a net CN is closed under suffix. Proof. Let A(CN) = (T, C, 3, Q, l3) and let B(CN) = (P,(T), Q, a,, T , F). Suppose wy E L(B(CN)), where w E Q and y E a*.Thus, we have a,(T, wy) E F . It follows from (7.12) that (3E q @ B ( f , wy) E Fl. However &(t, wy) = &(&(t, w), y); so by a,(f, w) E T we conclude that y E L(B(CN)). Q.E.D.
We will close this chapter with brief illustration of certain relations among GOE configurations. Example 7.9.
Let CN= (2, q, ( 0 , 1I , a,) be a cellular net, where q(i) = ( i - 1 , i, i + 1) for any i E 2; and neighborhood index p = 3 . The graph G , together with the simulator A(CN)= (T, C, 0, 13) which operates on input tape x = (..., i, i+ 1, ...) are shown in Figure 7.15.
a,
Fig. 7.15. Cellular net from Example 7.8 and its automaton A(CN)
7.5. Problem of a predecessor in cellular structure
265
The acceptor B(CN)=(P,(T), a, a, T , P(T)) is shown in Figure 7.16. Let us recall that the only nonfinal state is 0. Note that y = 0...01010...0 E VGOE(CN) but y e GOE(CN) (compare (7.12)). We also have (0+ 1)*(101)3(0+1)' E GOE(CN) but this implies neither 101 E RGOE(CN) nor ( E RGOE(CN).
Fig.7.16.Automaton B(CN) from Example 7.8.
7.6. Realizations with the minimum amount of feedback
In the following section we shall consider the homomorphic realizations of a given automaton B , emphasizing the problem of the amount of feedback. This amount has its minimum for any given automaton B , which at feast must be expected in any realization of B.
7. Realizations of automata
266
We shall call the automaton B to be feedback free if its current state is a function of only the k last inputs of automaton B . The automaton which is not feedback free will be said to have a feedback. Suppose now that a loop free network A with the components P is a realization of a given automaton B. Let in the set P of components the automata A , , A,, ..., Ap are all those automata which have feedback. Then by the amount of feedback in realization A of a given automaton B is defined as a number F , = card(&) card(S2). ... * card(Sp).
Let Fs denote the number of states in the greatest possible subset of states S,, which may be transformed onto itself by any nonempty input sequence. Then the number FB is called the permutation size of automaton B . Let B = (S, C, be an automaton. For an arbitrary cover y of the set S, by m(y) we will denote such a cover that
a)
a(&
where S’ = S \ C). It is clear that which the given cover y is mapped us use the notion m(S) in the case of the information about the next state m(ls). We also have m(ls) 2 m(S).
m(y) is a irredundant cover of set S onto under the set of functions u,io E C). Let y = [ S ] . Note that the cover m(S) describes of automaton B , similarly to the partition
Theorem 7.15. If the reduced automaton B = ( S , X, d) has its permutation size equal to FB, then there exists a homomorphic realization of automaton B with the amount of feedback equal to F,. Proof. Let us consider the sequence m(S), m2(S)= rn(rn(S)), ... of covers for the set of states of automaton B. It follows from (7.15) that the sequence of inequalities m(S)2 m2(S)2 ... holds. Then there exists the smallest integer k E M such that mk+*(S)= mk(S)= cp. From the definitions of the cover cp and the permutation size of automata we obtain that ~(cp)=F,. If it were mk(S)=Os, then B would be a feedback free automaton. Let us choose for the cover cp such an automaton A,,, = ( X , d,,) that d,,,(B(’@,x ) = d(B(@, x). But we have m(cp)=cp=O,, thus A,,, is a feedback free automaton. On the other hand the cover cp of set S forms the partition of the state set S’ of some automaton B’ such that B ’ ~ ,=, B . Automaton B is an image of the B’ under some state-input homomorphism (h, id); h: S’ -+S. For such automaton B’ the partition cp is an SP-partition. Thus, by Theorem 7.3, A,,, is the front automaton of some serial decomposition of automaton B’. It is also the front automaton in some homomorphic realization of B .
7.6. Realizations with the minimum feedback
267
Now suppose A,= (7, c p x X , a,) to be the tail automaton in this realization, where z is such a partition of S that 7 .cp = 0,. Then we have card@)= ~ ( c p )= FB which is the amount of feedback in A , This means that the realization of B with component automata A , and A , is a homomorphic realization of B with the amount of feedback equal to FB. Q.E.D. From the above Theorem one can derive a method for determining a homomorphic realization of a given automaton B with the minimum amount of feedback. Algorithm 7.4. (Determining the homomorphic realization of an automaton B with the minimum amount of feedback).
a).
Input. A complete automaton B = (S, X , Output. A homomorphic realization A = (S,, X , 8,) of the automaton B with the minimum amount of feedback. Step 1: Derive the cover cp=mk(S) for the smallest kE M such that mk+l(S)= mk(S). Step 2: Determine the front automaton A , = (cp, X , with a,(C@+"+'x, ) 2 a(C('+'),
a,);
4.
-
Step 3: Choose arbitrary partition of the set S such that 7 cp= 0,. Determine the tail automaton A,= (7,cp x X , in the serial connection A of automata A, and A,, with according to (7.2).
a,
a,)
The homomorphic realization introduces redundant states comparing with the minimum necessary in a state realization. Note that this redundancy is introduced only to this part of realizing automaton which is feedback free. It may be shown that there does not exist any homomorphic realization with the amount of feedback less than FB.
Exercises
7.1. Find a complete automaton without outputs with SP-partitions which imply distinct pairs of nontrivial parallel decompositions. Find such connected and strongly connected automata. Find such incomplete automata. 7.2. Determine two sequences of elements from (0, 1) with the minimal length of their periods i = 5 and j = 7 such that they have identical elements on the first ten positions. Why no such sequences with identical elements on the first eleven positions exist?
268
7. Realizations of automata
7.3. Give an example of a complete automaton without outputs which has a realization with (1, 1, ..., 1, n) as its profile of dependencies and which is not realizable with the shift register R,.
7.4. Define a complete Mealy automaton (from DFA family) with n states such that its shortest nongenerable output word ( R = (0, 1)) has the length: a) 3 . n , b) 3 - ( n - 1).
7.5. Suppose two complete automata A , and A , are given with permutation sizes F , and F,, respectively. Determine the permutation sizes of the parallel and the serial compositions of these automata. Bibliographic note The problems presented in this chapter concern the realizing structures of nets of automata. Among the first in this field were the papers of Hartmanis and of Hartmanis and Steams contained in their monography [l]. The presentation of feedback free state realizations followed this work. The realizations with utilizing shift registers were investigated by a number of authors. The first works are by Nichols [l] and Haring [l]. The results from Siwak [l, 41 as well as those from Jump, Marathe [l] are presented here. The problems of asynchronously cooperating automata are not very well researched. One of possible approaches to describe such nets using the notion of the Cartesian composition of automata and algebraic methods involved has been undertaken by Dorfler [l]. In that part of Chapter 7 we use results of Siwak [6, 7, 8, 91. To present some connections between the behavior of a net of automata and the structure of this net we choose to outline the problem of looking for GOE configurations in a cellular net. The problem has been stated in Moore [3] together with the formulation of the first existence conditions. For the Conway’s cellular net, the GOE configuration has been published for the first time in Hardouin-Duparc [l]. The problem of the minimal restricted GOE configuration for this net remains still open for this net. The papers of Harao, Noguchi [l] and Siwak [lo] are related to this problem. At the end, after Hartmanis [2], we presented some possibilities and the constraints connected with the feedback occumng in automata for the case of their homomorphic realizations. Other papers have also influenced the material presented; the following are among them: Amoroso, Patt [l], Grodzki, Siwak [l], Howard [ll, Maruoka, Kimura [ll, Moore [2] and Siwak [2, 51.
8. Time-varying automata
This chapter is intended as an introduction to fundamental problems in the theory of time-varying automata. We begin with definitions of basic concepts. Then we examine the relationship between different classes of time-varying automata. We generalize the relation of equivalence of automata, and study the languages accepted by time-varying automata. A particular emphasis is placed on structural and algebraic properties of the class of periodic automata. We present methods for finding periodic representations of automata. Finally, we discuss properties of the automorphisms group of a periodic automaton.
8.1. Basic concepts
So far we have considered only models of automata whose internal structure is constant at all points of discrete time scale. Now this assumption is lifted. Thus we allow that the internal structure of an automaton may vary during its operation. Such automata will be called automata with time-variant structure or, shortly, time-varying automata. This approach leads to natural generalization, with respect to time, of all notions which define the internal structure of an automaton. There are different types of time-varying automata depending on which elements of their internal structure are allowed to vary. In this section we present basic concepts related to time-varying automata. A time-varying automaton is an ordered 5-tuple A = (S, C, 6, Q, y) where S = (So, S , , ...) is an infinite sequence of nonempty finite sets, called the state sets of A; C is a nonempty finite set, called the input alphabet of A ; 6 = (so, a,, ...) is an infinite sequence of functions, called the transition functions of A, such that 6,: S,xC+Sr+, for all r E No; R is a nonempty finite set, called the output alphabet of A; y=(yo, yl, ...) is an infinite sequence of functions, called the output functions of A, such that yr: S , + a (in the Moore model) or y; S, x C +Ll (in the Mealy model) for t E No. The above defined time-varying automaton will also be called a complete deterministic finite time-varying automaton with outputs, to emphasize that it is an automaton with outputs (i.e., the output functions are defined) and it is complete (i.e., all its functions are total), deterministic (i.e., the values of transition functions are single states) and finite (i.e., all its sets are finite). An ordinary
210
8. Time-varying automata
automaton (i.e., an automaton whose internal structure is not time-varying) will be called a fixed automaton. Like for fixed automata, the transition functions of time-varying automata will be denoted by h in the Moore model, and by p in the Mealy model. The formal definition of a time-varying automaton presented above can be interpreted as follows: at an instant t a time-varying automaton A operates as the fixed automaton (S,,C, 6,, a, XI) which, in response to an input symbol G E C received in a state S E S, generates the output symbol X,(s), passes to the state 6,(s, 0) and undergoes transformation to the fixed automaton (S,,, C, iSt+l, R, Y,+~) at the instant t + 1. A time-varying automaton A can also be interpreted as a programmable automaton whose functions 6 and h are controlled by a program. The instruction executed at an instant t determines the functions 6, and h, which precess input symbols interpreted as data. We shall present now definitions of some special cases of a time-varying automaton. Let A = (S, X, 6, SL, h) be a time-varying automaton. If So = S, = ..., then A is called a time-varying automaton with a fured state set. If So = S, = ... and 6,= 6 , = ..., then A is called a time-varying automaton with a fiied transition function. Similarly, if So = S, = ... and h,= h, = ..., then A is called a time-varying automaton with a fixed output function. Finally, if S, = S, = _.. and 6,= 6, = ... and I , = h, = ..., then the time-varying automaton A reduces to an ordinary automaton, called a fixed automaton. Let A be a time-varying automaton. If there exist T E Mo and t E M such that
a,+, = 6, and
(Vt 2 T)[S,+~ = S,,
= hJ
then A is called a periodic automaton. Let us note that if (8.1) holds for some z E No and t E N,then it holds for all z' and T such that z'>z and T' is a multiple of T. The smallest numbers z E No and T E M satisfying the condition (8.1) are called, respectively, the transient duration and the period of A. A periodic automaton with transient duration z and period T will be also called a (7,7')-periodic automaton. If z=O, then A is called a strictly periodic automaton. A strictly periodic automaton with period T will be also called a T-periodic automaton. If 2 = O and T = 1, then a periodic automaton reduces to a fixed automaton. Let A = (S, C, 6, 0, A) be a time-varying automaton. If there exists a number n E N such that card(S,)S n for all t E No, then A is called a bounded automaton. If there exists a number n E M such that card(S,) = n for all t E No, then A is called an equipotent automaton. The number n is called the degree of A. Like for fixed automata, we shall often consider only the internal structure of a time-varying automaton represented by S, C and 6. It is convenient then to use the notion of a state automaton, called also a semiautomaton or an automaton
8.1 Basic concepts
271
without outputs. We shall introduce now some concepts related to time-varying automata as generalizations of respective concepts defined previously for fixed automata. A time-varying state automaton is an ordered triple A = (S, C, 6) where S, C and 6 are defined identically as for a time-varying automaton (with outputs). Let us remark that a time-varying state automaton may be viewed as a special case of a Moore time-varying automaton with outputs A = ( S , C, 6, a, h) such that R = So u S, u ... and h, = id for all t E No.A time-varying state automaton can be interpreted as an equivalence class of the relation defined on the set of all time-varying automata as follows: (S, C, 6, R, y)-(S’, C, 6’. R, y’) if and only if S = S’, C = C’ and 6 = 6’. Thus, a time-varying state automaton A = (S, C, 6) represents all time-varying automata with outputs A’ = (S’,C, 8, R, y’) such that S=S’, C=C’and 6 = 6 ’ . Some definitions expressed for time-varying automata with outputs contain no conditions involving rZ and y (e.g., an equipotent automaton) or only complementary ones, which should be removed in the case of time-varying state automata (e.g., a periodic automaton, a regular automaton, the fixed analog). For the sake of brevity, it is assumed in what follows that all such definitions apply also to time-varying state automata, without restating these definitions in properly simplified forms.
-
Let A = (S, C, 6) be a time-varying state automaton. A time-varying state automaton A’ =(S’,C’, 6’) is a subautomaton of A if Z r C , S’,cS, and 6’, is the restriction of 6, to S’ x C’ for all t E No.Time-varying state automata A = (S, C, 6) and A’ = (S’,C’, 6’) are said to be disjoint if S,nS’,=@ for all t, t’ E N,,. Let A(l)=(S(l), Z, 6(l)), A(2)= (SO, C, 6(2)), ..., A(”)=(S(”),C, 8”))be timevarying state automata. The direct product of A(1), A(2), ..., A(”) is the timevarying state automaton A = (S, C, 6) where S, = S,(l)x S,(2)x ... x s?) and 6,((sl, s2, ..., s,J, o) = (6,(l)(s1, o), 6,(2)(s2, o), ..., 6p)(s,,, o)) for all (sl, s2, ..., s,,) E S, and Q E C. The direct product of A ( ] ) ,A(2), ..., A(”) will be denoted by A,(’)xAi2) x ...x A p ) . Let us suppose now that all automata A(1), A(2), ..., A(n) are mutually disjoint. The direct sum of A(1), A(2), ..., A(”) is the time-varying state automaton A’ = (S’, C, 6’) where S’, = S,(l)u Sj2)u ... u S,@) and 6’Xs, o)= 6,(s(s, o) for all t E No,i E (1, 2, ..., n), s E and Q E C. The direct sum of A(’), A(2), ..., A(”) will be denoted by Ail) u A,(2) u ... u A,(“). Now we shall generalize the concept of a homomorphism of automata for the class of time-varying automata. We shall consider only state homomorphisms which will be called shortly homomorphisms. Let A = (S, C, 6) and A’ = (S’,C, 6’) be time-varying state automata. A function of A into A’ is an infinite Iff is a sequence f = (fo, fl, ...) of functions such that f,: S,+S’, for all t E N,,. function of A into A’, then we shall denote this by writing f: A +A’. A function f: A -+A’ is a homomorphism of A into A’ if f,+,(6,(s,0))= 6’,(f,(s), o) for all
272
8. Time-varying automata
No,s E S, and o E C. The set of all homomorphisms of A into A’ will be denoted by tZom(A, A ’ ) . A homomorphism f: A -+A’ is an isomorphism of A onto A’ if for all t E No the function f, is bijective. The set of all isomorphisms of A onto A’ will be denoted by Is(A, A ’ ) . A homomorphism of A into A is called an endomorphism of A , and an isomorphism of A onto A is called an automorphism of A . The set of all endomorphisms of A will be denoted by E(A), and the set of all automorphisms of A will be denoted by G(A). tE
8.2. Equivalence of time-varying automata In this section we present basic problems concerning the relation of equivalence of automata, generalized for the class of time-varying automata. We study the relationship between different classes of time-varying automata. Like for fixed automata, we extend the domains of the transition functions and the output functions of a time-varying automaton. Let A = (S, C, 6, R, y) be a time-varying automaton and let t E No. The transition function is extended to the domain S , x C* as follows:
for all s E S,, x E C’ and o E C. Furthermore, we extend the transition function 6, to the domain (Po(S,)u S,) x (P,(C*) u C’) in the following manner:
for all s E S,, x E C’, B E Po(S,) and X E Po(C*). The output function h, of a timevarying Moore automaton is extended to the domain S,uS,xC* as follows: A,($, x) = hl+b,(61(s,x ) ) for all s E S, and X E C’. The output function j3, of a timevarying Mealy automaton is extended to the domain S, x X+ as follows: &(s, xo) = j31+,x,(61(s,x), o) for all S E S,, X E C’ and O E C. We define now the relation of equivalence of time-varying automata. Let A = (S, C, 6, R, A) and A’ = (S’,C, 6’, R, A’) be a time-varying automata. The relation RA,,,, c {(s, s’, t ) I s E S, and s’ E S’, and t E No)is defined as follows: (s, s’, t ) E RA, A’ if and only if (Vx E C*)[h,(s, x ) = h’,(s’, x ) ] . We shall use the following notation: RA,A’(t) = {(s, s’) I($, s’, t ) E RA, A s ] . I f A = A ’ , then instead of RA, A, we shall write RA. States s and s’ are said to be equivalent (indistinguishable) with respect to an instant t if (s, s’, t ) E RA, We define now the relation R as follows: ( A , A ’ , r ) E R if and only if (Vs E SI)(3s’ E S’,)[(s, s’,
8.2. Equivalence of time-varying automata
273
f)E RA, A’] and (Vs’ E S ’ , ) ( ~ S ESJ [(s, s’, f) E RA, A’]. We shall use the following notation: R(t) = {(A, A ’ ) I ( A , A ’ , t) E R ) . Automata A and A’ are said to be equivalent (indistinguishable) with respect to an instant t if (A, A’, t ) E R. We define now the relation R’ as follows: (A, A’) E R’ if and only if (Vt E N,)[(A, A ’ , t ) E R]. Automata A and A’ are said to be equivalent (indistinguishable) if (A, A’) E R’. An automaton A is called minimal if (s, s’, 1) E RA implies s = s’. An automaton A is called the minimal form of an automaton A’ if A is minimal and equivalent to A’.
In Section 8.1 we have defined some special cases of a time-varying automaton: a time-varying automaton with a fixed state set, a time-varying automaton with a fixed transition function, a time-varying automaton with a fixed output function, a periodic automaton and a strictly periodic automaton. We now compare these classes of time-varying automata with regard to the relation of equivalence of automata. Theorem 8.1. Every time-varying automaton is equivalent to a time-varying automaton with a fixed state set.
Proof. Let A = (S, C, 6, a, A) be a time-varying automaton. We construct a timevarying automaton with a fixed state set, which is equivalent to A. Let S be a set whose cardinality is equal to max(card(S,) I t E Rlo) and let f = (tb, fl, ...) be a sequence of functions such that f,: S + S ’ [ is surjective for all tE Nw Let us define a time-varying automaton A’ = (S’, C, 8, R, 3L)) as follows: S, = S , 6’Xs, a) = s’ implies 6,(f(s), a)=fl+l(s’)for all t E No,S E S , and a E Z. It can be easily Seen that A is equivalent to A’ which is a time-varying automaton with a fixed state set. Q.E.D. Theorem 8.1 points out that, as far as the equivalence of automata is concerned, the model of a time-varying automaton (with a time-varying state set) is not more general than the model of a time-varying automaton with a fixed state set. It should be noted that the relationship presented in Theorem 8.1 for a timevarying automaton with a fixed state set holds neither for a time-varying with a fixed transition function nor for a time-varying automaton with a fixed output function.
To study connections between time-varying automata and fixed automata, we define the relation of quasi-equivalence of automata. Let A = (S, C, 6, d , k) and A’ = (S’, C, a’, R, A’) be time-varying automata. Let S = S o uS, u ... and S’ = S’,u S’, u ... . The relation QA, A, ES xS’ is defined as follows: (s, s’) E QA,A’ if and only if O t , f’ E N,)(VXE C’)[A,(s, x ) =A’&’, x)]. States s and s’ are said to
274
8. Time-varying automata
be quasi-equivalent (quasi-indistinguishable) if (s, s’)E &A, A’. If A = A ’ , then instead of Q A , A’ we write QA. We define now the relation Q as follows: (A, A’) E Q if and only if (Vs E S) (3s’ E S’)[(s, s’) E QA,A,] and (Vs’ E S ’ ) ( 3 s ~S) [(s, s’) E QA Automata A and A’ are said to be quasi-equivalent (quasi-indistinguishable) if (A, A ’ ) € Q . It can be noted that if two states (or automata) are equivalent, then they are also quasiequivalent. Theorem 8.2. Every time-varying automaton is quasi-equivalent to an infinite fixed automaton.
Proof. Let A = ( S , C, 6, Q, h) be a time-varying automaton. We construct an infinite fixed automaton which is quasi-equivalent to A . Consider the infinite fixed automaton A’ = (S’, C, 6’, Q, h’) defined as follows: S’= {(s, t ) I s E S, and t~ No), 6’((s, t ) , o)= (F,(s, o), t + 1) and h‘(s, t ) = h,(s) for all t~ No, S E S, and o E C. Let S = Sou S, u ... and let f: S’ -+ S be the function defined as follows: As, t ) = s for all (s, t ) E S’. One can easily see that f determines the quasiequivalence of states in A and A ’ . Q.E.D. It can be proved that the converse of Theorem 8.2 is also true. The following example shows that not every infinite fixed automaton is quasi-equivalent to some bounded time-varying automaton. Example 8.1.
Let A = (S, C, 6, Q, h) be an infinite fixed automaton defined as follows: S is the set of all integers, C = (0, l ) , R = (0, I ) , 6(k, 0) = k - 1 and 6(k, 1) = k + 1 for all k~ S, h(0)= 1 and h(k)= O for all k E S\ (0). It is easy to see that A is minimal. Let A’ = (S’, C, 6’, Q, A’) be a time-varying automaton which is quasiequivalent to A . Let k e S’, and S,= 6(k, E). Then, for every nE S, there exists S E S ’ , which is quasi-equivalent to n. Since A is minimal, we have card(S’,) 2 card(S,). It follows from the definition of A that the sequence card(S,), card(S,), ... is increasing. Thus A’ is not bounded.
Let us consider the class of all time-varying automata which are equivalent to finite automata. We show that this class contains all periodic automata. Theorem 8.3. Every periodic automaton is quasi-equivalent to a finite automaton. Proof. Let A = (S, C, 6, Q, h) be a (T, T)-periodic automaton. We construct a finite fixed automaton which is quasi-equivalent to A . Consider the finite fixed automaton A’ = (S’, C, 6’, R, 1’)defined as follows: S’ = {(s, t ) I s E S, and t~ (0,
8.2. Equivalence of time-varying automata
275
..., T + z - l ) ) , 6’((s,
t), o)= (6,(s, o), n(t)) and h’(s, t ) = h,(s) for all t E (0, 1, T+z-1). S E S , and ~ E C where ; n ( t ) = t + l for t E (0, 1 , ..., T+z-2) and n(r) = z for t = T + z - 1. The automaton A’ is quasi-equivalent to A . Q.E.D.
1,
...,
The converse of Theorem 8.3 follows immediately from the fact that every fixed automaton is a periodic automaton with period T = 1. Let us remark that a finite fixed automaton can be quasi-equivalent also to a time-varying automaton which is not periodic. A time-varying automaton is said to be potentially periodic if it is equivalent to a periodic automaton. It can be noted that every potentially periodic automaton is quasi-equivalent to a finite fixed automaton. We show now that the converse of Theorem 8.3 is also true. Theorem 8.4. A time-varying automaton is quasi-equivalent to a finite fixed automaton if and only if it is potentially periodic. Proof. (e) The proof is obvious. (a) Let A =(S, C, 6, Q, h) be a time-varying automaton which is quasiWe shall prove that A is equivalent to a fixed automaton A = ($, C, $, Q, potentially periodic. Without loss of generality suppose that A and A are minimal. Let f = (fo,fi,...) be a sequence of functions f,: S, -+S such that ft(s)E S is quasiequivalent to s E S,. Consider the sequence S’ = (fo(S,), fi(S,), ...) of subsets of S. Since A is finite and minimal, the sequence S’ is periodic. Denote by z and T the transient duration and the period of S ’ , respectively. Let us construct the automaton A’ = (S’, C, 8, R, h’) as follows: 61t(s, o) = 8(s, o) and h‘,(s) =Qs) for all t E No,s E S, and o E C. It is easy to see that A’ is a (7, T)-periodic automaton which is equivalent to A . Thus A is potentially periodic. Q.E.D.
>.
As it follows from Theorem 8.1, the study of time-varying automata may be restricted without loss of generality to the class of time-varying automata with fixed state sets. This approach has been taken by many authors. On the other hand, the assumption that the state set is also time-varying is very useful in examining the relationship between time-varying automata and fixed automata. The latter approach is often slightly modified. A time-varying automaton is called regular if for all m, n E No the following conditions hold: (i) (ii)
S, nS, = 0 or S, = S,, S, = S, implies S, = 6, and A, = A,.
276
8. Time-varying automata
We show that, with respect to the equivalence of automata, the class of regular time-varying automata is not less general than the class of time-varying automata.
Theorem 8.5. Every time-varying automaton is equivalent to a regular timevarying automaton. Proof. Let A = (S, C, 6, R, h) be a time-varying automaton. We construct a regular time-varying automaton which is equivalent to A. Consider the timevarying automaton A’ = (S’, C, 6’, a, h’) defined as follows: s’,= {(s, t ) I s E S f ] , 6’,((s, t ) , o)= (6,(s, o), t + 1) and h’,(s, t ) =h,(s) for all t E No, (s, t ) E S’, and O E C. One can easily see that A’ is a regular time-varying automaton equivalent to A. Q.E.D. Corollary 8.1. Every periodic automaton.
(2,
T)-periodic automaton is equivalent to a regular (z, T)-
Let A = (S, C, 6, ST, A) be a regular time-varying automaton. The f i e d analog of A is the fixed automaton A* = (S*, E,6’, R,3L*) defined as follows: S* = So u S, u US^+<-^. 6’(s, O)= 6,(s, O) and h‘(s) = h,(s) for all t~ No,S E S, and o E C. Let us note that the fixed analog of a periodic (resp. non-periodic) automaton is finite (resp. infinite). The fixed analog of A is quasi-equivalent to A and preserves the internal structure of A .
8.3. Languages accepted by time-varying automata In this section we characterize languages accepted by time-varying automata. We examine the relationship between hfferent types of time-varying automata with respect to classes of accepted languages. The results of this section are compared with analogous results of Section 8.2. A time-varying Rabin-Scott automaton is an ordered 5-tuple A = (S, C, 6, F ) where S = (So, S,, ...) is an infinite sequence of nonempty finite sets, called the state sets of A ; C is a nonempty finite set, called the input alphabet of A ; 6 = ( 6 0 , 6,, ...) is an infinite scquence of functions, called the transition funcSo,
tions of A , such that 6,: S,xX+S,+, for all t~ No; is a state in So, called the initial state of A ; F = ( F o , F , , ...) is an infinite sequence of nonempty finite sets, called the sets of final states of A , such that F , c S , for all t E No. Like in the case of fixed automata, a time-varying Rabin-Scott automaton can be viewed as a special case of a time-varying Moore automaton A = (S, C, 6, R, A) with a distinguished state s o € S, (the initial state of A ) such that Q = (0, I ] and A=(&, h,, ...) is defined for all t E W, as follows: h,(s)= 1 if s E F,, and
8.3. Languages accepted by time-varying automata
277
A,($) = 0 otherwise. According to the above interpretation, all definitions presented for time-varying Moore automata apply also to time-varying Rabin-Scott automata. Like for a time-varying Moore automaton, we define some special cases of a time-varying Rabin-Scott automaton. Let A = (S, C, 6, so, F) be a time-varying Rabin-Scott automaton. If So= S, = ..., then A is called a time-varying Rabin-Scott automaton with a fixed state set. If So = S, = ... and 6,= 6, = ..., then A is called a time-varying Rabin-Scott automaton with a fixed transition function. If So= S, = ... and Fo = F , = ..., then A is called a time-varying Rabin-Scott automaton with a fixed final state set. Finally, if So= S,= ... and 2j0 = 6, = ... and F , = F , = ..., then A reduces to a fixed Rabin-Scott automaton. We now characterize the class of languages accepted by time-varying automata. The language accepted by a time-varying Rabin-Scott automaton A = (S, C, 6, so, F ) is the set L(A) = { x E C*I 2jo(s0, x ) E Fkr).Let .d be the class of all time-varying Rabin-Scott automata. The set L ( d ) = {L(A) ( AE .d) is called the family of languages accepted by the class of all time-varying Rabin-Scott automata. Let us remark that every language is accepted by an unbounded time-varying automaton as well as it is accepted by an infinite fixed automaton. Thus we shall consider only bounded time-varying Rabin-Scott automata. Of course, the family of languages accepted by bounded time-varying automata contains all regular languages. Since this family is not countable, it contains also languages which are not recursively enumerable, i.e., languages which are not accepted by any Turing machine. We shall present now some properties of languages accepted by bounded timevarying Rabin-Scott automata. For the sake of brevity, bounded time-varying Rabin-Scott automata will be called shortly time-varying automata.
Theorem 8.6. Every language accepted by a time-varying automaton is also accepted by a time-varying automaton with a fiied state set.
Proof. Let L(A) denote the language accepted by a time-varying automaton A = (S, C, a, so, F). We construct a time-varying automaton A’ with a fixed state set such that L(A) is also accepted by A ’ . Let S’ be a set such that card(S’)= max{card(S,)I ? E No),and let f = (fo, fi, ...) be an infinite sequence of injective functions f,: S, +S’ where t E Nw Let A’ = (S’, C, 3’. so’, F ’ ) be a time-varying 0)= automaton with a fixed state set defined as follows: so =fo(so>, a’,(f,(s, f,+,(a,(s, 0))and F ’ , = cf,(s) 1s E F , ) for all t E No,S E S, and (J E X. For the other arguments each function f , may be defined arbitrarily. From the definition of A’ it follows that L(A’)= L(A). Q.E.D
8. Time-varying automata
218
Theorem 8.6 describes, with respect to the class of accepted languages, the Same property as Theorem 8.1 with respect to the relation of equivalence. Let L be a language over an alphabet C, and let EL be the Myhill relation induced by L. By L(i) we denote the cardinality of the set Zi/EL, i.e., the number of equivalence classes induced in Ciby EL.
Theorem 8.7. A language L is accepted by a time-varying automaton if and only if there exists k E M such that L(i) 5 k for all i E No. Proof. We construct a time-varying. automaton A = (S, C, 3, so, F ) with a fixed state set such that L(A) = L. Let S = {sl, s2, ..., sk} and let f = (fo, f l , ...) be an infinite sequence of injective functions such that f,: C‘IEL-S for all t~ No. Furthermore, let = EL(x) nC(I) for all i e No and X E C*. We put so = fo(EL(0)(e))and F , = Cf,(EL@)(x)) Ix E Lj for all t~ No. The transition function 3, is defined for all t E No as follows: 3,(f,(EL(f)(e)), (3) =h+l(EL(f)(x(J)) for all x E C‘ and (JE Z, and &(s, 0) is arbitrary for the other arguments. It is easy to see that L(A) = L. Q.E.D
Theorem 8.8. Every language accepted by a time-varying automaton is also accepted by a time-varying automaton with a fixed state set. Proof. Consider any language L accepted by a time-varying automaton. By Theorem 8.6, there exists a time-varying automaton A = (S, Z, 3, so, F) with a fixed state set such that L(A) = L. The proof of Theorem 8.6 provides a method for constructing A. Now we construct a time-varying automaton A’ = (S’, C, 8, so’, F ’ ) with a fixed final state set such that L(A’) = L(A). We put S’ = S X (0, 1) and F’ = S x ( 1 ) . Let f = (fo,f i , ...) be an infinite sequence of injective function ff: S - + S’ such that As) = (s, 1) if S E F,, and As) = (s, 0) otherwise. Let = fo(s0). The transition function is defined for all t E No, (s, a ) E S’ and cr E C as follows: d’,((x, a ) , rs)=f,(d,(.~, 0)).It follows from the definition of A that L ( A ’ )= L(A) = L. Q.E.D
a’,
Let us note that in Section 8.2 there is no theorem analogous to Theorem 8.8,
as it is not true that every time-varying automaton is equivalent to a time-varying automaton with a fixed output function. We shall consider now the question whether every language accepted by a time-varying automaton is also accepted by a time-varying automaton with a fixed transition function. The following example shows that the answer is negative.
8.3. Languages accepted by time-varying automata
279
Example 8.2. Consider the language L = { P m l nm, l n E W} over the alphabet C = (0, 11. We shall show that L is not accepted by any time-varying automaton with a fixed transition function. Let us suppose that there exists a time-varying automaton A = (S, 'c, so, F) with a fixed transition function such that L is accepted by A. Since the set S is finite, there exist m, d E M such that
a,
a(so, 0" ") = acs,
Thus for all i, j
a@,, 0"
E
0" "+d).
Nowe get
") =
a@,, 0" "+id)
and a(so,
Ommlj)
=
a@,, Om"+ll').
On the other hand, there exist k, 1 ENsuch that a(so, O"."lk)
= a<s,, O"."lL+?
and
for all j~
No.Combining (8.2) with
(8.3) we obtain
for all i, j E W,,.Suppose i = vl and j = vd. Then
Let v be such a number that m2 + vdf is not equal to the square of for all v E N,,. any natural number. Then the state denoted by the left-hand side of (8.4) belongs to F,, and the state denoted by the right-hand side of (8.4) does not belong to F,, where t = m 2 + k + v d l . We get a contradiction. Thus the language L is not accepted by any time-varying automaton with a fixed transition function.
280
8. Time-varying automata
Theorem 8.9. Every language accepted by a periodic automaton is regular.
Proof. Let A = (S, C, a, so, F) be any (7, T)-periodic automaton. We show that the language L(A) is regular. Consider the relation E E C’ x C’ defined as follows: (x, y) E E if and only if either x = y or Ixl22, lyl2 7, Ixl=lyl(mod 7‘) and do(so, x ) = ao(s0. y). Since A is a periodic automaton, the relation E is a right congruence of finite index. The language L(A) is the union of some equivalence classes of E , and therefore it is regular. Q.E.D The converse of Theorem 8.9 follows immediately from the fact that every fixed automaton is a periodic automaton with period T = 1. A regular language may also be accepted by a time-varying automaton which is not periodic. Theorem 8.9 corresponds to Theorem 8.3. We define now a nondeterministic time-varying Rabin-Scott automaton, and then we compare the classes of languages accepted by deterministic and nondeterministic time-varying automata. A nondeterministic time-varying Rabin-Scott automaton is an ordered 5-tuple A =(S, C, a, so, F ) where S and C are defined as for a deterministic time-varying Rabin-Scott automaton; 8 = (do, ...) is an infinite sequence of functions, called the transition functions of A, such that 8,: S,X C P(S,+,) for all t E No; so is a set, called the set of initial states of A, such that so CS,; F = (Fo, F , , ...) is an infinite sequence of nonempty finite sets, called the families of sets of final states of A, such that F , r P ( S , ) for all t E N,. It should be noted that in the above defined automaton, at any instant tE No, the choice of the next state is independent of the choice of the next set of final states. This is a special case of definition which combines the two choices.
a,,
As in the case of a nondeterministic fixed automaton, we shall extend the domain of the transition function of a nondeterministic time-varying automaton. The transition function 3, is extended to the domain S , x C” as follows:
for all t E No,S E S,,X E C* and (3 E C. Furthermore, we extend (Po(S,)u S,) x (Po(C*)u C’) as follows:
a, to
the domain
8.3. Languages accepted by time-varying automata for all t E No, s E S,, x E C*, B E Po(&) and X
E
28 1
Po(C*).
We now define the family of languages accepted by nondeterministic timevarying automata, and then compare this family with the family of languages accepted by deterministic time-varying automata. The language accepted by a nondeterministic time-varying Rabin-Scott automaton A = (S, C, a, so, F) is the set L(A) = {XE C* I&(s, a)n {s E B IB E F M )+0). Let &’ be the class of all nondeterministic Rabin-Scott automata. The set L ( d ) = {L(A) I A E ) ~ is called the family of languages accepted by the class of all nondeterministic time-varying Rabin-Scott automata. Theorem 8.10. Every language accepted by a nondeterministic time-varying automaton is also accepted by a deterministic time-varying automaton. Proof. Let A = (S, C, a, so, F) be a nondeterministic time-varying automaton with a fixed state set. We shall construct a deterministic time-varying automaton A’ = (S’, C, a’, so’, F‘) with a fixed state set, such that L(A) = L(A’). Consider the sequence F = (Fo, F,, ...), where F , = {sE B IB E F,) for all t E No.Let S’ = P(S) and = {so). The transition function a’, is defined as follows: a’,(B, a) =a@, a) for all t~ No, B E S’ and O E C. Furthermore, let F’, = {B E S’ IB nF, # 0) for all t E No). One can easily see that L(A’)= L(A). Q.E.D
Thus, the family of languages accepted by nondeterministic time-varying automata is identical with the family of languages accepted by deterministic timevarying automata.
8.4. Periodic automata
This section deals with basic structural properties of periodic automata. We examine the relationship between periodic representations of automata and periodic partitions of automata. In the remaining part of this chapter we focus our attention on periodic state automata which will be called shortly periodic automata. Furthermore, we assume that all discussed automata are regular. A periodic automaton has been defined as a special case of a time-varying automaton (cf. Section 8.1). It is more convenient, however, to use sequences which are rather finite than infinite. We introduce therefore a simpler definition of a periodic automaton, which is consistent with all preceding assumptions. A periodic automaton is an ordered triple A = ( S , C, a) where S = (SJ1, ..., S), is a finite sequence of finite nonempty mutually disjoint sets, called the
8.Time-varying automata
282
state sets of A; C is a finite nonempty set, called the input alphabet of A; a=@,, a,, ..., is a finite sequence of function, called the transition functions of A, such that a,: S,xC+S,(,, where n ( t ) = t + l for re {O, 1, ..., T+z-2) and n(t)=z for t = T + z - 1. The numbers z E No and T E M are called, respectively, the transient duration and the period of A. A periodic automaton A with transient duration z and period T will be called shortly a (2, T)-periodic automaton. If z=O, then A is called a strictly periodic automaton, or shortly, a T-periodic automaton. A graph illustrating the definition of .a periodic automaton is shown in Fig. 8.1, which represents connections between the transition functions and the state sets.
aT+.r-l)
1
\
\
\
1
Fig. 8.1, A graph illustrating the definition of a periodic automaton Let A = ( S , C, a) be a (7. T)-periodic automaton. The fixed analog of A is the fixed automaton A' = (S*, Z, a*) defined as follows: S =So US, u ... L J S ~ +and ~-~ a*(s, a) =a,(& a) for all O E C, S E S, and t E (0, 1, ..., T + z - 1). A fixed constituent of a 7'-periodic automaton A = ( S , C, is a fixed automaton A,' = (S:, C, 8): where t E (0, 1, ..., T + T - I ) , S,' =S, and a:($, x ) x ) for all S E S, and Q E CT. A periodic automaton A' is said to be a periodic representation of a fixed automaton A if the fixed analog of A' is equal to A. A periodic representation of A with transient duration z and period T will be called a (2, T)-periodic representation of A. A (z, T)-periodic representation of A is called maximal if there is no (z', T')-periodic representation of A such that z' > z and T' > T. The numbers z and T are called, respectively, the transient duration and the period of maximal periodic representation of A . If z=O, then a periodic representation of A is called a strictly periodic representation of A . Similarly, a T-periodic representation of A is called maximal if there is no T-periodic representation of A such that Z" > T.
a)
=a,@,
8.4. Periodic automata
283
The concept of a periodic representation, defined for fixed automata, will be extended now to periodic automata. A periodic automaton A’ is said to be a periodic representation of a periodic automaton A if the fixed analogs of A and A’ are equal. We shall assume that other concepts defined for fixed automata are extended in a similar manner to periodic automata. For instance, a periodic automaton A is said to be connected (resp. strongly connected, retrievable, onto) if the fixed analog of A is connected (resp. strongly connected, retrievable, onto). Let A = (S, C, a) be a fixed automaton. A cover C of S is called a periodic cover of A if there exist Z E No,T E M and a bijective function f: (0, 1, ..., T- 1) +C such that am?), C ) c f ( n ( t ) ) where n(t) = t + 1 for t E (0, 1, ..., T + z - 2) and n(t) = z for t = T + z - 1. We say that C is a (7,7)-periodic cover of A. A cover C of an automaton A will be written as a family of sets indexed byf. Thus, if C={SiliE (0, 1, ..., T - 1 ) ) is a (7,T)-periodic cover of A, then we assume thatf(i)=Si for all i E (0, 1, ..., T + z - ~ )If. z=O, then a periodic cover of A is called a strictly periodic cover of A, or a T-periodic cover of A. If C is a partition of S, then the above defined covers are called, respectively, a periodic partition of A or a (7, 7)-periodic partition of A, and a strictly periodic partition of A or a T-periodic partition of A. A partition A of S is said to be a cyclic partition of A if A is input-independent and for every B E A there exists B’ E A such that a@’, C) cB. Let us remark that the problem of finding periodic representations of an automaton A is equivalent to the problem of finding periodic partitions of A. Every periodic partition of an automaton A determines a periodic representation of A and, conversely, every periodic representation of A determines a periodic partition of A. The periodic partition of a fixed automaton A’, induced by a periodic representation A = (S, C, a) of A’ such that S = (So, S,, ..., ST+r-l),is partition A = (So, S,, ..., ST+r-l).The periodic representation of a fixed automaton A’, induced by a periodic partition A = (So, S,, ..., ST+r-I)of A’, is a periodic automaton A = (S, C, 8) defined as follows: S = (So, S,, ..., ST+r-,) and 3 a,, ..., where 13, is the restriction of a’ to the domain S,xC for all t E (0, 1, ..., T+Z- 1).
=(ao,
aT+s-l)
Let A = (S, C, a) be a fixed automaton. We use the following notation: PAR(A) SPP(A) IIP(A) CP(A) OP(A) SOP(A)
- the set of all partitions of A, - the set of all SP-partitions of A, -
the set of all input-independent partitions of A,
- the set of all cyclic partitions of A, -
the set of all periodic partitions of A, and
- the set of all strictly periodic partitions of A.
284
8. Time-varying automata
Then
If A is connected, then SOP(A)=CP(A), and if A is strongly connected, then SOP@) = OP(A) = CP(A) = IIP(A). It is well-known that the set PAR@), together with the operation of the sum of partitions, forms a lattice. Analogous statements are true for the sets IIP(A) and CP(A). The following example shows, however, that this property holds neither for SOP@) nor for OP(A).
Example 8.3. Consider the autonomous automaton A = (S, C, a) whose diagram is given in Fig. 8.2. The partitions 71:= ( { 1, 3 ) , (2, 4 ) ) and x’= { [ 1, 4), {2, 3 ) ) are strictly periodic partitions of A , while the partition K -71:’ = ( { l ) , {2), ( 3 ) , ( 4 ) ) is not a strictly periodic partition of A .
Fig. 8.2. Diagram of the automaton of Example 8.3.
We show that if an automaton A is connected, then the set SOP@), together with the operations of sum and product of partitions, forms a lattice which is identical with the lattice of the set CP(A).
Theorem 8.11. The set of all strictly periodic partitions of a connected automaton, together with the operations of sum and product of partitions, forms a lattice. Proof. Lei x’= {Yo, S1, ..., S ’ T - l } be a Z”-periodic partition of an automaton a), and let x”= (S”,, S”,, ..., S”,.-,} be a T’--periodic partition of an automaton A. We prove that n’.n” and x’+ x” are strictly periodic partitions of ’4. A = ( S , C,
Let x = x ’.IT’’ and let T=g.c.d.{Z“, T ” ) . For any B E x there exist such that B = s’,n s”,.Let Bk = S’,+k(,,,d nS”l+k(md T’) for all k € &. One can easily see that B k E x, C) c B k + , and B k + T =Bk for all k E No.Furthermore, since A is connected, we have S = B , u B , u .. . LJ &-,. Thus, n’.x”={B,, B , , ..., BT-,)is a T-periodic partition of A . (1)
s’,E X’ and s”,E IT”
285
8.4. Periodic automata
(ii)
Let x = x ’ + x ’ ’ and let T=l.c.m.(T‘, T”). For any B E x there exist
S’i E X’ and S ” j E IT’’ such that S’i U S”j C B. Let Bk = {S I S E S ’ i + k + n r ( m d T ) and n E No} u {s I s E S’j+k+nT(modr )and n E No) for all k E No. Then we have Bk E x , d(Bk, C)C Bk+1 and Bk+T = Bk for dl k E &. Furthermore, s = BOUB1 U ... UBT-1. Thus, 7c’ + x” = (Bo, B , , ..., B,,) is a T-periodic partition of A.
Q.E.D
Corollary 8.2. For every connected automaton A there exists a minimal strictly periodic partition of A. Corollary 8 3 . If A is a connected automaton, then the lattice (SOP(A), +, .) is isomorphic to the lattice (D(T), g.c.d., 1.c.m.) where T is the period of the minimal strictly periodic partition of A, and D(T) is the set of all divisors of T. Corollary 8.4. Let x and x’ be strictly periodic partitions of a connected automaton A, with periods T and T ,respectively. If xsx’, then T is a divisor of T. The following example shows that (OP(A),
+,
.) is not a lattice.
Example 8.4. Consider the autonomous automaton A = (S, C, a) whose diagram is given in Fig. 8.3. The partitions x = ( ( l ) ,(2, 41, (3 )) and x 7 = ( ( 4 ) , (1, 3), ( 2 ) ) are periodic partition of A, while the partition x .x’= [ ( l ) , [2), [3), [4)) is not a periodic partition of A. The following theorem specifies a class of automata for which (OP(A), a lattice.
+,
.) is
Theorem 8.12. Let A be an automaton whose minimal generating set is a oneelement set. Then the set of all periodic partition of A, together with the operations of sum and product of partitions, forms a lattice. Proof. The proof is analogous to that of Theorem 8.11.
Fig. 8.3. Diagram of the automaton of Example 8.4.
286
8. Time-varying automata
Corollary 8.5. For every automaton whose minimal generating set is a oneelement set, there exists a minimal periodic partition of A. Corollary 8.6. Let A be an automaton whose minimal generating set is a oneelement set. Then the lattice (OP(A), +, .) is isomorphic to the lattice (W(2, T), u,n) defined as follows: W(z, T ) = (1, 2, ..., 2) xD(T) where 2 and T denote, respectively, the transient duration and the period of the minimal periodic partition of A , and D(7) is the set of all divisors of T; (a, b ) u ( a ’ , b’)=(max(a, a ’ ] , g.c.d.(b, 6’)) and (a, b ) n ( a ’ , b’)=(min(a, a ’ ) , I.c.m.(b, b ’ ) ) .
We examine now the relationship between periochc and fixed automata from the point of view of realization of automata. Let us recall that the concept of a periodic automaton A is equivalent, -as far as a formal definition is concerned, to the concept of a periodic partition of the fixed analog of A. We show now that, with regard to the structure of automata, a periodx automaton may be viewed as a serial connection of two automata, the first one of which is autonomous.
A
Fig. 8.4. A block diagram illustrating a serial decomposition of the fixed analog oj a periodic automaton Theorem 8.13. Let A be a periodic automaton with period T # O . Then there exists a nontrivial serial decomposition A,@, such that A, is autonomous. Proof. The proof follows directly from Thcorem 7.3. A block diagram shown in Fig. 8.4. illustrates a serial decomposition of the fixed analog of a periodic automaton. The automaton A, is autonomous, and so its realization is very simple. It may be remarked that the name “time-varying automaton” actually refers to the automaton A, which interprets its input symbols
8.4. Periodic automata
287
twofold some as letters of an input alphabet, and others as signals which modify its structure and operation. 85. Automorphisms of periodic automata In this section the concept of an operation-preserving function will be further generalized and extended to the class of periodic automata. We discuss some properties of the group of automorphisms of a periodic automaton. In what follows we frequently deal with the notion of a sequence of functions. To simplify its use, we introduce now some definitions and notations. A sequence f = (f,,f,. ..., fJ of functions, where f i : Xi+Yi for all i c (1, 2, ..., n ) , is compatible if X E Xi n X j implies f,(x) =fi(x) for all i, J E { 1, 2, ..., n ) . Let f be a compatible sequence of functions. Furthermore, let X = X, u X , u ...u X,, and Y = Y , u Y , u ... uY,,. The composition of f is a function f: X + Y defined as follows: Ax) =fi(x) for all i E { 1, 2, ..., n) and X E Xi. Let C = {X,, X,, ..., X,,) be a cover of a set X . The decomposition of a function f: X + Y with respect to C is said a sequence f = (f,,f,, ..., f,J of functions such that f i is the restriction off to Xifor all i~ (1, 2, ..., n ) .
Now, we introduce the concept of a k-function as a generalization of the concept of a function in the class of all strictly periodic automata. Let A, = (S,, C , a,) and A, = (S,, C, be strictly periodic automata with the same period T, and let k E {O, 1, ..., T- 1). A sequence f = (fo, fl...., fT-,) of functions such that f; S,,t-+S2, t+k(mod T ) for all t E (0, 1, ..., T- 1) is called a k-function of A, into A,. If f is a k-function of A , into A,, then we write f: A , - + A 2 If k = O , then a 0-function is called shortly a function, and we write f: A , + A 2 instead of f: A, - + A 2 . Let us note that a k-function f of A, into A, is a compatible sequence of functions, and the composition f of f is a function of A’, into A*,, where A*, and A*, are the fixed analogs of A, and A,, respectively. Let A =(S, C, be a T-periodic automaton. By id(A) we shall denote the function f = (fo, f,, ..., fT-J of A onto A defined as follows: f = id for all t E (0, 1, ..., T- 1). Let A, =(S1, C, a,), A, =(S,, C, and A , = (S,, C , a,) be strictly periodic automata with the same period T. Furthermore, let f : A, - + A and f’:A , - ck”>-+A3, where k’, k” E (0, 1, ..., T - 1). The superposition off and f ’, denoted by f y , is the k-function f = (f,, f,, ..., fT-,) of A , into A, defined as follows: k =k’ +k”(mod 0 and f , =f’r+k(mod $t for all t E (0, 1, ..., T- 1). Let us remark that f is the superposition off and f ’ if and only if the composition off is the superposition of the composition off and the composition off’. The above-defined superposition of k-functions is an associative operation. If f,: A , - + A 2 , f,: A , - -+A4, then f3(fdl) = (fJ$, =f&fl and fJdl: A , - i b -+A4 where k = k , +k, +k,(mod T). The
a)
8. Time-varying automata
288
superposition of n functions for any n~ (2, 3 , ..., ) is defined recursively as follows: fJn-l..f, =fn(f;I-d,-,..$1fi)= (fJn-l..f,&. Let A = (S, C, 3) be a T-periodic automaton, let k E (0, 1, ..., T - 1) and let f = (fo,f,, ...,fT-,) be a k-function such that f: A - +A. For any n E M the nfold superposition off, denoted by f”, is the k’-function f”: A - + A defined as follows: k‘ = nk(mod and J” = ( f o , f l . . . . , f T - l ) where f r=ft+(n-l)k(modn ft+(n-2)k(mod T ) . .j, for all t E (0, 1, ..., T- 1). By f1we denote the &-function (fo, f,, ..., fT-,) such that f-l: A - + A where k’ = -k(mod Z‘) and f ,=f-ll-k(mod 7) for all t E (0, 1, ..., T - 1). Analogously, for any n E M by f-” we denote the n-fold superposition (f-’)” of f-l, i.e., the k’-function (f,, f ..., f T-l) ... of A onto A such that k’ = - nk(mod T ) and f =ft-nk(mod ft-(n-l)k(mod ft-k(mod for all t E (0, 1, ..., T- 1). Finally, by f’ we shall denote the function id(A). Let us note that f is the n-fold superposition of f if and only if the composition off is the n-fold superposition of the composition off.
,
a,)
Now we define an operation-preserving k-function. Let A , = (S,, C, and A , = (S,, C, 8.J be strictly periodic automata with the same period T , and let k E (0, 1, ..., T- 1). A k-function f: A, - +A, is a k-homomorphism of A, into A, if fr+l(m,,,j~ ( 3 1,(S, , (J)=az, t + k ( m d p(fLs), (J) for all t E (0, 1, ..., T- 11, s E S, and (T E C. If furthermore f , is bijective for all t E (0, 1, ..., T - l ) , then f is called a k-isomorphism of A, onto A,. A k-homomorphism of A into A is called a k-endomorphism of A, and a k-isomorphism of A onto A is called a kautomorphism of A. We denote by k-Hom(A,, AJ the set of all k-homomorphisms of A, into A,, by k-Is(A,, AJ the set of all k-isomorphisms of A, onto A,, by k-E(A) the set of all k-endomorphisms of A, and by R-G(A) the set of all k-automorphisms of A. If k = 0 , then a 0-homomorphism, a O-isomorphism, a 0-endomorphism and a O-automorphism will be called, respectively, a homomorphism, an isomorphism, an endomorphism and an automorphism. Similarly, the sets 0-Hom(A,, AJ, 0-Is(A,, AJ, O-E(A) and 0-G(A) will be denoted, respectively, by Hom(A,, AJ, Is(A,, Ad, E(A) and G(A). Finally, in compliance with traditional usage, a l-automorphism will be called a polyadic automorphism, and the set 1-G(A) will be denoted by =(A). Let us note that f is a k-homomorphism of A , into A, if and only if the composition o f f is a homomorphism of A’, into A*,, where A’, and A’, are the fixed analogs of A, and A,, respectively. Let A = (S, C, be a T-periodic automaton. The set PG(A), together with the ( T + 1)-ary operation of superposition of functions, forms a (T+ 1)-adic group. In general, for any k E (0, 1, ..., T - 1) the set k-G(A), together with the ( T + 1)-ary operation of superposition of functions, forms a ( m +1)-adic group where m = (l/k) .l.c.m. ( k , T ) . Next, examine the group G(A) of automorphisms of a periodic automaton. Let A be a T-periodic automaton and let k~ (0, 1, ..., T- 1). We shall use the
a)
8 5 . Automorphisms of periodic automata
289
following notation: R-G(A) = cflf E R-G(A)} where f is the composition of f. Furthermore, O-G(A) will be denoted by G(A). Let us remark that G(A) is a subgroup of G(A*), where A* is the fixed analog of A. We show that if A is strongly connected, then G(A) is a normal subgroup of G(A*). Theorem 8.14. Let A be a strongly connected T-periodic automaton and let A* be the fixed analog of A. Then for every f E G(A*) there exists k E (0, 1, ..., T- 1) such that f e k-G(A). Proof. Let A = (S, C , a) and A* = (S*, C , a*). suppose that S E So and AS)E Sk, where ICE (0, 1, ..., T- 1). First we show that AS,) = S,. Let s' E S,. Since A is strongly connected, there exists x E C* such that a'(& x ) = s' and Irl= O(mod Z ' ) . Moreover, we have As') =f(a*(s, x ) ) = X N s ) , x). Thus As') E sk, and in consequence AS,) = S,. Suppose now that t E (0, 1, ..., T - 1) and s' E S,. Then there exist s E So and X E C* such that a*(&x ) = s' and PI = t. Furthermore, we have As')=Ad*@,x ) ) = a*Ns), x). Thus As') E SI+L(mod n, and therefore ASt) = Sr+e,,,od Denote by R the T-periodic partition of A* induced by the T-periodic representation A of A*. Let f be the decomposition o f f with respect to R. Then f E k-G(A) and thus f E R-G(A). Q.E.D.
Corollary 8.7. If A is a strongly connected T-periodic automaton, then G(A*)= O-G(A) u 1-G(A) u ... u (T - 1)-G(A) where A* is the fixed analog of A . Theorem 8.15. Let A be a strongly connected T-periodic automaton and let A* be the fixed analog of A. Then G ( A ) is a normal subgroup of G(A*). Proof. It suffices to show that f-lgfe G(A) for all g E G(A) and f E G(A*). Let k, t E (0, 1, ..., T- 1) and f E k-G(A). By Theorem 8.14, we have AS,) = S,+Mm,q. Since f is an automorphism, we get f-l(Sl+Kmdn) = S,. Furthermore, g(S,) = Si for all i E (0, 1, ..., T- 1). Thus f-'af(S,) = S , which means thatflgfe G ( A ) . Q.E.D. Corollary 8.8. Let A be a strongly connected T-periodic automaton and let ..., T - 1). If R-G(A) is nonempty, then it is a coset of G(A*) with respect to G(A), where A* is the fixed analog of A.
k~ [ O , 1,
We now examine some properties of the factor group G(A*)/G(A). Theorem 8.16. Let A be a strongly .connected T-periodic automaton and let A* be the fixed analog of A. Then (i) G(A*)/G(A)is a cyclic group whose order is a divisor of T, (ii) G(A*)/G(A)is isomorphic to some normal subgroup of G(A*).
290
8. Time-varying automata
Proof. (i) Let A = (3, C, a) and A' = (S*,C , a*). Furthermore, let k E ( 1, 2 , ..., T - 1) be the smallest number such that k-G(A) is nonempty. Then the set k'-G(A) is nonempty for all k' E (0, 1, ..., T- 1 ) such that k' = nk(mod r ) where nE M. This mans that k is a divisor of T, i.e. , T = k m for some m e M. Then for all n E (0, 1, ..., m - 1 ) the set nk-G(A) is a coset of G(A*) with respect to G ( A ) . Consider the function f: G(A*)/G(A)+ (0, 1, ..., m - 1) defined as follows: Ank-G(A))=n for all n E (0, 1, ..., m - 1). It can be easily Seen that f is an isomorphism of G(A*)/G(A)onto the group (0, 1, ..., m - 1) with the operation of the sum modulo m. Thus G(A*)/G(A)is a cyclic group of order m, where m is a divisor of T. (ii) Since G(A*)/G(A)is a cyclic group of order m, we have 1f E k-G(A)) = G(A). Hence, there exists fi E k-G(A) such that f l m = id(A*). Thus, the group cfp, generated by f i , is isomorphic to G(A*)/G(A).Therefore, is a normal subgroup of G(A*). Q.E.D.
Now we examine some properties of the group PG(A) of polyadic automorphisms of a periodic automaton A. A T-periodic automaton A = (S, C, a) is called equipotent if there exists n E 6'4 such that card(S,) = n for all t E (0, 1, ..., T- 1). The number n is said to be the degree of A. A strongly connected T-periodic automaton A is called polyadic if PG(A) is nonempty. Let us note that every polyadic automaton is equipotent. In general, if there exists k E (0, 1 , ..., T - 1) such that k-G(A) is nonempty, then card(S,) = card(Sl+*md n) for all f E (0, 1, ..., T - 1 ) and nE M. Theorem 8.17. Let A be a polyadic automaton. Then the order of PG(A) is a divisor of the degree of A . Proof. Consider a T-periodic automaton A = (S, C, a). Let f = (fo, f l , ..., fT-1) and f = (fo,f ..., f T - l ) , and let f , f E PG(A). First, we show that if there exist t E (0, 1, ..., T - 1) and S E S, such that f,(s) =f ,(s), then f = f . Since A is strongly connected, for all t' E (0, 1, ..., T - 1 ) and s' E S, there exists x E C' such that a,(s,x) = s ' . Hence f , , ( s ' )=fr,(ar(spx))= a r + l ( m d n ( f ( s > , x ) = ai+l(m,,.j r ) (fxs), x ) =f ,.(a,(s, x ) ) =f ,.(s'). Thus f = f . This means that if f # f , then f , ( ~ ) f f , for ( ~ )all t E (0, 1, ..., T - 1) and S E S,. Consequently, if fzf,then for all f E (0, 1, ..., T- 1) we have fl=gr+l(mdT f r , where gl+l(md r ) is either a cyclic permutation of Sl+l(mdr ) or the composition of cyclic permutations of blocks of R, where n is any partition of Sl+l(mod r ) such that all blocks of 7c are equipotent. Therefore, the number of all such functions g is a divisor of the degree of A . Q.E.D.
8.6. Periodic representations of automata
29 1
8.6. Periodic representations of automata This section is devoted to the problem of finding periodic representations of automata. We present basic concepts and theorems related to this problem, and an algorithm for finding the set of all (2, T)-periodic representations of a given automaton. As it has been shown in Section 8.4, the problem of finding periodic representations of a fixed automaton A is equivalent to the problem of finding periodic partitions of A. Let C be a cover of a set S. By par(C) we shall denote the least partition x of S such that C l x . Let us consider the relation R , G S X S defined as follows: (s, s’) E R , if and only if there exist B,, B,, ..., B , E C such that S E B,, s’ E B,, and B i n B i + , # O for all iE [O, 1, ..., n - 1 ) . It is easy to see that R, is an equivalence relation and par(C) = S/R,. Next, we present a method for finding the minimal input-independent partition of an automaton. Let A = ( S , C, a) be an automaton. Then the minimal inputindependent partition x,(A) of A can be determined by the following recursive procedure:
Let us remark that if x is a partition with the substitution property such that x2x1, then x is input-independent. Thus x,(A) can also be determined as the least partition with the substitution property greater than x,. Next we present a method for finding the minimal cyclic partition of an automaton. Let A = ( S , C, be an automaton. Let us consider the relation R , E S X S defined as follows: (s, s’) E R, if and only if there exists n E No such that a(s, En)na(s’, C”)20. The relation R, is an equivalence relation and the partition SIR, is the minimal cyclic partition @A) of A.
a)
Now we define the representation of an automaton A with respect to an inputindependent partition of A. Let x be an input-independent partition of an automaton A = (S, C, a). The representation of A with respect to x is the automaton A , = @ , (C), a,J where the transition function a, is defined for all B E x as follows: a,(B, C)= B’ if and only if d(B, C) cB’.Let us note that the representation A, of A with respect to x is an autonomous automaton. The representation of an automaton A with respect to the minimal input-independent partition x, of A will be denoted by A, = (x,, {C}, a,). Similarly, the representation of an automaton A with respect to the minimal cyclic partition K, of A
292
8. Time-varying aulomata
will be denoted by A, =(n,, {C}, 8,). Let us remark that the representation A, of an automaton A with respect to-an input-independent partition n of A is not identical with the quotient automaton A/n of A with respect to n, even if A is autonomous. Let AI be the representation of an automaton A with respect to the minimal input-independent partition n, of A. Furthermore, let z,(A) and K C ( A I ) be the minimal cyclic partitions of A and A,, respectively. Then nc(A,) = {{sI S E B and B E B’} IB’ E n&AI)}. We now define a pair of numbers which characterize a connected autonomous automaton. Let A = (S, (o), be a connected autonomous automaton, and let A’ = (S’,(o),3’) be a strongly connected subautomaton of A. For any S E S, the smallest number I ~ No E such that a(s, on)E S’ is called the level of s, and is denoted by l(s). Let S” = S \ S’. For any s E S”, the degree of s, denoted by d(s), is the greatest number n E No such that a@’, on) = s for some s’ E S”. The periodicity index of A is the ordered pair (IA, DA) where lA= max( I($) I s E S) and DA=card(S’). Let A be a direct sum of connected autonomous automata A,, A,, ..., A,, and let (I,. D,), (l,, D,), ..., (I,,, D,,) be a periodicity indices of A,, A,, ..., A,,, respectively. Then the periodicity index of A is the ordered pair (lA, DA) where IA=max(II,I, ..., I,,) and DA=g.c.d.(D,,D,, ..., 0,). The following theorem gives a necessary and sufficient condition for the existence of a (z, T)-periodic representation of an automaton.
a)
Theorem 8.18. An automaton A has a (2, T)-periodic representation if and only if z 1 1 and T is a divisor of D, where (I, D) is the periodicity index of the representation A, of A with respect to the minimal input-independent partition of A.
Proof. The proof follows directly from the definition of the periodicity index of an automaton. Next we define a (2, T)-numeration function of the representation A, of an automaton A with respect to the minimal input-independent partition of A. We will show that this concept is useful in finding periodic partitions of A. Let A = (S, C, 3) be a connected automaton. Let us denote by n, the minimal input-independent partition of A, by A, = (n,, {C}, 3,) the representation of A with respect to n,, and by (I, D) the periodicity index of A,. Let z E No and T E M be such numbers that z I 1 and T is a divisor of D. A surjective function f: n, + (0, 1, ..., T + z - 1) is called a (7,7)-numeration function of AI if for all B E nI the following condition holds: C)) =JTB)+ 1 if f ( B ) E [0, 1, ..., T + z - 2), and JT3,.(B, C))=z if JTB) = T + z - 1. Let A’,= (d,,{C}, a’,) be a strongly connected subautomaton of A,. Furthermore, let us denote by n”, the set xI\K’I,
8.6. Periodic representations of automata
293
and by nT, the set ( B E n”,Id(B) = 0, I ( B ) 2 z and d(d,(B, F-l))=z- I]. A (2, T)-numeration function can be found by the following recursive procedure: (i) take any B E IP,(if z > 0) or any B E x, (if z = 0), and put f ( B ) = 0, (ii) if f ( B ) = t, then f(a,(B, C)) = n ( t ) , where n(t) = t + 1 for t E (0, 1, ..., T + 2 - 2 ] and n ( t ) = z for t = T + z - 1 , (iii) if A B ) # z and a[@’, C)= B, then AB’) = f ( B ) - 1, (iv) ifAB)=z and &(B’, C ) = B and d ( B ’ ) 2 z , thenf(B’)=T+z-l, (v) iff(B)=z and a@’, C ) = B and d ( B ’ ) < z , then eitherf(B’)=T+z-1 or f ( E ’ ) = z - 1. Let us note that in (i) one can freely choose one element from some set, and in (v) one can choose either of two values off. The set of all (7, T)-numeration functions can be found by making all possible choices. Let f be a (7, T)-numeration function of A,. The periodic partition of A induced by f is defined as follows: 5cf= {So, S,, ..., ) , , ,S where S, = {sI s E B and f ( B ) = t } for all t E (0, 1, ..., T + z - 11. For every periodic partition nf one can find the periodic representation induced by f. We now present a complete algorithm for finding all periodic representations of an automaton. Algorithm 8.1. (Finding all periodic representation of an automaton.) Input: A connected automaton A = (S, C, a) numbers z E No and T E M satisfying the conditions of Theorem 8.18. Output: The class of all (7, 7)-periodic representation of A.
Find the minimal input-independent partition n, of A. Determine the representation A,= (q,(C). of A with respect to n,. Find all (z, T)-numeration functions of A,. For every function f from Step 3, determine the (7, T)-periodic partition xf of A induced by f. Step 5: For every partition xf from Step 4, construct the (7, T)-periodic representation of A induced by nj. Step 1: Step 2: Step 3: Step 4:
a,)
If an automaton A is not connected, then it is the direct sum of some connected automata. Therefore, any periodic representation of A is the direct sum of periodic representations of all connected components of A.
8.7. Extended periodic representations of automata In this section we generalize the concepts and results of the preceding section. We discuss basic properties of the extended periodic representations of automata.
8. Time-varying automata
294
Finally, we present algorithms for finding all extended periodic representations of automata. A periodic representation of an automaton exists only for those numbers z and T which satisfy the conditions of Theorem 8.18. Now we define an extended periodic representation of an automaton for arbitrary z E No and T E M. A (7,0-periodic automaton A is called an extended periodic representation of a fixed automaton A’ if there exists a state homomorphism of the fixed analog A* of A onto A’. We say that A is an extended (z, T)-periodic representation of A’. If z=O, then A is called an extended strictly periodic representation of A’, or an extended T-periodic representation of A’. Let us note that, for a given automaton A’ and numbers z E No and T E M,the class of all extended (z, 0-periodic representations of A’ is infinite. In what follows we shall examine only some finite class of extended periodic representations which are useful in technical realization of automata. An extended (7,T)-periodic representation A = (S, C, a) of an automaton A’ is said to be irredundant if the following conditions hold: (i) for all t E (0, 1, ..., T + z - 1) the restriction to S, of any homomorphism of the fixed analog A* of A onto A’ is bijective, (ii) no proper subautomaton of A is an extended (z, T)-periodic representation of A’. It is assumed that all extended periodic representations discussed in what follows are irredundant.
We now examine the relationship between extended periodic representations and periodic covers of automata. We also show that the problem of finding all extended periodic representations of an automaton A is equivalent to the problem of finding all periodic covers of A. Let C = {Sl0, Sl1,..., S’T+T-l)be a (7, 7)-periodic cover of an automaton A’ = (S’,C, Consider the (T, 7)-periodic automaton A =(S, C, defined as follows: S,=S’,x {t} and a,((s, t ) , o)=(a’(s, o), n(t)) for all t E (0, 1, ...,
a’).
a)
T + z - I ) , S E S’, and O E C, where n ( t ) = t + 1 for t~ (0, 1, ..., T + z - 2 ) and n(t) = z for t = T + z - 1. Let A’ = (S*,C, be the fixed analog of A, and let the function f: S’ +S’ be defined as follows: As, t) = s for all (s, t) E S”. One can easily see that f is a homomorphism of A* onto A’, and thus A is an extended the extended periodic periodic representation of A’. We shall call A = (S, C, representation of A’ induced by C. Let us remark that if C is a (7,T)-periodic partition of A’, then the periodic representation of A’ induced by C is isomorphic (but not identical) to the extended periodic representation of A’ induced by C. Let A = (S, C, a) be an extended (z, T)-periodic representation of an automaton A’ = (S’, C, a’), and let h be a homomorphism of the fixed analog
a*)
a)
8.1. Extended periodic representations of automata
295
a’)
A’ = (S*,C, of A onto A’. Consider the cover Ch of S’ defined as follows: c h = { h ( S , ) I t E (0, 1, ..., T + z - 1 ) ) . It is easy to see that Ch is a (2, 7)-periodic cover of A’. The set C, = { C , I h E Hom(A*, A’) and h is surjective) is called the family of periodic covers of A’ induced by A. Let us note that the extended periodic representation of A’ induced by any C E CA is isomorphic to A. There-
fore the problem of finding all extended periodic representations of an automaton A is equivalent to the problem of finding all periodic covers of A. Now we define the concept of a (z, 0-numeration relation as a generalization of the concept of a (2, 7)-numeration function defined in the preceding section. , be a minimal generating set of Let A = (S, C, a) be a fixed automaton, and let S A. Furthermore, let Z E No and T E N , and let f: S,+ (0, 1, ..., T + z - l ) be a function such that o ~ f ( S , ) . The (7,7)-numeration relation of A induced by f is the relation WA,+S x (0, 1, ..., T + z - 1) defined recursively as follows: (i) (s, Js))E WA, for all s E S , for all o E C, where n(t) = t + 1 (ii) if (s, t ) E W A , p then (a(s, CT),n(r)) E WA,f for t E ( 0 , 1, ..., T + z - 2 ) and n(r)=z for t = T + z - l . The cover C,={{sI(s, t ) E W , , j } l f ~(0, 1, ..., T + z - 1 ) ) is called the (7. 7)-periodic cover of A induced by f. The extended (7,T)-periodic representation of A induced by Cf will be called the extended (2, 7)-periodic representation of A induced byf. We now present an algorithm for finding all extended periodic representation of an automaton. Algorithm 8.2. (Finding all extended periodic representations of an automaton) Input: An automaton A = (S, C, a); numbers z E Noand TE M. 0utput:The class of all extended (2, 7‘)-periodic representations of A. Step 1: Find a minimal generating set S , of A. Step 2: Find all functions f: SG+ (0, 1, ..., T + T - 1) such that o ~ f ( S , ) . Step 3: For every function f from Step 2, determine the (7, T)-numeration relation W A , fof A induced by f. Step 4: For every relation W A , ffrom Step 3, determine the (‘5, T)-periodic cover C, induced by f. Step 5: For every cover C, from Step 4, construct the extended (‘5. 7‘)-periodic representation of A induced by f. If numbers ‘5 and T satisfy the conditions of Theorem 8.18, then for every (‘5, T)-periodic representation A’ of an .automaton A (determined by Algorithm 8.1) there exists an extended (z, 7‘)-periodic representation A“ of A (determined by Algorithm 8.2) such that A’ and A” are isomorphic.
296
8. Time-varying automata
Next we show that the problem of finding extended periodic representations of
an automaton may be restricted to the class of autonomous automata. First we introduce some additional definitions. Let A = @ , I;, be an automaton. A cover C of S is called an input-independent cover of A if for every B E C there exists B' E C such that a(B, C)G B ' . A cover C of S is called a simple input-independent cover of A if for every B E C there exists B' E C such that a(B, C) = B'. Let C be a simple input-independent cover of an automaton A = (S, C, The representation of A with respect to C is the automaton A, = (K,, (C), 3,) where S, = C and a,(B, C) = a(B, C) for all B E S,.
a)
a).
Let A = (S, C, a) be an automaton. The basic cover C, recursively as follows:
of A is defined
(a@,
The extended basic cover CAof A is the cover I;") I B E C, and n E No]. Let us note that the basic cover C, of an automaton A is an irredundant inputindependent cover of A, and the extended basic cover 6 , of A is a simple inputindependent cover of A. The concept of an extended basic cover of A is analogous to that of the minimal input-independent partition of A. One can easily see that C, = max(C',). Furthermore, if C is any periodic cover of an automaton A , then C, I C and C'A 5 C. The following theorem describes the relationship between an extended periodic representation of an automaton A and the representation of A with respect to the extended basic cover of A.
Theorem 8.19. Let A', and A*, be the representations of automata A' and A* with respect to the extended basic covers of A' and A*, respectively. If A* is the fixed analog of an extended (2, T)-periodic representation of A', then A', is the fixed analog of an extended (7,T)-periodic representation of A',. Proof. Let A * = (S*, C, a') be the fixed analog of an extended (7, T)-periodic representation A = (S, C, a) of an automaton A' = (S', C, and let C' and C' be the extended basic covers of A' and A', respectively. Denote by A',=(S*,, ( C ) , X,) the representation of A* with respect to c", and by A ' , = (S,' (C), a',) the representation of A' with respect to C'. Since A* is the fixed analog of an extended (7, n-periodic representation A of A', there exists a homomorphism h of A' onto A'. Consider the function h,: P(S') + P ( S ' ) defined as follows: h,(B) = {h(s)I s E B } for all B E P(S'). We show that h, is an homomorphism of A', onto A',. Let B E S*c. By the definition of the extended basic cover of A*,
a'),
8.7. Extended periodic representations of automata
297
there exist S E S* and n E No such that B = a*(s, En). Hence h,(B) = h(a*(s, C”))= a’(h(s), Cn)E S’c. Furthermore, we have hc(X,(B, C)) = h(a*(B, C))= a’(h(B), C)=a’c(hc(B), C). Thus, the function h, is a homomorphism of A*, onto A ’ p Note that . r c = ( ( B I B c S , } l t ~(0, 1, ..., T + T - ~ ) is) a (T, 7)-periodic partition of A * p Therefore, the periodic representation of A*, induced by .rc is an extended (2, 7)-periodic representation of A’,. Q.E.D. Corollary 8.9. Let A’, be the representation of an automaton A’ =(S’, C, 3’) with respect to the extended basic cover of A’, let A, = (S,, (C),a,) be an extended (2, 0-periodic representation of A’c, and let h be a homomorphism of the fixed analog A*, of A, onto A’c. Furthermore, let A = (S, C, a) be the (7, 7)periodic automaton defined as follows: S, = {sI s E h(B) and B E S,, ,} and a,(& B ) = ~ ’ ( s , 6) for all t E (0, 1, ..., T + z - l ) , S E S, and B E C. Then A is an extended (T, 7)-periodic representation of A’. Theorem 8.19 and Corollary 8.9 provide another method for finding extended periodic representations of an automaton. This problem can now be restricted to the class of autonomous automata. Consequently, the computational complexity of this method can be reduced. Now we present, in a formal way, an algorithm resulting from Theorem 8.19 and Corollary 8.9. Algorithm 83. (Finding all extended periodic representations of an automaton)
Input: An automaton A = (S, C, a); numbers T E Noand TE N. 0utput:The class of all extended (2, 0-periodic representations of A. Step 1: Find the representation A, of A with respect to the extended basic cover of A. Step 2: Using Algorithm 8.2, determine all extended (T, 0-periodic representation of A,. Step 3: For every extended (T, 2‘)-periodic representation of A, from Step 2, construct an extended (2, T)-periodic representation of A using Corollary 8.9. Finally, it should be pointed out that the “cost” of a realization of an extended a’) of an automaton A is determined by max(card(S’,)ItE (0, 1, ..., T + z - l ) ) . (T, 0-periodic representation A’ = (S’, C,
8. Time-varying automata
298
Exercises
8.1. Prove that every infinite automaton with a countable state set is quasiequivalent to a time-varying automaton. 8.2. Give an example of any non-regular context-free language accepted by a time-varying automaton. 8.3. Prove that the family of languages accepted by time-varying automata is closed under the set operations of union, intersection and complement. 8.4. Give a counterexample to show that the family of languages accepted by time-varying automata is not closed under the operation of concatenation. 8.5. Prove that the set of all cyclic partitions of an automaton, together with the operations of sum and product of partitions, forms a lattice. 8.6. Prove that if the group of automorphisms G(A) of an automaton A is product of two normal subgroups of G(A) such that one of them is a cyclic group, then A has a nontrivial periodic decomposition. 8.7. Prove that the representation of the direct product AxA’ of automata A and A’, with respect to the minimal input-independent partition of A xA’, is isomorphic to the direct product A,xA’, where A, and A’, are the representations of A and A’, with respect to the minimal input-independent partitions of A and A’, respectively. 8.8. Prove that if an automaton A is surjective, then the basic cover of A is equal to the extended basic cover of A.
Bibliographic note The study of time-varying automata originated in Gill [2]. It is worth noticing that some problems related to the theory of time-varying automata have been studied earlier (and yet later) within the framework of the theory of fixed automata in Huffman [21, Hartmanis [l] and Yau [l]. The first attempt to set up a new system of concepts has been made in Gill [2]. This trend has been followed in Agasandian [l]; Dauscha, Nurnberg, Starke and Winkler [l]; and Hwang [3]. A similar course with regard to the Turing machine has been adopted in Vollmar [ll. There is a good deal of publications related to the theory of time-varying automata. We refer here only to those most significant, in the authors’ view, for
Bibliographic note
299
the development of the theory of time-varying automata. The family of languages accepted by time-varying automata has been studied in Salomaa [2, 31, and Hwang [4]. Structural properties of time-varying automata have been examined in Felea [l], Simovici [l], Starke [l], and algebraic ones in Barnes [l], and Gnymala-Busse [l, 3, 41. Some methods of the theory of categories have also been applied to time-varying automata in Arbib and Manes [l], and Chaudry [ l , 21. Much attention has been focused on some particular classes of time-varying automata, like linear automata (in Duel [ l , 2]), permutation automata (in Felea 1211, etc. A great deal of research has been devoted to the class of periodic automata. The most interesting results concern; structural properties of periodic automata (in Gajewski [2, 3, 41, Grtymala-Busse [2], and Hwang [l]), decomposition of periodic automata (in Grzymala-Busse [61, and Hwang [21), periodic representation of automata (in Gill and Flexer El], Grtymala-Busse [8], and Reischer and Simovici [l]), and extended periodic representation of automata (in GrzymalaBusse [8], Gajewski [l], and Guha and Yeh [l]). Extensive references to the theory of time-varying automata can be found in Miadowicz [5].
This Page Intentionally Left Blank
9. Transforms and extensions of automata
This chapter introduces the concept of an automaton transformation associated with functions defined in the state set. Special emphasis is placed on properties of transforms, i.e. mappings associated with automorphisms, are examined. From the technical point of view the operation of transformation is equivalent to the addition of a combinational converter, to the input or output of the memory block, realizing an encoding of the state set. In the sequel of the chapter associations between transforms and a special class of periodic automata called extensions of automata are presented. Let A = (S, C, a) be an automaton and let cp: S -+S. Then the right transform of automaton A associated with the function cp is an automaton A .cp = (S, C, a,) such that
Analogously we define the left transform of automaton A associated with the function cp as the automaton cp-A = (S, C, ,$) such that (VS E S)(V0 E Z)[,d(S,
0)= Cp(d(S,
a))].
In the further considerations it will be convenient to use the concept of an automaton as a pair (S, J), where S is a state set and J is a set of input functions. Let A = (S, C, dA) and B =(S, C, 3,) be automata. Then by JA and J, we denote sets of input functions to indicate the associations of an automaton meant as a mple with an automaton meant as a pair. We use the notation (S, C, a,)&@, JA) and (S, C,a,)Li(S, J,), respectively. For X E C', functions implied by transitions in the automata A and B will be denoted by f , , A and f,,, respectively.
302
9. Transforms and extensions of automata
9.1. Transforms of automata 9.1.1. Basic properties of transjorms
A transform of an automaton A is an automaton obtained by the use of single or multiple operations of conversion, where as operations of conversion we take au tomorphisms. Let a function g : S -+ S be an automorphism of A = (S, J). Then the transform A . g is equal to g . A and is said to be a simple transform of A. An automaton B = (S, JB) is a complex transform of A = ( S , J) if there exists a sequence A , , A,, ..., A,,, of automata and a sequence g,, g, ..., g,,,-l of functions such that: (1) A, = A , A , = B , (2) for each i E [ 1, 2, ..., m - 1) the function gi is an element of the group of automorphisms G(Ai) and Ai+l = A ; .gi. Simple and complex transforms will be sometimes called simply transforms.
By &4) we denote the set of all transforms of an automaton A . Let J(A) = {Al, A,, ..., A,,,} be the set of transforms of A. Then G L A ) is the group generated by the set G ( A , )u G(A,) u .,. u G(A,,J, i.e.
Furthermore, T(A) denotes the least common multiple of orders of elements in GJA), i.e. T(A) = Icm{o(g) I g E GJA)}.
Lemma 9.1. Let A = (S, C, aA)4(S, JA) and B = (S, C, 8,) & ( S , JB) be automata such that B is left transform of A associated with a function 9. Then G E C imp1ies fc,B = 9 .fc,A . Proof. For each
SE
S we have
Q.E.D. Lemma 9.2. Let A = ( S , C, aA)4(S, JA) and B = (S, C. aB)A (SJ,) be automata such that B = g . A is a simple transform of A . If x E CCk),then f,, = g k .f,,A.
Proof. Let x = G,G,...ok, where ol,02,..., G
~ C. E
We have that for each s E S
9.1. TransJGorms of automata
303
and by Lemma 9.1:
Q.E.D. Theorem 9.1. Let A = (S, C, aA)G(S,JA) and B = (S, C, 3,) k (SJB) be automata such that there exists a sequence A, = A , A,, A,, ..., Am-,, Am = B of automata and a sequence goE G(A,,), gl E G(A,),, ..., gmd1E G(A,-,) of automorphisms such that for each itz (0, 1, ..., m - 1) we have Ai+, = gi.Ai.If X E C(k), then fx, B = gm-lkgm-2k...gOkf,A =fx, Agokglk..*gm-lk. Proof. By Lemma 9.2 we have:
Q.E.D.
Theorem 9.1 yields the following corollaries. Corollary 9.1. If B =(S, JB) is the transform of an automaton A =(S, JA) associated with automorphisms go, g,, ..., g, i.e. B = g,,,-lgm-2.. .go .A, then for each positive integer k we obtain JBk = gm-lkgm-2k...g:JAk. Corollary 9.2. Let A and B be automata, and let go, g,, ..., gm-l be automorphisms fulfilling the assumptions of Theorem 9.1. Furthermore, let k = lcm(o(g,,), o(gl), ..., o(g,J). Then for each positive integer r
holds. Corollary 9.3. Let p = T(A), where A is an automaton. If A,, A , , then AP = A $ = Alp = ... = Am-,P
..., A,,,-, E J(A),
304
9, Transforms and extensions of automuta
In the next theorems we present some properties of transforms of onto automata, controllable automata and we consider the problem of automorphismpreserving transformations. Theorem 9.2. If A = (S, C, 8,) is an onto automaton, then the automaton B = (S, C, = g - A , where g E G(A), is also an onto automaton.
a,)
Proof. Because A is an onto automaton, thus for each s E S there exist o E C and s’ E S such that 0) =g-’(s). Hence 0) =gaA(s’, 0)=gg-’(s) = s. From the fact that for any S E S there exist s’ E S and o E C such that d,(s’, o) = s it follows that B is onto.
a,($’,
a($,
Theorem 9 3 . A is a controllable automaton if and only if J(A) is a set of controllable automata. Proof. ( j )Let B = (S, C, 3,) = g . A be a simple transform of a k-controllable automaton A = (S, C, 3,) associated with an automorphism g E C(A). Let s and s’ be states in S. Because A is a k-controllable automaton, there exists a function f,, A ( ~ E) JAk such that f,,A ( ~ = ) g-k(s’). By Lemma 9.2 we have that
,
We have proved that for each s, s’ E S there exists f,, E JBk such that f,, ,(s) = s’, and therefore B is a k-controllable automaton. Any automaton A’ in the set J(A) of transforms of A can be obtained by successive simple transformations of A , and hence A’ is k-controllable.
(e) Analogous to the above part of the proof. Q.E.D. Theorem 9.4. Let A = (S, C, 3,) be an automaton. Let g and h be automorphisms of the automaton A such that hg = gh. If B = (S, C, a,) is the simple transform of A associated with g, then h~ G(B). Proof. From assumption it follows that for any s E S and any
(3
E
C
holds. Hence, h is an automorphisms of B . Q.E.D.
9.1. TransJ4orms of automata
305
Corollary 9.4. If the group of automorphisms G(A) is abelian, then for each g e G(A) we have that G ( A ) I G ( g A ) .
Theorem 9.5. Let A = (S, C, a,) be an onto automaton. If g, he G(A) and g h f hg, then h E G(gA).
Proof. Let B denote an automaton (S, C, as) = g A . From g h # h g it follows that there exists s E S such that gh(s)# hg(s). Because A is an onto automaton, there exist s’ E S and CT E C such that a,(s’, CT)= s. Hence
Therefore
and consequently h f G(B).
Q.E.D. Next, we can ask whether for a controllable permutation automaton A the condition G(A)I G ( A .g ) or G ( A g) 5 G(A) holds. If yes then as a result of a simple transformation of such an automaton, the group of automorphisms of the transform is a subgroup or a supergroup of the group of automorphisms of the initial automaton. The smallest automaton, with respect to the cardinality of the state set and the cardinality of the input alphabet, which contradicts the above thesis and known to the author is a state automaton with four-element input alphabet. An analysis of this automaton is presented in Beyga [23. 9.1.2. Transforms of controllable permutation automata
In this section properties of transforms of controllable permutation automata will be considered. We assume that A = (S, C, a,)A (S, JA) is a controllable permutation automaton. It follows from Theorem 9.3 that the set J(A) of transforms of A is a set of controllable automata and hence it is a set of strongly connected automata. Furthermore, it follows from the definition of transform that J(A) consists only of permutation automata, and from the fact that B E J(A) is strongly connected it follows that the order o(g) of any automorphism gE G(B) is a divisor of card(S). Therefore gcQr4Q=id(S).The last equality implies
9. Trangorms and extensions of automata
306
Because for each automaton A and any positive integer i we have that G(A)I G(Ai), G(B)I G(Bcar49)I G(Acar49)and GAA) = < u G(B)> I G(A""'49). B E
44
For the simplification of further considerations we denote by n the cardinality of the state set S, i.e. the number card(S). Furthermore, let for any B E J(A) and for any i E W, the symbol JB, i(md ), be defined as follows: J B , i(mod
n)
-
v
JBk.
k = i(mod n)
Let us note that we can write
Theorem 9.6. If B E JA), then
( 2 ) J ~q m, d
(3)
),
F(B) =JA,
is a normal subgroup of the group F ( B ) , q m d n)
. ,when: .fE
J B , l(mod n)'
Proof. (1) JB, O(md ), contains the identity element id(S), because J B , q m d is the characteristic group of the automaton B". Let f E JB, ,,). There exists a reverse element f1 E <JB, l(mpdnp such that ffl =id(S) E JB, O ( m d ,). It Can be WflY shown that f - l E JBan+J,where j+i=O(mod n). Let f c JBbn+i. We have that JA. q m o d
n)f=
J B , q m o d n ) f z JB. O(mod n{Bbn+i
Hence Card(JA, have:
qmd
JB, i(mod
n).
"fl= CXd(JA, q m o d ,,I)I CXd(JB, qmd
The above inequality implies
,,)). Simul~WuSlywe
9.1. Transforms of automata (2) JB. i
307
It follows from the proof of (1) that iff E JB, i ( m d ,), then fJA, O(mdnf-l= is a normal subgroup of the group ( d n$-' = JA. q m d n)' Hence JA, q m d n)
F(B) = (IB>.
Q.E.D.
Let B = (S, h -JA)= h . A be a transform of an automaton A = ( S , .IA).We say that B is an extended transform of A if h~ GJA). The set of all extended transforms of A is denoted by S ( A ) . Now, we shall try to compare'properties of automata with respect to the operation of transformation. We say that the structure of transforms of A and B is similar if the following conditions holds:
(2) there exists an extended transform B, E S(B) such that for any h E G J A ) the groups of automorphisms of extended transforms h - A and h e B A are equal, i.e. G ( h . A ) = G(h.BA). Lemma 93. Let A = (S, JA) be such an automaton that JA = F ( A ) . Then J A ) is a set of simple transforms of A . Proof. Suppose that J(A) is not a set of simple transforms. Then there exists B E J(A) such that B = g s 1- A and g, E G(A). The function g, is an automorphism of the automaton g, . A , hence for each f~ g, .JA we have that g, *f =f g,. Notice that from the assumption JA = F(A) it follows that id(S) E JA and consequently g,(gl id(S))= (gl id@)) -g2, i.e. g2g1= g1g2 and g1-l ' g , = g, g1-l. From the last equation and from Theorem 9.4 we have that g , ~G(g1-' - g l - A ) = G(A) which contradicts the assumption that g2E G(A). Therefore g g l E G(A) and the transform B = g g l A is simple. Q.E.D.
-
-
-
Corollary 9.5. If for A = (S, JA) the condition JA = F ( A ) holds, then: G(A) = G(A""'4~)= G J A ) , G ( g . A ) 5 G(A) and G(g . A ) contains automorphisms in G(A) commutative (2) with g, where g e G(A), (3) J(A) = J ( 4 . (1)
9. Transforms and extensions of automata
308
Theorem 9.7. Let A = (S, JA) and B = ( S , JB) be automata such that
Then the structure of transforms of A and B are identical. Proof. We shall prove that the automaton B fulfills the condition (2) imposed for the automaton B when we compare.the structure of transforms. Notice that from Lemma 9.3 it follows that each extended transform of the automaton A is a simple transform of the form g . A , where g E G(A). Furthermore, G ( g - A )= { h E G(A) I hg = gh} = C(g B ) because G(A) = G(B).
-
Q.E.D. We shall define now the concept of a complement of an automaton, and next we shall prove the complement characterizes uniquely the set of automata for which the structures of transforms are identical. Let A = ( S , JA) be an automaton. An automaton A* = ( S , JA*) is said to be the complement of the automaton A , if JA* = F*(A).f, where: F*(A)= (permutationf' of the set S I (*g E G&A))Lf'g= gf'l}, ( 2 ) f is any function in JA. (1)
Theorem 9.8. The complement A* = (S, JA*) of A = ( S , JA) is defined uniquely. Proof. Suppose that JA* =F*(A) .fi for any fl E JA. It suffices to prove that if f2E JA, then F*(A).fi = F*(A).fi.Let card(S) = n. Then we have: F(A") IF*(A). ), - JA, a(,,,& ,,). Simultaneously JA c J A , there exists f E F(An) such that f 2 =ffi and
fl = F(An).fl.
From this it follows that
Q.E.D.
Theorem 9.9. The structures of transforms of a given automaton A = (S, JA) and its complement A* = (S, J,*) are identical. Proof. It suffices to prove that the group of automorphisms C ( h . A ) and C ( h . A * ) are equal for each h~ G J A ) . Notice at first that JA c J A * and hence G ( h . A * )5
9.1. Trangorms of automata
309
G ( h . A ) . Suppose that g E G ( h . A ) . Let f be any function being in J A . Because JA* =F*(A).f' for any f' E JA' (by Theorem 9.8), there exist a E F*(A) and f 1 E J A such that f = ah. Hence g(hj) = g(hafl) = gahfl = ag(hfl)= a(hfl)g= ahflg = h(afl)g = hfg and therefore g E G(h .A*). Thus G(h . A ) = G(h .A*). Q.E.D.
Theorem 9.10. Let the structures of transforms of A = (S, JA) and B = (S, JB) be identical. Furthermore, let C E J(B) be such an automaton that ("he G J A ) ) [G(h. A ) = G(h .C)]. Then the complements of A and C are equal, i.e. A* = C*.
Proof. Let fA E JA and f B E J , and let A' E J(A) be a complex transform of A associated with automorphisms gl, g2, ..., g,, i.e. A' = g,,,gm-l.. .g1 * A . Assume that h~ G(A'). Then:
From the fact that h(fJB-') =(fJB-')h and from the definition of the group G J A ) = GJA') it follows that for any gE G J A ) the equality g(fdB-') = (fJB-')g holds. Thus fAfB-' E F*(A). Hence
Corollary 9.6. If the structure of transforms of A = ( S , JA) and B = (S, JB) is identical, then B is an extended transform of an automaton C=(S, J,) such that J c c J A * is the set of input functions of the coniplement A* = (S, JA*) of the automaton A . 9.1.3. Transforms of automata with a total input subautomaton
In this section we assume that an input subautomaton AT(A)of an automaton A is total, where T(A)= lcm (o(g) I g E GJA) I. A characterization of transforms of automata fulfilling this assumption is given in the theorems presented below. Theorem 9.11. Let B =g,,,gm-l...gl . A be a transform of an automaton A = (S, C, aA)h(S,JA) and let x , Y E C@) be input words of the length k. If for any S E S the quality f,, B(s) =A,B ( 4 holds, then f,, B = f y , B .
9. Transforms and extensions of automata
310 Proof. From f,, &) =fy,
Let z E 2P), where r
B ( ~ )it
follows that:
+ k = O(mod T(A)). Hence
fz. A *fx. A = f x z , A fz, A ' f y , A = f y z , A
JA. qmod T(A))p JA, qmod T(A)).
=fz, A .&, From the assumption that AT(A)is total and Obviously, f,,A f,, from the last equality it follows that f,,Af,, A =fz,dy, Because each function f,E F(A) must be a permutation (if not, AT(A)is not total), hence f,, A =fy, A , which directly implies that f,, =fy, B . Q.E.D.
By the above theorem and the proof of Theorem 9.6 we can state the following corollary. Corollary 9.7. If the subautomaton AT(A)of the automaton A = (S, C, is total, then:
(3)
F(A) = F(AT(A)). =
(4)
F(AT(A))is a normal subgroup of the group F(A).
A>
F(AT(A)),where
CJE
aA)i2(S,
JA)
C,
Theorem 9.12. Let for any X E C* symbols p,, A and y,' A mean functions defined on F(AT(A))and C(AT(A)), respectively, in such a way that:
Then (1)
p,,
(2)
for each x ,
A,
y,
A
are automorphisms of the groups F(AT(A))and G(AT(A)), YE
C* we have that
9.1. Transforms of automata
311
Proof. (1) Because F(AT(A))is a normal subgroup of the group F(A), then Px, A must be an automorphism of the group F(ATOL)).Let f E F(AqA)) and g E G(AT(A)). Then
and hence yx, A(g) E G(AT(A)).Thus yx, A is an automorphism of the group G(ATCA)). (2) If X , y E C(k),then from Corollary 9.7 it follows that there exist f,, A E JA and f i , f 2 E F(AT(A))such that f x , A =fa, Akfi and f,, A =fa, ACf. Thus, for each g E G(AT(A)we have
The proof that y,
A(&?)
= ,y , A k ( g ) is analogous.
Q.E.D.
Theorem 9.13. Let B = g , A be the left transform of an automaton A = ( S , C, dA)4(S, .IA) associated with an automorphism g, E G(AT(A)).Then there exists g, E G(AT(A))such that B = A . g .,
Q.E.D.
Corollary 9.8. If B = A , g f is the right transform of an automaton A associated with an automorphism gp E G(AT(A)),then the left transform ya, A(&,) . A is equal to the automaton B. Theorem 9.14. Let B be a transform of an automaton A = (S, C, 3,) a(S, J A ) . Then Px, A = P x . B . Proof. There exists g, = G(AT(A))such that B = g, - A . Suppose that x = 0102.. .(Jk, where ol,02...., okE C. Let f E F(AT(A)).Then
3 12
9. Transforms and extensions of automata
Q.E.D.
9.2. Extensions of automata
In this section we introduce the concept of extension of an automaton which is
a special case of the periodic sum of automata and we present conditions which define isomorphisms of extensions of automata. Let us recall at first some definitions from Chapter 8. If So, S,, ..., Sr-lare sets and cp,: S , + S , , ql: S, +S2, ..., (p-,: S, +So are functions, then the function yt: So u S, u .. . u Sr-l +Sou S, u ... u S,, such that yt = (q,, cpl, ..., CP,-~)is said to be the serial composition of components 'po, (p,, ..., cpr-,. Let the components cpo, cp,, ..., cpr-l of the composition yt be one-to-one and onto. Then we define Up= (id(So), id(S,), ..., id(&-,)), and for any i~ M:
Let A, = (So, C, do), A , = (S,, C, a,), ..., A,, = (Sr-l, C, &-,) be automata and w= (q,, cp,, ..., cp,,) be the composition of the functions cpo: So +Sl, 9,: S, +S2 , ..., cp: Sr-l -+S,,. Then the periodic automaton A+ = (S+, C, where S+ = (So, S,, ..., SF-,)and
let
a+),
is called the periodic sum of automata A,, A , , ..., associated with the function y ~ .If w is the composition of isomorphisms (P,E Is(Ao, A,), (P, E Is(A,, AJ, ..., (PE Is(Ar-,, Ao), then the periodic sum defined above is said to be the
9.2. Extensions of automata
313
extension of the automaton A , and it is denoted by ext,(A,, yr). The symbol EXT,(A, y.f) denotes the class of all extensions of A with the period r.
Let A + = ext,(A,, yr) be the extension of an automaton A,. Then the function yr is called the natural polyadic automorphism of the extension A+, and the function y~' - the natural automorphism of A+. Theorem 9.15. Let A,+ = extAA,, g) and A,+ = extAA,, h) be two extensions of the automaton A, = (So, C, a,), where g = (go, g , , ..., g-,), h = (h,, h,, ..., /I,.-,). If gr = h,, then the extensions A,+ and A,+ are isomorphic.
Proof. For any i E (0, 1, Then: (1)
for each ie (0, 1, fr+l
..., r - 1 )
we define f i : Si +Si to be equal to h'g-'.
..., r - 2 ) ,
SE
a1, .+(s,0 )= h'+'g-'-'griji(s, 1
(2) for i = r - 1 , S E S,-, and
OE
Si,
OE
C:
0 )= h'+Ig-iai(S, 0)
2
From the above equalities it follows that f = (fo,f,, ..., f,,) the periodic automata A,+ and A,+.
is an isomorphism of Q.E.D.
Theorem 9.16. Let A + = ext,(A,, g ) and B+ = ext,(Bo, h) be extensions of onto automata A , = ( S , , C, aAo) and B,=(T,, C, a,,), respectively. Furthermore, let g r = (ao, a,, ..., a,-l) and h' = (bo, b,, ..., b7-J. The extensions A+ and B+ are isomorphic if and only if there exists a function f,: So + To such that (1) fo is an isomorphism of the transforms a,. A,' and b, Bor,
9. Transforms and extensions of automata
314
(2)
for each x , y E C(‘1 and s, s’ E So we have that
holds.
Proof. From the assumption that A, is an onto automaton it follows that for each S E So and for each i E (1, 2, ..., r - I ) there exist s’ E So and X E Z(I1 such that aAo(s, x ) = s’. Thus, for each i E ( 1, 2, ..., r - 1) we can define a one-to-one and onto function fi: Si + Ti in the following way: if s E Si, x E C(’1 and s’ = g’aAO(s, x ) , then fi(s’) = hiaBo(f0(s),x). In the following three steps we prove that f = (fo, of the extensions A+ and B+. (1)
Let s’E So and
(3
(2)
k t s’ =gid,,(s,
x), where S E So,
(3)
Let s’ = g‘-’aAo(s, x), where x E
E
fl,
..., f r - l ) is an isomorphism
C. Then
XE
C(’3 and
W-1)
iE
(1, 2, ..., r - 2 ) . Then
and s E So. Then
Suppose now that the extensions A+ and B+ are isomorphic and that f = (Lo, fl, is in Is(A+, B+). Let S E So and X E W).Then we have:
..., f,-l)
315
9.2. Extensions of automata
1.e.:
-
f o E Is(a, Aor, bo Ear). Let
..., r - 1) and let aA0(s,x) = aA0(s',x), where Then the following sequence of equalities is true:
y E C('3 for any i E [ 1, 2,
X,
s, s' E So.
Theorem 9.16 gives the necessary and sufficient conditions for the existence of an isomorphism of extensions of onto automata. Now we express these conditions for any automata.
Theorem 9.17. Let A+ = ext,(Ao, g) and E + = ext,(Eo, h) be extensions of automata A,= (So, C, aA& and E , = (To, C, as&, respectively. The periodic automata A+ and B+ are isomorphic if and only if there exists a sequence cpo, cpl, ..., cp,-l of one-to-one and onto functions mapping So onto To such that the following two conditions hold: (1)
for each i E [17 2,
(2)
for each
SE
..., r - 2 I 7 S E So and O E C:
So and
(TEZ:
Proof.Suppose that the above defined functions cpo, cp,, ..., cpr-l exist. For any i E [O, 1, ..., r - 1) we define a one-to-one and onto function f i : Si + Ti in such a way that f i = hicp&.
9. Transforms and extensions of automata
3 16
..., r - 2 ) ,
(1)
Let i g (0, 1,
(2)
Let s E Sr-l and
0E
SE
Si and
O E C.
Then
C. Then
From the above equalities it follows that the function f = ( f o , isomorphism of the periodic automata A+ and B+.
fi,
..., fr-l)
is an
Suppose now that A+ and B+ are isomorphic and that fcz Is(A+, B+), where f is the composition of f o , f l , ..., fr-l, For any i E ( 0 , 1, ..., r - 1 ) we define qi: So 4 To such that qi= hxg. It can be easily shown that 'pi fulfills the conditions (1) and (2) of the theorem. Q.E.D.
In the last theorem we give a necessary condition for the existence of an isomorphism of extr(Ao, g) and ext,(B,, h) if transforms of A, and B , are isomorphic. Theorem 9.18. Let A+ = ext,(A,, g ) and B+ = ext,(B,, h) be extensions of automata A, = (So, C, aA0)and B,= (To, C, respectively. Furthermore, let fo be an isomorphism of transforms a . A , and b.Bo, where U E G(A,), b € G(B,). If 'png'u-' = hrb-'q,, then the extensions A+ and B+ are isomorphic.
aBo),
Proof. For each i E (0, 1, ..., r - 1 ) we define a one-to-one and onto function 'pi: Si+ Ti in such a way that qi= b-'cp0ai.
9.2. Extensions of automata
(1)
For any s E So and
(2)
If
i E
(0, 1,
3 17 (3 E
..., r - 2 ) ,
E we have
S E So
and O E C, then
b-'-'cpdldA0(ai(s),(3) = b-'-'bdEO(cp,ai(s),(3) =
We have proved that the functions go, 'pl, ..., qPl fulfill the conditions (1) and (2) of Theorem 9.17 and hence A+ and B+ are isomorphic. Q.E.D.
Bibliographic note
The definitions of transformation and transform was introduced in Beyga [ll. The detailed discussion of properties of transforms can be also found in Beyga [21 and [31. The concept of the extension of an automaton as a special case of the periodic sum associated with isomorphisms was given by Grzymala-Busse. Results dealing with extensions of automata were also presented in Beyga [l-31, Grzymala-Busse [ 2 , 11, 121, Mikolajczak [l, 3, 7, 101.
This Page Intentionally Left Blank
10. Periodic sums of automata
This chapter is mainly devoted to investigations of periodic sums of automata. Mutual relations between such objects as the state periodic sum of automata, the periodic extension of an automaton and the input subautomata of an automaton are presented. The influence of these interdependencies on such structural properties of the state periodic sums as perfectness and state independence are discussed. The main structural properties of the state periodic sums with special emphasis on problems of the strong connectedness of the fixed analog of the state periodic sum are investigated. We consider the influence of the structure of automata to be composed into the periodic sum upon the connectedness of the fixed analog of this periodic sum. We discuss the problems of retrievability, controllability and also some problems concerning functions preserving operations. Finally, we consider the periodic sum of automata with input mappings.
10.1. Introduction The class of automata discussed in two previous chapters is characterized by the periodicity of operation with some fixed number r called the period. There comes up the question: how we can achieve a composition of given automata, not necessarily periodic, such that the received object is a periodic automaton. One solution was proposed in 1973 by Grzymala-Busse [lo]: an introduction of the notion of the periodic sum of finite automata. In Mikolajczak [ 111 the generalized notion of the periodic sum is presented. From the syntactic point of view the periodic sum does not make any change in the class of recognized languages in Chomsky classification or any extension of the computable class of functions. However, from the semantic point of view, the realization, in different division of time, of an arbitrary strictly periodic equipotent automaton with period r, is possible. It means that we are looking at an automaton as a transformer, and construct this object for a given set of automata and a set of permutations of n states. The periodic sum represents, in that sense, the general tool in the timevarying automata theory and also in the problem of analysis and synthesis of digital circuits. There exists another question, interesting from the synthesis of automata point of view, namely the question whether it is possible to treat an arbitrary equipotent strictly periodic automaton as state isomorphic to the state
10. Periodic sums of automata
320
periodic sum of some class of automata. There exists a positive answer to this question with two different approaches: (1) if automata A,, A,, _..,A,, and mappings yf,, i = 0 , 1, ..., I - 1 are fixed then an arbitrary periodic equipotent automaton V is state isomorphic with some state periodic sum; are fixed and come from some set of (2) if automata A,, A,, ..., A,, automata such that an arbitrary periodic equipotent automaton can be obtained as the composition of mappings yri, i = 0 , 1, ..., r - 1 and mapping occurring in this set of automata, then an arbitrary periodic automaton V is state isomorphic with some state periodic sum. If in addition to state mappings y.fi we introduce mappings on input alphabet, then by means of the same set of automata A,, A ,, ..., A,, we can generate a larger set of periodic equipotent automata than for state periodic sum. This fact motivates an introduction of different generalizations of the state periodic sum. Let V , = (So, C, a,), V , = (S,, C, a,), . . ., Vr-, = ( S r - , , C , a,,) be strictly periodic automata with periods To, TI, ..., Tr-, such that
ISi, ~i-11= lSi+,(moh),
019
,,
and the transition functions are sequences of transition functions ai= (ai, , ai, Si, Ti-l +Si+,, and .. ., a , Ti-l), where i=O, 1, ...r - 1. Let functions pi: C + X and let pair of functions (wi, pi) be bijections for i = 0, 1, .. ., r - 1. The periodic sum of automata V,, V , , ..., V,, with varying input transformations (yi,pi), i = 0 , 1, ..., r - 1 is a strictly periodic automaton r-1 V = (S+, C,a+) with period T = C Ti such that i=O S+=(So, SIP ...) Sr-l) and a + = @ 0, , 30, 1, ..., 3.0, To-,, 31, 0. di,,,, ..., 3.1, Ti-, o, dyl, ._.,~ d + , - ~Tpl-l), , and the transition funchon is defined as ... , ..., follows:
wi:
,,
a+,,T1-,(S.
(J) = w3,, T J S .
,
I
PI(@)
for each S E S,, TI-l and (JEC. This periodic automaton will be denoted as psum,(V,(y,, p,)). If V,, V , , ..., Vr-l are fixed automata A,, A,, .. ., A,, and if p,= id, for i = O , 1, ..., r - 1, then V is the state periodic sum of automata A,, A,, ..., A,, and will be denoted as psum,(A,,
w,).
10.1 Introduction
32 1
In this chapter we investigate mainly properties of the state periodic sums of automata. Figure 10.1 shows a scheme of a composition of automata A,, A , , ..., A,, into the state periodic sum.
Fig.lO.1. Composition of automata
4, A,, ..., 4-,into the state periodic sum
10.2. Connections of the periodic sum with the periodic extension and with input subautomata
are isomorphic Based on Chapter 9 one can say that if A,, A,, ... , A,, automata and functions yo: So +Sl, ty,: S, + S 2 , ... , yr-,:Sr-, +So belong to Is(A,,, A,), Is(A,, A2), ..., Is(A,-,, A,,), respectively, then the fixed analog of the periodic sum of automata A,, A,, ..., A,, (PsumI(Ai, wi>) is isomorphic with periodic extensions of each automaton A,,, A , , ..., A,, . In this section we shall present relations between the periodic sum of nonisomorphic automata, periodic extensions of these automata and their input subautomata. The investigations will be, for the sake of simplicity, conducted for r = 2.
10. Periodic sums of automata
322
Theorem 10.1. Let A,=@,, C, 3,) and A , = & , C, a,) be “onto” automata, let yo: So -+Sland y,: S, +So be bijections, let V = (S+,C, a+) be psum,(Ai, wi), let Vo* and V,” be fixed constituents of the periodic sum V. V’, = and V,’ = (A1)2 if and only if for each i E (0, l ) , S E Si and O E C there holds: 0) = W i + l ( m o d 2)ai+l(mod 2 ) ( w i ( s ) p
Proof. (*) Let V,’ =
and V,* =
thus:
and (dl)2(t, o,oJ=d,*(t,o,oJ for each t E S,, o,,0 2 e Z.
On the other hand:
and
and
for each s1 =So and t , E S,, since A, and A, are “onto” automata. (e) Let:
a&,
o)=yrldl(wo(s),6) for each
SE
So and
06
C
and a,(t, o)= tyoao(yfl(t), o) for each t E S, and o E C.
In accordance with the assumption that S E d,(So) and t E d,(S,) we get that there exist s1 E So and o1E C such that do(sl, ol)=s and there exist t l E S, and ( J ~ EC such that a,(t,, 0-J= t , thus
10.2. Connections of the periodic sum
323
and
furthermore
as well as
and
Q.E.D.
Theorem 10.2. Let A, = (So, C, and A , = (S,,X - a , ) be “onto” automata, let So +S, and wl: S,+So be bijections, let fixed constituents V,’ and V,* of the periodic sum p s u q ( A i , wi) be input subautomata (Ad2 and respectively, let for fixed i~ (0, 1) ext2(Ai, gi) be the periodic extension of an automaton Ai associated with isomorphisms giE Is(Ai, B ) and gi+l(md)E Is(B, Ai), where B = (SB, C, aB).Then the fixed analog (psum2(Ai,vi))* = (S’, C, 3’) is isomorphic with (ext,(A, gi))’= (Se, C, 3J.
w0:
Proof. We have from Theorem 10.1: do(s, 6)= wla,(yfo(s),6)for each s E So and 6 E C
(10.1)
and a,(t, 6)= ~ o a o ( ~ l (6) t ) ,for each t E S, and
0E
C.
Let ext2(A,, gi) be an extension associated with isomorphisms go and gi. We will show that the function: (10.2)
10. Periodic sums of automata
324
belongs to Is(@sum2(A,,yi))*, (exf2(Ai,g,))', where n = card(So).
and
Q.E.D. Next we present how the property of equality of fixed constituents of the periodic sum psum,(Ai, is represented in strucand input subautomata tural properties of the fixed analog @sum,(A,, wi))*.
wi)
Theorem 10.3. Let A,=@,, C, a,,) and A , = (Sl, C.3,) be automata, where card(S,) =card(S,) = n, let \yo: So +Sl and S, -+So be bijections such that for each S E So we have
w,:
Let v = (S*, C, a*) be the fixed analog psurn2(Ai, constituents of V'. If V< = ( A d 2 and V,' = automaton.
wi),let
Vo* and V,' be fixed then V* is a permutation
Proof. Note that an automaton A is a permutation automaton if and only if its input subautomaton A' is a permutation automaton. Let V< =(So, C2, V,' = (S,, C2, (Ao)2= (So, C2, 32) and = (Sl, C2, Let s E So. Note
a,*),
a,2).
a,*),
that, by the assumption, there holds sc
a,(&), a)
@
s e d02(So,010)a s c
a,.(so,010)
@
sc
a v * , a).
Let there exist ( S E C and S E So such that s c d(,S, a). Then from the above wo(s)e d'(S*, 0) and (yf1)-l(s) c a*(S*, a). Since from the assumption yfo(s) # ( ~ ~ ) - ~ ( sthus ) there exist in A, two states to = y o ( s ) and t , =(wl)-'(s) such that foe a,@,, (s) and tl E a,(S,, 0).Note also that yl(to)= s1 such that s1 e do(So, a)
10.2.Connections of the periodic sm
325
and that wo(sl)et , , or else the assumption about the superposition of functions and will not be satisfied. Thus, let wo(sI)= t2 be such that t2 e a,(S,, 0) and so on, up to the exhaustion of all state sets So and S,, i.e., up to completion of n-time superposition of functions yo and wl.It is apparent that S E So and O E C such that s e do(So, o) do not exist, as well as t~ S, and O E I: such that ttz a,(S,, o), Thus, we get a contradiction. Since one can present similar consideration for every Q E C, then X is a permutation on the set S*. Q.E.D.
vo
w1
The example below shows that the opposite theorem does not hold. Example 10.1.
Figure 10.2 presents state diagrams of automata A , and A , . It is easy to see that functions yo and such that yfoyfl Iid and that Vo* and V,' are equal to and (A1?, respectively, do not exist.
w1
A, Fig.10.2. The diagrams of automata A, and A,
Based on the above considerations one can demonstrate that: is a permutation (a) the fixed analog of the periodic sum psurnr(Ai, automaton if and only if for every i e (0, 1, ..., r - 1) Ai is a permutation automaton, (b) fixed constituents of the periodic sum psum,(Ai, wi) are permutation automata if and only if the fixed analog psurn,(A,, wi)is a permutation automaton.
wi)
Theorem 10.4. Let A, = (So, C, a,) and A , = (S,,C, 3,) be isomorphic permutation automata. Then there exist bijections yo:So+ S, and wl:S, +So such that fixed constituents Vo* and V,* of a periodic sum psum2(Ai, wi)are input subautomata ( A d 2 and (AJ2. Proof. Let (f, g) E ISLA,, A,), so for each s E So and
QE
C we have:
326
10. Periodic sums of automuta
Let (wl)-l=f. Since A, and A, are permutation automata and bijections, thus
w0 and w1 are
which according to Theorem 10.1, ends the proof. If there exists a function f E Zs(Ao, Al), then:
and furthermore
Q.E.D.
10.2. Connections of the periodic sum
327
The opposite theorem is not true. It means that the fact V,l =(Ao)2 and V,' = does not imply the existence of a function f E Is(Ao, A,) or the existence of a pair (f, g) E Is,(Ao, A,). We show this in the following example. Example 10.2.
[ ;;1
[ ;;1
Figure 10.3 shows state diagrams of automata A, and A,. Let
vo:
and
w1:
8 8 A0
A7
Fig.10.3. The diagrams of automata A,, and A,
Fig.lO.4. The diagram of the fixed analog of the periodic sum
Figure 10.4 shows a state diagram of the fixed analog of the periodic sum psumAAi, wi). One can see that V:= (Ao)2 and V,' = (A1)2. and automata A, and A, are not isomorphic. Theorem 10.5. Let A,= (So, C , a,) and A , = (S,, C, a,) be strongly connected automata. Let yo:So+S, and wl: S, -+ So be bijections, let fixed constituents V,' and V,' of a periodic sum psum2(Ai, vi) be input subautomata ( A d 2 and =id. respectively. There exists s E So such that yrlyro(s)= s if and only if
vlvo
(q)Let there exists S E So such that vlyfo(s) = s. Denote v0(s)= t . Let do(s, 0 ) = s,, where s1 E S, 0 E Z. According to Theorem 10.1, we have:
Proof.
10. Periodic sums of automata
328 and
and moreover
and
It follows that
or
Thus, we obtain that for every s’ E do(s, C) there holds s’=wlwo(s’).Next, one can use a similar argumentation for each s” E do($, o), thus we have yf,w,(s”) = 3 ” . Since A, is strongly connected from the assumption, thus wlwo = id.
(c=) The proof is obvious. Q.E.D.
a,)
a,)
w,:
Theorem 10.6. Let A,= (So, C, and A, = (S,, C, be automata. Let So +S1 and wl: S, 4 So be bijections, let fixed constituents V’, and V,’ of a periodic sum psum2(Ai,yri) be input subautomata and (A1)2, respectively. If A, and A , are state independent “onto” automata, then ( p s m , ( A , , yr,))* (a) is state independent. (b) Let A, and A , be perfect automata. (psurn,(A,, y,))’ is a perfect automaton if and only if it is strongly connected. (c) Let A, and A, be “onto” automata. An automaton A, is abelian if and only if A , is abelian.
Proof. (a) The proof follows from the fact that the state independence of the automaton A implies the state independence of its input subautomaton A’. From here we have that V,’ and V,’ are state independent, and this implies the state independence of (psum2(Ai,yi))’. The proof is obvious. (b) (a)
10.2. Connections of the periodic sum
329
(e) Since from Theorem 10.2 follows the existence o f f € Is((psum2(Ai,wi))*, (ext2(Ai, gi))*), then it is enough to show the truth of the statement for ext2(Ai, gi). Next, it is enough to prove, that (ext2(Ai,gi))* is an abelian automaton if Ai is an abelian automaton. Let s E So, let (ext2(Ai, gi))" = (S*, C, a*) be associated with isomorphisms go and g , , let x , y E C* and lxl = i , lyl = k
It follows from the fact that ao(s, xy)=ao(s,yx) that X ( s , xy)=X(s, yx). (c) The proof follows from Theorem 10.2 and the proof (b). Q.E.D.
10.3. Structural properties
In this section we discuss some structural properties of the state periodic sums such as strong connectedness, retrievability and controllability. We shall deal with problems concerning functions preserving operations and congruences of the fixed analog of a state periodic sum. This section shows the influence of functions and also influence of structural properties of automata Ai on the state periodic
w
sum. 10.3.1. Strong connectedness, retrievability, controllability
The fist property to be discussed is strong connectedness. Theorem 10.7. Let A,= (So, C, a,) and A, = (Sl, C, a,) be strongly connected automata, let wo: So+S, and w,: S, +So be bijections. There exist T o c S o and Tl cS, such that
10. Periodic sums of automata
330 if and only if the fixed analog (psurn,(Ai, connected.
wi))*,
i E (0, l ) , is not strongly
Proof. ( 3 ) For the fixed analog (psum2(Ai,wi))*= (S*, C, a’) we have: (a) ao(To, c_ T , . Let S E To and t c S, \Tl. Then for a pair (s, t) there does not exist X E C* such that X ( s , x ) = t. Thus (psurn2(Ai,yri))* is not strongly connected. (e) If (psum,(Ai, is not strongly connected then there exist subsets To and T , of sets So and S,, respectively, such that at least one of them is a proper subset and satisfies (a). Let To = So and T , c S,. Then ao(T,, C)= So, because A, is strongly connected. At the same time tyodo(To, C) = S,, since w0 is a bijection. Thus we get a contradiction, so it should be To c So and T , c S,. Q.E.D.
wi))*
Theorem 10.8. Let A,= (So, C, d,J and A , = (S,, C, do), ..., = ( S r - , , C. dpl) be “onto” automata, let yo: So + S, and w,: S, 4 S,, ..., yr,-l: Sr-, + So be bijections. (psurn,(A,, wi))* is strongly connected if and only if at least one fixed constituent of the state periodic sum is strongly connected.
Proof. ( 3 )The proof is evident. (e) Let V’, =(So, C‘, be strongly connected, then for each ordered pair s,. s2 E So there exists x E (8)* such that d<(sl, x ) = s,. One can write a,*(S,, (Cr)*)=So. Since A, is an “onto” automaton then a(,S, C)=So and furthermore yroao(So. C) = S,. Because yo is bijection, thus a*(S,, C) = S,. So we have that for each ordered pair (s, t), where s E So and t E S , there exists x E C* such that a’(s, x ) = t. According to the assumption a,(S,, C) = S,, and therefore a*(S,, C) = S,, and for each ordered pair (s, v), where s E So and v E S,, there exists y E C* such that a*(s, y) = v. Continuing this argumentation we obtain that for each ordered pair (s, u), where S E So and U E Sr-,, there exists z E C* such that a’@,z) = u, which ends the proof. Q.E.D.
a,*)
Next we present results showing that the strong connectedness of the fixed analog of the state periodic sum is independent of the functions yr. First we determine a class of finite automata which, when composed into the state periodic sum, assure the strong connectedness of its fixed analog independently of the choice of functions w. Then we find general conditions of the strong connectedness of the fixed analog of the state periodic sum, requiring only fulfillment of some global condition by automata composed into this periodic sum. Theorem 10.9. Let A, = (So, C, a,) and A, = (S,, C, a,), ..., = (Sr-,, C, a,-,) be automata such that for each i E (0, 1, ...r - 1) , for arbitrary Ti Si we have card(ai(Ti, C))2card(Ti). Let there exists at least one automaton Aj among A,, A,,
10.3. Structural properties
33 1
.
.. , A, such that for arbitrary nonempty T, c Sj card(a,{Tj, C)) 2 card(Tj). Let vo: So +S, and w,: S, +So , ..., yrl: Sr-, +So be bijections. Then (psumr(Ai,yri))* is strongly connected. Proof. The proof will be carried out, without loss of the generality, for r = 2 . Let there be A, = (So, C, a,) and A, = (S,, C, do), where for arbitrary T, c S, we have card(d,(T,, C))>card(T,). Consider an arbitrary subset T, of the set S,. Then in accordance with the assumption we have:
Since yrl is a bijection, and furthermore
,
(y0(s)Is E a,(T,, C)) = T and card(T ,)2 wd(T,),
then
Using again the assumption
and next (yr0(s) I S € do(To,C)) = T',and card(T',)2card(T'&
and
card(T" ,)> card(T' > card(T,).
,,
Determining successively subsets T,, T T",,... one can see that card(Tli)> card(T,'-'), where i = 1, 2, .... Finally we receive that consecutive TI" =S1, which ends the proof. Q.E.D. Note that fulfillment of the condition card(a(T, Z)) > card(7') for each T c S, and T f O denotes strong connectedness of an automaton A.
10. Periodic sums of automata
332
Next we shall present results determining classes of automata satisfying conditions of Theorem 10.9. We will define automata classes elements of which if composed into state periodic sum assure, independently of functions yf, the strong connectedness of the fixed analog of the periodic sum. Theorem 10.10, Let A = (S, C, 6’) be an automaton. (1) If one of the following conditions is satisfied: (a) A is an “onto” asynchronous automaton, (b) A is a permutation automaton, (c) for each S E S there exists CJ E C such that a(s, (3) = s, then for arbitrary T L S there holds card(d(T, C))>card T. (2) If one of the following conditions is satisfied: (d) A is a strongly connected asynchronous automaton, (e) A is a strongly connected permutation automaton, where card@)> 1 and if there exists a pair (0,0’) E I; such that for each T c S there holds
w , #W, 0’1, 0)
(0 A is a strongly connected automaton and for each
CJ E
C such that
SE
S there exists
a(s, CJ)= s, then for arbitrary T c S holds card@@, C)) >
card T. Proof. The proof is obvious.
Now it remains to solve the problem whether the fixed analog of the state periodic sum is strongly connected when automata A,, A , , ..., A,-, do not belong to the classes specified in Theorem 10.10. Solution to this problem is presented in the next theorem. Theorem 10.11. Let A,=@,, C, a,) and A, =(S,, C, do), ..., A,, = ( S r - , , C, d,,) be “onto” automata, let yo: So +S, and yfl: S, -+So, ..., y f r - , : S,, +So be bijections. Let for automaton A;, where i = 0, 1, ..., r - 1, pi be a fixed natural number such that for arbitrary T i c s i we have
r-1 @sum,(Ai, yri))* is strongly connected if
C pi c 0. i=O
Proof. The proof will be carried out without loss of the generality for two automata A, and A,. Let po = a and p, = 6. Let To c So and card(T,) - card@,(T,, C))ra. Let card(T,)=k, Thus, card(d,(T,, C))I k - a. From Theorem 10.7 we have that (psum,(A,, yfi))* is not strongly connected when there exist T , c S , and T , cS,such that
10.3. Structural properties
333
(wo(d I s E JO(T0, 9 1 c T , and
(Vl(4 Is E
a,@,,
c To.
i.e., when card(Tl)2 k - a, since yo is a bijection. Since from the assumption card(T1) - CXd(a1(T,, Z)) 2 b, thus
(k- a ) - CXd(al(T1, Z)) I b, and cXd(al(T1, C)) S k - ( a + b). On the other hand, V is not strongly connected when card(a,(T,, Z)) since
c=d(To),
w1is a bijection. Thus k - ( a + b) Ik,
and
a + b20. r- 1 If Z pi
Q.E.D. From the above considerations it follows that there is a significant influence of the structure of automata composed into the state periodic sum on the strong connectedness of the fixed analog of this sum, up to a degree to become independent of functions The significance of functions is, in general, essential for the strong connectedness of the fixed analog of the state periodic sum. Even if automata A,, A,, ..., A, do not satisfy conditions of Theorems 10.9, 10.10 or 10.11, by a proper choice of functions yro, ..., one can obtain a strongly connected automaton. On the other hand, even if automata A,, A,, ..., A,, are strongly connected, one can find functions yo, y,, ..., such that the fixed
w.
w
wl, v7-,
wPl
10. Periodic sums of automata
3 34
analog of the state periodic sum of these automata is not strongly connected. We show this in two examples. Example 103. Figure 10.5 shows diagrams of non-connected automata A, and A,.
Figure 10.6 presents a diagram of the fixed analog of the state periodic sum of automata A,, and A, associated with functions yo and y,. We can see that the fixed analog is strongly connected.
A7 Fig.lO.5. Diagrams of non-connected automata A, and A,
("> t
;%i
Fig.lO.6. The diagram of the fixed analog of the state periodic sum
A0 Fig.10.7. Diagrams of strongly connected automata
335
10.3. Structural properties
Fig.lO.8. The diagram of the fmed analog of the state periodic sum Example 10.4.
Figure 10.7 presents diagrams of strong connected automata A, and A,.
[::),
Let a function yo=
and W,’(Wo)-’.
Figure 10.8 shows a diagram of the fixed analog of the state periodic sum of
the automata A, and A, associated with the functions yf, and yfl. It can be seen that the fixed analog is not strongly connected, and it is not even a connected automaton. Next we shall present the influence of the structure of automata A,, A,, ..., A,, on the retrievability of the fixed analog of their state periodic sum. Since the strong connectedness of an automaton A implies the retrievability, it is obvious that based on Theorems 10.8, 10.9, 10.10 and 10.11 one can find at once classes of automata which guarantee the retrievability of the fixed analog of this periodic sum. The following facts will be useful in the next considerations: Lemma 10.1. If A = (S, C, a) is retrievable then it is an “onto” automaton. Proof. The proof is immediate. Lemma 10.2. If A = (S, C, a) is a permutation automaton then it is retrievable.
Proof. It follows directly from the fact that a permutation automaton is a (0,m)asynchronous automaton, thus s = a(s, om)for every s E S and every cs E C.
Theorem 10.12. Let A, = (So, C,a,), A , = (S,, C, a,), ... , A,, = (S,,, I;, a,,) be automata, let yo: S,+S,, S,+S,, ..., yf,-,: S,, +So be bijections, let V = psum,(Ai, yi).
w,:
10. Periodic sums of automata
336
(a) if at least one of automata A,, A,, ..., A,, is not an "onto" automaton, then v' is not retrievable @) if A,, A,, ..., A,, are periodic automata then V' is retrievable. Proof. (a) Let s E Si, i E (0, 1, ..., r-1 ) such that s e ai(Si, C), let yfi(s)= t . Since X ( S , a)= Iy,d,(s, a) thus:
otherwise no such x
E
C* exist that d'(t, ax) = t.
(b) The proof follows directly from Lemma 10.2 and the fact that if A,, A,, ..., A,, are permutation automata, then V' is a permutation automaton. Q.E.D. At the end of this section we consider the problem of the controllability. It is known from Grzymala-Busse [9], that an automaton is controllable if and only if it is strongly connected and the period of the maximal periodic representation D = 1. Thus it is obvious that we can discuss controllability only for fixed constituents of state periodic sums, because the maximal periodic representations of the fixed analog of the state periodic sum have the period D > 1.
Lemma 10.3. If A = (S, C, 3) is an automaton such that for arbitrary T c S we have card(d(T, C)) > card(T), then (a) the maximal period~crepresentation of the automaton A has the period D = 1, (b) A is controllable. Proof. The proof is immediate.
a,)
a,)
Theorem 10.13. Let A,= (So, C, and A, = (S,, C, be automata such that for every i E (0, 1 ) and every T i c s i , card(di(Ti, C))>card(Ti). Let yf,: S,--+S, and w,: S, -+So be bijections. Let V =psurn2(Ai, wi). Then the fixed constituents V,' and V,' are controllable. Proof. According to Theorem 10.9 the fixed analog V' is strongly connected, thus based on Theorem 10.8 V,' and V,' are strongly connected. Since wo and yf, are bijections, thus for each i E (0, 1) and each T i c s i we have card(a*(Ti, C2))> card(Ti). Based on Lemma 10.3, D i = 1, thus V,' and V,' are controllable. Q.E.D.
10.3. Structural properties
337
Fig.10.9. The diagram of a controllable automaton
Fig.IO.10. The diagram of the f i e d analog of the state periodic sum
From the fact that automata A, and A , are controllable it does not follow that fixed constituents of psum2(Ai, yi) are controllable. This fact is illustrated by the following example. Example 10.5.
1,
Figure 10.9 presents a state diagram of a controllable automaton A,. Let A, = A , and y o = [
and y,=(yo)-'.Figure 10.10 shows a diagram of
the fixed analog (psum2(Ai, yi))'. It can be because it is not strongly connected.
Seen
that V' is not controllable,
10.3.2. Operation preserving functions
The notions used in this section such as automorphism and a polyadic automorphism of a periodic automaton, polyadic automaton and (r+ 1)-adic group PG(V), have been introduced in Chapter 8. Also the problems of functions preserving operations of periodic automata have been discussed there. Now, we present the relationships between the structure of automata A,, A,, ..., A,,, properties of functions yo. yl,..., ypl and the automorphism group and the ( r + 1)-adic group of the fixed analog psum,(Ai, wi).
10. Periodic sums of automata
338
Let us make assumptions valid for all next theorems in this subsection: let A , = (S,, C, a,), ..., A,, = &-,, C, a,l) be automata, let yo: S,-+S,, w,: S, +S2, ..., y?,: S,, +So be bijections, let V*= (S*, C, a’) be the fined analog of p ~ ~ m , ( AWi i, ) .
A,= (So, C,
Theorem 10.14. Let A,, A,, ..., A,, be “onto” automata, let a function a: S’ + S* be a composition of functions ai: Si + Si such that for each i E [0, 1, ..., r - 1) aiE G(Ai). A function a E G ( V ) if and only if for each i E (0, 1, ..., T - 1) holds via= ayi. Proof. (a) If a E G ( V ) then for each s E S’ and
(J E
C we have:
thus also
Since, from the assumption aie G(Ai), thus:
and via= ayi because Ai is an “onto” automaton. (e) Let s’ E Si thus
yia(s’)= ayis’). Since Ai is an “onto” automaton then there exist s E Si and hence
(3 E
C such that &(s,
6)= s’, and
Since
a E
C(Ai), thus
and furthermore
for ayi=via,i.e., a~ G ( V ) . Q.E.D.
10.3. Structural properties
339
Theorem 10.15. Let A,,, A,, ..., A,, be “onto” automata, let qi: Si +Si be a function q: S’ +S* restricted to Si, for every i E (0, 1, ..., r - 1) such that qie Is(Ai, Ai+l(modr)). The function q is an (r+ 1)-adic automorphism V if and only if +
qi+l(modr)Wi
Wi+l(mod r)“li*
Proof. (a) If q is an (r + 1)-adic automorphism QE
c:
a’(q(s), 0)= q(a’(s,
also for every s E Si and
V ,then
for every s E S’ and
a)), 0E
C
v i + l ( m o d r)ai+l(mod r)(qi(s),
qi+l(mod r)(yiai(’,
Since qi E Is(A,, Ai+l(mod ,)) thus: vi+l(mod r)qi(ai(’*
0)) = qi+l(mod r)vi(ai(s9
and based on the fact that Ai is an ‘‘onto” automaton vi+l(mod ,)Ti
qi+l(mod r)vi.
(e) Let t E Si. There exist S E Si and O E C such that ai(s, 0)= t , because Ai is an “onto” automaton. Thus, since Wi+l(mod
r)qi(t) = qi+l(mod r)Vi(‘)3
therefore
Q.E.D.
10. Periodic sums of automata
340
Theorem 10.16. Let a: S' +Sm be a bijection such that its restriction to sets S i , i = 0, 1, ..., r - 1 are equivalent to the superposition of functions ( v i - l ( m o d +.. yi+l(mod r)yi),respectively. The function CXEG ( V ) if and only if (vi-l(mod r)... yi+l(mod ,,wi) E G(Ai) for each i E (0, 1, ..., r - 1 ) . Proof. (a)Let . a~ G(V'), Thus: a(d*(s, 0))= d'(a(s), 0)
and furthermore a ( V i d i ( s , 0)) = v i d i ( a ( s ) , 0).
From the assumption we have that for every
a(') = Wi-l(mod
r)...Vi+l(mod r)Vi(S)
and for every t E S i + l ( m o d = vi...Wi+Z(mod r)vi+l(mod T ) ( ~ ) ,
thus
and ejecting
thus
and
vi we have:
SE
Si holds:
10.3. Structural properties
34 1
and
Q.E.D.
10.4. Periodic sums with input mappings
In Mikolajczak [ l l ] some modifications of the notion of the periodic sum were introduced by adding functions p: Q -+ C or p*: Q -+ C+. Thanks to these modifications one can obtain an extension of the set of objects which result from the composition of automata A,, A,, ..., A,, into the periodic sum. At the beginning we will show a method of construction of a state periodic sum isomorphic to a given periodic sum with input mappings.
Theorem 10.17. Let psmr(Ai, (vi,p)) = (S+,, C, a+,) (respectively, psumr(Ai, (yi, p?), psumJAi, (yi, p:)) be the periodic sum with fixed (generalized fixed, generalized varying, respectively) mappings of automata
342
10. Periodic sums of automata
Proof. Let US define a bijection f : S,' +S,' as follows As;) = s/, where S/ E SAi, i = O , 1, ..., r - 1, J = 1, 2, ..., card(S,i). Next we prove an operation preserving property :
The proof for psum,(A,, (wi, p')) and psum,(Ai, (wi, pi')) is analogous. Q.E.D. Let us assume the following notation:
Proof. Assume that (g, hr)=(kr, P). Define pairs of functions E, e i ) = ( k g - i , lib-i). In particular for i = 0 holds (fo,eo)= (@go, pho)= (id, id). The proof will be conducted only for i = r - 1, because for other cases it is similar. Thus for i = r - 1 and for every S E SPl, (TE C the following holds
10.4. Periodic sums with input mappings
343
Q.E.D.
One can prove, in a similar way, the following facts: (1) Let A,, A , , ..., A,, be pair isomorphic automata with generalized 111, (kr-13 isomorphisms (go, h& (g,, hJ , ..., ( g r - l , h,J and (k,,, fo), fPl), respectively. If (g, h')=(P, IT) then psum,(Ai, (gi, h')) and psum,(Ai, (ki, f i 8 ) ) are isomorphic.
(2) Let A,, A , , ..., A,, be pair isomorphic automata with isomorphisms (yi, pi), i = O , 1, ..., r - 1 and (gi, hi). If (ty', pr)=(go, h& = (id, id), then psumr(Ai, (tyi, pi)) and exf,(A,, (gi, hi)) are isomorphic. The converse theorems do not hold which is shown in the next examples: Example 10.6.
Figure 10.11 presents diagrams of isomorphic automata A , and A , . Figure 10.12 presents state diagrams of psum2(Ai, ( g i , hi)) and psum2(Ai, (ki, f i ) ) , where
A7
Fig.lO.1I . Diagrams of isomorphic aufomafa
10. Periodic sums of automata
344
Fig.lO.12. Diagram of the state periodic sum
I, = I , = id. One can see that (g2h2)I(k21-J.There exists a function (1 2 3 4 5 6 ) which belongs to 321654
1
Example 10.7.
Figure 10.13 presents diagrams of isomorphic automata A, and A,. Figure pi)), where 10.14 shows a diagram of the periodic sum psum2(Ai, (yi, 123 645 yo=( po=pl=id. 123 456
1,
[
wl=
1.
Figure 10.15 presents a diagram of the periodic extension (1 2 g,
31
= (go)-,, h,, = h, =id. It can be seen that y 2 p 2 1g,h,
a function f =
[i ,"
Is@sumz(A,, (Wit P,)), ex+,,
= id. There exists
), which belongs to the set (go, ho))).
10.4. Periodic sums with input mappings
345
Fig.lO.13. Diagrams of isomorphic automata
Fig.lO.14. The diagram of the fued analog of the periodic sum
Fig.lO.15. The diagram of the fixed analog of the periodic extension Exercises
10.1. Prove that the results from the subchapter 10.2 do not hold if A, or A, is not “onto” automaton. 10.2. Is the fixed analog of the periodic sum @sum,(Ai, tqi))’ of the automata A,= (So, C, a,) and A , = (S,,C, a,) strongly connected assuming that each state in Ai belongs exactly to one cycle in some autonomous factor?
346
10. Periodic sums of automutu
10.3. Let A,, A,, ..., A,, be “onto” automata. Let q of these automata be strongly connected and asynchronous automata. Let for each of the r - q non-asynchronous automata a number pi, i = q + 1, q + 2, ..., r be given such that card(Ti)- card(di(Ti, C)) < p i , where Ti c Si. Give the relation between r numbers C pi and q to guarantee that the periodic sum of automata i = q+l A,,, A,, ..., A,, be strongly c o ~ e ~ t e? d 10.4. Find a lattice of congruences of the fixed analog of the periodic sum of where r is a prime number and card(Si)= r, automata A,,, A,, ..., A,, i E (0, 1, ..., r - 1 ) .
Bibliographic note
The notion of the periodic sum of finite automata was introduced by Grzymala-Busse [lo]. This work contains also the first results about the strong connectedness of the fixed analog of the periodic sum. Further investigations in this area have been presented in Miadowicz [ l , 2, 4, 61. First attempt of the extension of the notion of the periodic sum of automata have been taken in Miadowicz [l]. The next generalizations associated with the change of the mappings on the input alphabet have been presented in Mikolajczak [ l l l , where the interdependencies between the generalized models and the model of the state periodic sum were shown. Another approach to the investigations of the structural properties of state periodic sums have been presented in Miadowicz [3], and Mikolajczak [9, lo]. Finally, some open problems in this area were presented in Miadowicz [5].
11. Linear automata
In this chapter we present results on finite and infinite linear automata. The main goal emphasis will be placed on problems of finite automata realization. A theorem on the realizability of any finite automaton with the help of a linear automaton defined over a field of characteristic 0 will be presented. A sufficient condition for the realizability of a finite automaton with the help of a linear automaton defined over a field of characteristic p, where p is a prime, will be formulated. It will be also shown that there exist finite automata which cannot be realized with the help of a linear automaton defined over any field of characteristic p > 0. The particular case of a linear automaton, i.e. a shift register defined over a field of real numbers which generates cyclic sequences, will be also discussed. Finite automata reproducing finite subsequences generated by these registers will be investigated. The presented results deal with decomposition and cyclic representation. Linear automata have wide applications in digital technique. Linear automata are used for generation of linear codes, detection and correction of errors, construction of testing sequences, and generation of pseudo-random sequences of numbers. They are also used in experiments that require Monte Car10 methods, in the protection of data stored in computer systems, and radiolocation.
I1 . I . Introducing remarks In this subchapter an automaton will be meant as a 5-tuple (S, C, 3, a, y), where S, C and R are nonempty sets of states, input alphabet and output alphabet, respectively, 3: S x C + S is a transition function, and y is an output function. In the case of Mealy automaton the output function is y: S x C + R and in the case of Moore automaton y: S + R . As in Chapter 2 by p we denote the transition function of a Mealy automaton, and by h the transition function of a Moore automaton. The remaining definitions used in this subchapter are the same as in the previous chapters. The definition of a linear automaton introduced here is more general than the definition used previously, namely we do not assume the finiteness of the sets S, C and R. If S, C and R are all finite, then the automaton is finite.
11. Linear automata
348
Let F be a field and n E No.By F , we denote the vector space of column vectors of dimension n over F. A linear automaton is an automaton (S, C, R, a, p) with the following properties: (a) there exists a field F and integers k, m , r E No such that S = F,, C = F,, n= F,, (b) there exist: a k x k matrix A, a k x m matrix B, an r x k matrix C and an r x m matrix D, all over F, and such that for each (s, o)E S x C a(s,
0 )= As
+ Bo
P(s. 6)= Cs + D o
(11.1) (11.2)
Taking into account the fact that the automaton acts in discrete time we will also use the notation = As,+ BG,
O, = Cs,
+ Do,
(11.3) (11.4)
where S,E S , 6,E C and O, E R for f E No. For the reason that field F and matrices A, B, C and D entirely characterize the linear automaton, instead of the standard notation of the automaton as a 5-tuple (S, C, Q, p) we shall also denote automaton by an 8-tuple (F, A, B, C , D, k, m, r ) or by a 5-tuple (F, A, B, C, D) if no confusion will arise.
a,
Fig.11 . I . Diagram of a linear automaton to Example 11.I Example 11.1.
(a,
Let A, B, C, D) be a linear automaton defined over the field Q2 of integers modulo 2 such that
349
11 . I . Introducing remarks A=
[
:],[ :1, B=
C = [ O , 1 1 , D=[lI.
The diagram of the automaton is presented on Figure 11.1. The matrix equation (11.3) can be written as k linear equations, and Equation (11.4) as r linear equations. Thus each linear automaton can be presented in the form of a net consisting of adders, multipliers and delay elements with delay elements implementing the memory of an automaton. Symbolic representations of these elements are illustrated on Figure 11.2. The automaton from Example 11.1 is presented in the form of a net on Figure 11.3. Equations (11.3) and (11.4)express the change of the state of an automaton at the moment t + 1 of time and the output signal at moment t as functions of state and input signal at moment t . The following theorem determines the state to be reached by the automaton and the output signal to be generated if at the moment 0 the automaton starts from the state so and the input sequence is finite.
G t
- 7*=Q%
Gt
-
?*=5
Fig.ll.2. Components used to the construction of a linear automaton as a net: (a) adakr, (b) multiplier and its simplified version if a = 1, (c) delay
350
11. Linear automata
w Fig.ll.3. Automaton from Example 11.1 presented in the form of a net Theorem 11.1. Let a linear automaton (F, A, B, C, D) be given. (a) For each t~ M t
s,= A's,
+ C
A'-j-lBoj
j=O
(b)
For each t E No t
C El-,oj,
u,=CA'S,+
(11.5)
j=O
where D if t = O CAI-' if t > O Proof. (a) (b)
By induction on t ; omitted. Using (a) we have t- 1
o,=CS, + DO,= C(A's,
+ C A'-J-~BO~) + DO, j=O
I- 1
= CA's,
+
C CA'-j-'Boj
+ Do,.
j=O
Let A , = ( F , A , , B , , C,, D1) and A,= (F, A,, B,, C,, DJ be linear automata. We say that A , is similar to A, if there exists a nonsingular matrix P such that
I
11.1. Introducing remarks
A, = PA,P-' B,= PB,
c,=C , P ' D2 = D1
35 1
(11.6)
Theorem 11.2. Let linear automata A , = ( F , A,, B,, C,, D1) and A , = ( F , A,, B,, C,, D2) be given. If A, is similar to A,, then A, and A, are isomorphic.
Proof. Let P be a nonsingular matrix such that Equations (11.6) hold. Let 9:Fk+ Fk be such a function that cp(s) = Ps for each s E Fk The inverse P1 exists, hence cp is the bijection. Thus
and furthermore
Q.E.D.
The converse of Theorem 11.2 is not true because there exist isomorphic automata which are not similar. As an illustration let us take the following example. Example 11.2.
If A,=((&, [3], 0, 0, 0) and A,=(Q7, [ 5 ] , 0, 0, 0), then A, and A, are isomorphic but not similar because the matrix [3] is not similar to [ 5 ] over the field Q7 of integers modulo 7. Let a linear automaton A = (F, A, B, C, D) be given. A polynomial p,,(x) = det(xI - A) is said to be a characteristic polynomial of A. On the other hand, for each polynomial k p(x) = 2: a$, i=O
where ak= 1, we can define a companion matrix A such that det(x1- A) = p ( x ) in the following way
11. Linear automata
352
-
0
1
0
...
0
0
0
0
1
... 0
0
... ... ... ... ...
A=
0
0
...
0
-ao - a l - a 2
0
... - Uk-1
... 1 - a,
1I .2. Linear realizations of finite automata
In this chapter we use the most general definition of the realization of an automaton. Let us recall that an automaton A’ = (S’, c’, 8 , Q’, p’) is said to be a realization of an automaton A = (S, C, 3, Q, p) if there exists a triple (a,I, of functions such that (a) a: S -+P(S’), (b) 1: C+Z’, (c) [: R’--+Q, (11.7) c cr(a(s, o))l, (d) (W, E S x WUm, ~(4) (11.8) (el (V(S9 0)E S x C)[S(P’(a(s)), I(@)) = P<s,o)l.
c)
a
Theorem 11.3. For any finite automaton A = (S, C, 3, R, p) and any field F of characteristic 0 there exists a linear automaton A’ = ( F , A, B, C, D, 1, 1, 1) such that A’ is a realization of A. For given A , linear automaton A’ can be obtained effectively
.
a’
Proof. Assume that S ’ , and p’ are the set of states, the transition function and the output function of A’, respectively. If K is a subfield of a field F of characteristic 0, then there exists the isomorphism cp: K -+ Q such that 4 = @a) for a certain a E K, 4 E Q and Q being the field of rational numbers. Symbol 4 will denote an element a € K such that 4 = Ha). Assume that S = {s,, s2, ..., s,) and C = (ol,02,..., 0”).Let n = 1 +rnax(u, v). For each i~ No we define three functions, namely fi: &-+No and h: N,,++Mo, in the following way: (a) J ( O )= i(modn), g,(O) = t i / nl, (b) f,(x + 1) = gi(x)(modn) and gi(x + 1) = Lgi(x)/ nl for each x 2 0, (c) h(i) = p L f ( x + 1) = 01. Note that J ( x ) is the x-th right digit when the number i is written out in n-ary notation, and h(i)+ 1 is the number of digits in the n-ary expansion of i.
353
11.2. Linear realizations of finite automata
The functionf, and h have following properties: (i) for each k and 0 Ii < n h(nk + i ) = h(k) + 1,
(11.9)
for each k, x and 0 I i < n
(ii)
fd+i(O)
(11.10) (11.1 1) ( 1 1.12)
=i
fd+i(x + 1) =fAx) if k # 0 then f,+i(h(nx + i)) =f,(h(x)).
Define a coding triple (a,L, [) as follows: (i) for any oic Z ~ ( 0=~i ,)
(ii)
for any S E S
a(si)= ( x b E M. 1 If,(h(x)) I u, 1 Ifx@) 5 v for 0 I k < h(x))
(iii) if x is such an element of F that 1 I f , ( h ( x ) ) I u and 1 I f x ( k ) < v for 0Ik < h(x), then
Otherwise [ ( x ) = c , where c is a fixed element of R. Assume that A = C = [n] and B = D = [l]. Now we prove that the linear automaton (F, [ n ] , [l],[nl, [l]) is a realization of A = (S, C. 3. R, p) such that the coding triple (a,L, [) is defined as above. At first we show that for 1 I i l u, i E a(si). This means that a transforms the set S into the set of nonempty subsets of S ’ . We have that i E No
If(0) = i and g,(O) = 01
3 &(I) = 0
h(i) = pxK.(x + 1) = 01 = 0
* f,(h(i))= i,
i.e. 1 If(h(i)) lu. Hence, no number m E consequently
M
exists such that O I m < h(i), and
354
11. Linear automata
Assume that s E S, oi E C and x E a(s), which implies that (11.13) Thus
a’@,i(oi))= Ax+ Bi(oi)= nr + i(oi)= nx + i. Let y = nr+ i. To prove that (11.7) holds it suffices to show that a;).Using (11.9) - (11.12) we get
YE
a@($,
and moreover
by (11.13). Now we have to prove that (11.8) holds. Let y = n x +i. 1 Sf,(h(y)) Iu, 1 If,(k) I v for 0 I k < h(y), we have
Since y > O and
Therefore A’ is a realization of a finite automaton A. Note that using the construction presented in the proof, A’ can be obtained effectively. Q.E.D. Next, we will examine the question whether the characteristic 0 of the field is a necessary condition for a linear realizability of a finite automaton. The answer is that not always it depends on the field. In the sequel let p be a prime. The additive group K generated by the unity element of any field of characteristic p is a subfield isomorphic to the field ($ of integers modulo p. If cp(a)=q for some a € K and q E ($, then for convenience, the element 4 will be identified with a, and instead of a we shall write q.
355
11.2. Linear realizations of finite automata
Theorem 11.4. Let A = (S, Z, a, R, p) be a finite automaton and F be a field of characteristic p which contains a transcendental element z over Q. Then there exists a linear automaton A' = (F, A, B, C, D) such that A' is a realization of an automaton A. Furthermore, for a given automaton A, linear automaton A' can be obtained effectively if z is known.
Proof. An element z is transcendental over $.so
where bi, c j € (0. 1, ..., p - 1 ) for O l i l q and O l j l r if and only if q = r and bi = ci for each i such that 0 I i 5 q. Let S = (sl, s2, ..., s), and C = (q,02, ..., 0").Assume also that n = 1 + max(u, v). We define function h: ( 1 , 2, ..., n} + F in such a way that h(i) = zi.
Now the coding triple (a,L, [) can be defined as follows: (i) for any q~ C L(Oi) = h(i). (ii) for any sic S a(si)= ( x I ( 3 k ~No)(3co,cl, ..., C k E F) [c,E
(iii)
( 1 , 2,
..., u ) . C
~ E (1,
2,
..., v)
for O s i e r , and
for any X E F, where F is any field, if x is such an element that
[C,E
<(XI
( 1 , 2, ..., u ) , C = P(s,,
~ E (1,
2,
..., v )
for O l i < k ] then
ack-,ack-2...aco) else b E R, where b is fixed.
Let A = C = [ P ] and B = D = [ l ] . The proof that automaton (F, [z"], 111, [PI, [l]) realizes A is omitted because it is analogous to the corresponding part of the proof of Theorem 11.3. Q.E.D.
356
1 1 . Linear automata
Theorem 11.5. Let the automaton A = (S, C, a, R, j3) be defined by means of Table 11.1. Furthermore, let F be a field of characteristic p in which every element is algebraic over Q. No linear automaton A’ over F is a realization of A.
Proof. By contradiction.
Assume that A’ = (F, A , B, C , D) is a linear automaton which realizes A. Let be a coding triple. We shall show that the sets a(s& and a(sl) are disjoint. Suppose x E a@,) (7 a ( s l ) .
(a, L,
c)
Table 11.1. Automaton for which there does not exist any linear realization over any field of characteristic p
By (11.8) we have that
and thus
Using (11.7), for each function of A’):
XE
A similar reasoning leads to
a(s,) and y E a(s,) we have that
(a’ is the transition
11.2. Linear realizations of finite automata
357
By repeated application of these statements n times, for each X E a(so)we have
a(so) if zi = Bt(1) for 0 Ii < n
n-1
Anx+ C Aizi E i=O
a(sJ if zi E (Bt(O), Bt(1)) for 0 Ii < n,
(11.15)
and zi = Bt(0) for at least one i. Let A = [ay] and K be the smallest subfield of F which contains the extension of Q, by elements all, a12,..., a,,,,. Since all elements in F are algebraic over Q,, K is a finite extension of $. Therefore K is a finite field. Each element in any matrix A' ( i 2 0 ) is an element of K. Since K is finite, there exist positive or more generally: Ar=Ar+U. Then we have integers r, S E M such that A'=
Let X E a(so),and furthermore let Bi(0) if i = r + j s for O l j l p - 1 zi = BL(1) otherwise.
Then
r+ps-l =A'+PSx+
C
P-1 A i B ~ ( l ) + C Ar+LB~(0)
i=O
i=O i#r+jt
P- 1
=Ar+Px+ C AiBL(l) i=O i # r +j t
358
11. Linear automata
r+ps-1
C
=A'+PFX+
A'Bt(l)+
i=O i#r+jt
= A'+pSx +
P-1 2 Ar+&Bt(l) i=O
r +ps- 1 C A'Bt(1) E a(s,). i=O
However the application of (11.15) yields r +ps- 1 A'+~x+ C i=O
a(sl).
Thus a(s&na(s,)f 0, is a contradiction with (1 1.14). Q.E.D.
-
0 1 0 ... 0
0
... 0
0
0 0 1 A=
... ... ... ... ... 0 0 0
... 0
... 1
4 a l a2 ... ak-2 ak-l -
-
0
-
0 ,B=
.
, C = [ l , 0, 0, ..., 01, D=O,
0
- 1-
then A will be called a linear shift register, or simply a shift register. Figure 11.4 presents the net representation of the shift register. An infinite sequence (a,),t=0, 1, 2, ..., such that its general term is defined by means of (11.5) is called a computation of a shift register. A computation is cyclic if there exists a positive integer T such that = w, for any ? E No.Each T fulfilling this condition is called a cycle length of (a,).If T is the smallest cycle length of the computation, then we say that T is the fundamental cycle length. In this chapter we assume that shift registers are defined over the field of real numbers, i.e. F = El. Furthermore, we assume that the characteristic polynomial of shift register is a function of a complex variable z . By so we denote the initial state of shift register.
359
11.3. Linear sh@ registers
Fig.1 I .4. Linear shvt register
Theorem 11.6. Let @, A, B, C, D, k, 1, 1) be a shift register, and p ( z ) be its characteristic polynomial. Furthermore, let b E R be a fixed element of the input alphabet. If: (a) all roots of p ( z ) are single and lie on the unit circle, i.e. each root zj has the form zj=exp(iqj), where 01qjc27c,j=0, 1, .... k - 1 and i = d - 1 and (b) there exist a positive integer T and positive integers to, t l , ..., tk-l such that qj=27c$/Tand for e a c h j e (0, 1, ..., k - I ) g.c.d.($, T ) = l and XO XO
(c)
Sof
*
k- 1
, where xo = b (1 -
C aj)-l,
j=O
then the computation of the shift register is cyclic and its fundamental cycle length equals T, where T > k and T f ( t j - + ) I q for each j, j * e (0,1, ..., k-11, j f f and q~ Z\(O). Proof. The general term of (or)given in the form of (11.5) is not convenient in our considerations. We make the use of the fact that any computation of shift register can be expressed by a recurrence equation k-1
o,+t- c ujor+j= or j=0
If
(3,
= b, the solution of the above equation is given by
where q, is the solution of the homogeneous equation
360
11. Linear automata
k- 1 @,+&-
c ajw,+j= 0,
j=O
Because all roots of p ( z ) are single and different from 1, then a = 0, k- 1 g(l)=p(l)= 1 - C uj#O, and j=O
k- 1 7\s, = C c,exp(icpjt), j=O
(11.16)
where co, cl, ..., ck-l are constants depending of the initial state of register. Using the assumption (b), it follows from (11.16)that
k- 1 W,+F
k-1 C c,exp(icpi(t + r ) ) + b / (1- C a,)-*
j=O k- 1
j=O
k- 1
= C c,exp(i(cpjt + 2ntj)) + b / (1- C aj) = a,. j=O j=O
T is the fundamental cycle length by virtue of (b), because
w , , ~= w, for each
f E
No
implies qjT=2n9 for each j~ (0, 1, ..., k- 1).
To prove that T # ( f j - f j , ) / qwe write p ( z ) in the form
k-1
By virtue of the assumption (a) all roots of the characteristic polynomial are single, hence
exp(i2mjI r ) f exp(i2ntj, I r )
I I .3. Linear shut registers
361
for different j , j * E (0, 1, ..., k - 1 ) , thus tj f ti.. Therefore T # (5 - ti.) I q for each q E Z\(O). Because for each j E (0, 1, ..., k - 1 ) ti and T are relatively prime, 0 < f j / T < 1 and t j # t j . for differentj, j * E (0, 1, ..., k - l ) , then T > k . Finally, note that the assumption (c) means that the constant computation (x,,) does not belong to the set of computations of the shift register. Q.E.D. Let A = @3, A, B, C, D, k, 1, 1) be a shift register fulfilling the assumptions of Theorem 11.6, and let so be its initial state. In the sequel A is denoted by the 6-tuple (S, C. a, R, h, so>. For A we construct a subautomaton A , T(@ such that its state set S, consists of states reachable from so applying words x , XCT, xo2, ..., xoT-1, where x is any word of the input alphabet, which length is not greater then T and Q is a fixed input symbol. The transition function of 4, is the transition function of A restricted to the set S,xZ, and the output function does not depend on input signal. Formally, 4, T(a)=(S,, C,, a,, Q ,, A,, so>, where Z, is a finite subset of M, S,= (a(so, XCT")IXE C,*, I x l I T , Q € C,, n = 0 , 1, ..., 1 - l ) , a,: S,xZ, +S, is a transition function such that (s, q ) Dom(a,)d,(s, ~ q)=a(s, q), A&) = Cs for each s E S,, R, = 3.,(S,J. The automaton A , .T(@ is incomplete. We define a cover xu= (Bo, B , , ..., B,- 1) on its state set in such a way that Bj for j = 1, 2, ..., T - 1 (1) so€ B, and E C)wS E Bj"S' q) 6 Dam@,)* a&, q) E B(j + I k a r l . (2)
w7)
a,€
The cover defined above is not always a partition. In the sequel we shall investigate only the case when X, is the partition of S, Thus, if A , T(o)= (S, C,, a, R,, ha, so), then we can define a total function a': S,xC,+S, such that for each 7 ) E C and S E Bj, where Bj is the block of L, (1) JYs. 7 ) ) = + 1)mOa-p (2) ay<s,113 = s, (3) (VS1 E S,)(Ys, E SU"'(s1, q) = d'(sp, q)*s, = sz].
qj
Let 4, ,(@= (S, C,, a',, Q,, h, so>. It is evident that A , T(O) is not determined uniquely. For any fixed 7 ) & ~ the automaton d , generates a cyclic sequence of the fundamental cycle length T and furthermore, it generates all finite subsequences generated by A when A is in the state so and the input sequences are taken from the set (xd Ix E C' and Ixl I Tand CT E C and j E No). For 4, let us consider the automaton &, ,@)=(S, C,, a'J without outputs. A cycle-type partition of the state set S of an automaton A = (S, X, a) is an input-independent partition R such that A / R is strongly connected.
1 1 . Linear automata
362 Theorem 11.7. For
there exists a periodic representation with the period
T.
Proof. The partition X, is a nontrivial partition of S, Each block of this partition has the same number T1card(S,) of elements. Let for a fixed q E C,, where v = T-”card(Sd, be defined as follows: a?,, = {Co, C , , ..., C, (*) for a fixed f o E S, Co= (*)
if
(a’(fo,7y) l j = 1, 2, ..., T ) , q-1
SE
S\ u Ci.then for each
q E (1, 2,
..., v )
j=O
c,= (a’&,
7 y ) l j = 1, 2,
..., TI.
Each block of a?,, contains T elements and x,-a?,,=O. Hence, by virtue of Gnymala-Busse [6] for AT, there exists a nontrivial periodic representation V with the period T such that V is reducible to a strictly periodic automaton with period 1. Q.E.D.
fl)
The next theorem deals with the serial decomposition of
4,T(@. fl)
Theorem 11.8. There exists a state behavior realization of 4, by a serial connection A, @A2 of an autonomous automaton A, and some automaton A,. Proof. For any automaton B there exists a state behavior realization by a serial connection A , @ A , , where A, is an autonomous automaton if and only if there exists a nonmvial periodic representation for B, i.e. a periodic representation with the period T > 1 (cf. Grzymala-Busse [6]).
Q.E.D. The above considerations are illustrated by example 11.3.
Example 113. Let A = (JB, A, B, C, 0, 2, 1, 1) be a shift register such that A=[
-: ]
and so=
[ ]
Register A generates cyclic computations of the fundamental cycle length T = 4 . Let ‘c = 2 and (3 = 0. For C = (0, 1), the diagram of A,, 4(o) is shown on Figure 11.5. For A2, 4(o) we compute the cover xo= (Bo, B,, B,, B 3 ) , where
1 1 3 . Linear shiji registers
363
0
Fig.115. Diagram of A,, 4(0) to Example 11.3
Thus ~0 is the partition of the state set of A2, 4(0). We construct A,, 4(o) with diagram presented on Figure 11.6. Now we calculate the partition "el = {Co, C , , C,, C3) of the state set of A2,J0) which gives
1 1 . Linear automata
364
Fig.ll.6.Diagram of &, 4(0) to Example 11.3 Let z= (oo,or)be an alphabet, and let cl: be coding function such that
xo+r, c2:
-+r, c3: X 0 + r
a1
I I .3. Linear shvt registers
365
Fig.Il.7. Autonomous automaton A,
Fig.1 I .8.Serial &composition of
A,,4(o)
Table 11.2. Automaton A, to Example 11.3
366
11. Linear awomata
Then the state behavior of A,, 4(o) can be realized by the serial connection of the autonomous automaton A, given by means of the diagram shown on Figure 11.7 and the automaton A, = (S,, q,dJ defined with the help of Table 11.2. In Table , is not explicitly presented 11.2 the state set S,= (ooa0.Q ~ Q , , Q , Q ~ , Q ~ Q , ) and in a current moment of time. A picture of the connection is shown on Figure 11.8. Exercises
11.1. Let A = (S, C, 3, R, A) be a Moore automaton. If there exists n E M such that for each x E CnC' and for each sl, s, E S the condition d(s,, x ) = &s,, x ) holds, then such an automaton is called feedback-free. Show that (F, A, B, C,D) is a feedback-free automaton if and only if A" is nilpotent, i.e. A" = 0 and (n=1 v ( n 2 2 A A"-'#O)). 11.2. Prove that if A, and A, are similar linear automata, and pAi(x) is the characteristic polynomial of Ai (i = 1, 2), then pA1(x)= pA2(x). 11.3. Let A = (S, C, a) be an automaton such that for a fixed n E E.9 the state set S = Sn)= ( Q ~ Q , . . . Q ~loi E C) and for each s E S, O E C we have that a($, Q) = dW1)o,where if s = op,. ..on,then dwl)= Q ~ Q , ..q,, . (a) Show that for A there exists a shift register which is a state behavior realization of A. (b) Prove that the group of automorphisms of A is trivial, i.e. card(G(A))= 1. 11.4. Let 4, gi and h be the functions defined as in the proof of Theorem 11.3. Show that they are recursive. 11.5. Let A = (S, C, 3) be a strongly connected permutation automaton such that I is its characteristic group, and H is a subgroup of i. For A there exists a linear state behavior realization over Q if and only if (i) there exists a commutative normal subgroup N of such that for each [XI E N the condition [x]p= [el holds, (ii) C c N [ x ] for a certain Ex] E i, (iii) H n N = [el (Hartmanis, Walter [I]). Show that for the automaton defined by means of Table 11.3 there exists a linear state behavior realization.
Exercises
367
Table 11 3. Automaton to Exercise I I5
a Table 11.4. Automaton to Exercise 11.6
11.6. Let an automaton A = ( S , C, a) be given, and let there exist injections a: S + F , and I: C j F , , , , where F =Q, such that a(d(s. a))=Aa(s)+ Bt(s) + a . Then we say that for A there exists an extended linear realization. Let us suppose that B is an automaton without outputs. If V,* is a fmed analog of an extension V, associated with isomorphisms and V,* is strongly connected, then for V,* there exists an extended linear realization over Q if and only if for B there exists a linear state behavior realization over (Q (Mikolajczak [4]). Prove that if B is an automaton defined by means of Table 11.4, then there exist no extended linear state behavior realization for the fixed analog V,* of any extension. 11.7. If for an automaton A = ( S , C, a) such that a(s,, 6)= a(s2, 6) for some 6 E C = (0, 1 ) and sl, s2 E S there exists a linear state behavior realization over Q with the identity function coding inputs, then a(s,, a)=a(s,, 6) for each o E C. Furthermore, if for some S, E S a(s,. 0) = a(s. 0) = a(s, 1) for all S E S (Hartmanis, Davis [ll). (a) Prove that for the automaton A presented in Table 11.5 there exists a linear state behavior realization over Q. (b) Prove that there exists a quotient automaton A l x , where x is an SP partition, for which there does not exist a linear state behavior realization.
368
11. Linear automata
Table 11 5.Automaton to exercise 11.7
a
s 0
1
S1
s5
s4
s,
s3
s7
%
'8
'2
'6
%
s3
s,
s1
'6
SS
s4
ss
11.8. A linear automaton A = (F, A, B, 0, 0) without outputs, where F is a finite field, is strongly connected if and only if E(A) = (f: F , +F , IAx) = x + v, where Av = v] (Mason. Smith [l]). Let I be the k x k identity matrix. Prove that (a) if 1 is not the eigenvalue of A, then A is strongly connected if and only if E(A) = G(A)= (I] (b) if A is a nilpotent matrix, then A is strongly connected if and only if G ( A ) = (I]. 11.9. Let A = @ , A, B, C, 0) be a linear shift register, and let (03 be a nonfinite sequence of its input symbols. (a) Show that if lim o , = b , then the computation of the register cowern-w
ges to the limit g = b(1
-
k- 1
C a,)-1.
r=O
Exercises (b)
369
Rove that if (i) (a,,)= (b), where b f 0, (ii)
k- 1 C a,=l,
r=O (iii) Oca,cl for r = 0 , 1, ..., k - 1 , then the computation of A is divergent. (c) Show that if (a,,)= (0) and la,l+ lull + ... + I U ~ -c~1,I then the computation of A is convergent to 0 for any initial state of A.
Bibliographic note
The state of knowledge concerning linear automata up to the middle of sixties is presented in the monographs by Gill [3] and Harrison [ l ] and is not discussed here. Results dealing with shift registers, not only linear, are summarized in the monograph by Golomb [ll. The theory of linear automata is developed in a few directions. One of them deals with problems of linear realizations of finite automata. These group of problems was studied by Herman [l], Ecker [l-31, Zelcstein [l], Hartmanis and Walter [l], Mikolajczak [4], Reusch [l, 21, Stucky and Walter [l], Zeigler [l], Ury [l]. Second direction is concerned with the operation-preserving functions and is connected with the works of Hartmanis and Davis [l], Gallaire [l], Fuzimoto [l], Ecker [3], Mason and Smith [l, 21. Time-varying linear automata were investigated for the first time by Deuel [l, 21, and infinite linear automata by Gallaire et al. [l] Gossel and Poschel [l] have introduced the notion of L-linear automaton which is in general a time-varying automaton. Another generalization of a linear automaton, was introduced by Garg and Sing [l]. A model equivalent to shift register, called k-machine, was introduced in 1970 by Grodzki [l]. Linear k-machines were investigated by Zakowski [l], Chmiel and Zakowski [l], Krzesniak and Zakowski [l], and also by Stoklosa [1-8] and Stoklosa and Zakowski [l]. The results presented in this chapter dealing with realizations were obtained by Herman [l]. The results dealing with shift registers are taken from Stoklosa [3-51.
This Page Intentionally Left Blank
Bibliography
Agasandian G.A. [l] Automatic machines of variable structure, (in Russian), Doklady AN SSR, 174 (1967), 529-530 Aho A.V. [13 The Theory of Parsing Translation and Compilation, F’rentice-Hall, Englewood Cliffs, New York, 1972 Aho A.V., Hopcroft J.E., Ullman J.D. [l] The Design and Analysis of Computer Algorithms, Addison-Wesley Reading, MA, 1974 Amoroso S., Patt Y. [l] Decision procedures for surjectivily and injectiviry of parallel maps for tesselation structures, Journal of Computer and System Sciences, 6 (1972). 448-464 Arbib M.A. [l] Automaton automorphisms, Information and Control, 11 (1967), 147-154 Arbib M.A., Manes E.G. [l] Time-varying systems, Roc. First Internat Symp. on Category Theory Applied to Computation and Control, Lecture Notes in Computer Science, 25, Springer, Berlin, 1975, 87-92 Barnes B.H. [l] On the automorphism group of periodic automata, Information and Control, 20 (1972), 125-134 Bavel Z. [11 Structure and transition-preservingfinctions of finite automata, Journal o f the Association of Computing Machinery, 15 (1968), 135-158 Introduction to the Theory of Automata and Sequential Machines, Science [2] Research Associates, California, 1971 [31 The source as a tool in automata, Information and Control, 18 (1971), 140-155 Bavel Z., Miiller D.E. [11 Connectivity and reversibility in automata, Information and Control, 17 (1970), 231-239
372
Bibliography
Bergandy J. [ll On the connectivity of some subautomata of automata, Foundations of Control Engineering, 3 (1978), 89-103 [21 The procedure for determining connectivity of some subautomata of automata, Foundations of Control Engineering, 5 (1980), 183-186 Beyga L. [11 On the periodic sums of automata associated with isomorphisms, Foundations of Control Engineering, 1 (1976), 137-144 [21 Tran@ormations of finite automata associated with functions defined in sets of states, (in Polish) Ph.D. Thesis, Technical University of Poznan, 1977 [31 Some remarks on the transformations, group of automorphisms and characteristic semigroup of permutation controllable automata, Foundations of Control Engineering, 3 (1978), 153-160 Birkhoff G., Lipson J.D. [ll Heterogenous algebras, Journal of Combinatorial Theory, 8 (1970), 115-133 BIikle A. [ 11 Automata and Grammars, (in Polish), Polish Scientific Publishers, Warsaw, 1971 Bocian S. [ 11 The complexity of characteristic semigroup of k-asynchronous automata, Institute of Control Engineering, Technical Report, Technical University of Poznan, 1982 Both K.S. [ 11 Isomorphism testing for graphs, semigroups, and finite automata are polynomially equivalent problems, SIAM Journal of Computation, 7 (1978), 273-279 Chandra A.K., Stockmeyer LJ. [l] Alternation, Proceedings of the 17th Annual IEEE Symposium on Foundations of Computer Science, Houston, TX, 1976, 98-108 Chao-Chih Yang [ll Structural preserving morphisms of finite automata and application to graph isomorphism, C-24 (1975), 1133-1138 Chao-Chih Yang, Tarpy M.A [13 An algorithm for deriving all pairs of compatible states by closure classes, IEEE Transactions on Computers, C-25 (1975), 202-207 Chao-Chih Yang, Charmane P. May [ 11 Algorithms for finding directed graph isomorphisms by finite automata, Journal of Computer and Information Sciences, 9 (1980), 117-140 Chaudhry M.A. [l] Time-varying sequential machines in a category, I, Mem. Fac. Sc. Kyushu Univ., Ser. A., 30 (1972), 287-297
Bibliography [21
373
Time-varying sequential machines in a category, 11, Mem. Fac. Sc. Kyushu Univ., Ser. A., 31 (1977), 45-50
Chirkov M.K. 113 Foundations of the General Theory of Finite Automata, (in Russian), Izdatelstvo Leningradskogo Universiteta, Leningrad, 1975 Chmiel K., Zakowski W. [l] Properties of (a,2)-computations, Foundations of Control Engineering, 5 (1980), 3-11 Chomsky N. [ll On certain formal properties of grammars, Information and Control, 2 (1959), 137-167 [21 Context-free grammars and pushdown storage, Quart. Prog. Rept. No. 65, MIT Res. Lab. Electronics, Cambridge, MA (1962), 187-194 Cook A.S. [13 Characterizations of pushdown machines in terms of time-bounded computers, Journal of the Association for Computing Machinery, 18 (1971), 4-18 Dauscha W., Niirnberg G., Starke P.H., Winkler K.D. [13 Theorie der determinierten zeitvariablen Automaten, Elektronische Informationsverarbeitung und Kybernetik, 9 (1973), 455-511 Denning PJ., Dennis J.B., Qualitz J.E. [ 13 Machines, Languages, and Computation, Prentice-Hall, Englewood Cliffs, NJ. 1978 Dervisoglu B. [11 State assignment technique for synchronous sequential machines, Elecmnic Letters, 9 (1973), 416-417 Duel D.R. [11 Time-varying linear sequential machines, Ph.D. Thesis, University of California, Berkeley, 1967 [2] Time-varying linear sequential machines, Journal of Computer and System Sciences, 3 (1%9), 93-118 Dorfler W. [11 Zur algebraischen Theorie der Automaten, Elektronische Informationsverarbeitung und Kybernetik, 9 (1973). 171-177 [2] The direct product of automata and quasi-automata, Proceedings of the International Symposium, MFCS, Gdansk 1976, Lecture Notes in Computer Science, 45, 270-276 The Cartesian composition of automata, Mathematical Systems Theory, 11 [3] (1978). 239-257 Ecker K.H. [11 Uber die Halbgruppe linearer nichtsingularer Automaten, Zeitschrift fur Angewandte Mathematik und Mechanik, 52 (1972) T225-T226
374 [2] [3]
Bibliography On the semigroup of a linear nonsingular automaton, Mathematical Systems Theory, 6 (1973), 353-358 Algebraische Eigenschaften Linearen Automaten, Gesellschaft f& Mathematik und Datenverarbeitung, 87, Bonn, 1974
Evey J. [l] The theory of application of pushabwn store machines, Ph.D. Thesis, Harvard University, Cambridge, MA, 1%3 Felea V. [1] On the sequential relations computed by sequential machines with timevariant structure, An. Sti. Univ. “Al. I. Cum” Iasi Sect. Ia Mat. (N.S.), 20 (1974), 173-180 /2] Permutation time-variant automata with a constant final state set, Rev. Roum. Math. Pures et Appl., 21 (1976), 1327-1334 Fleck A.C. [l] On the automorphism group of an automaton, Journal of the Association for Computing Machinery, 12 (1965). 566-569 Fortune S., Wyllie J. [ 11 Parallelism in random access machines, Technical report TR78-334 Department of Computer Science, Cornell University, Ithaca, NY, 1978 Fuzimoto S. [ll On the structure of the semigroup generated by linear automata, Systems, Computers, Control, 5 (1974), 21-29 Gajewski T. [11 On the periodic equivalents of finite automata, IEEE Transactions on Computers, C-24 (1975), 991-994 [21 Extended covers of periodic equivalents of automata, Foundations of Control Engineering, 2 (1977), 175-193 [31 The analysis of the periodic realizability of the finite automata, (in Polish) Ph.D. Thesis, Technical University of Poznan, 1978 Gallaire H. [ll On the isomorphism on linear automata, [in:] Proceedings of the International Computing Symposium, Venice, (1972), 473-484 Gallaire H., Grey J.N., Harrison M.A., Herman G.T. [ll Infinite linear sequential machines, Journal of Computer and System Sciences, 2 (1968), 381-419 Carey M.R.,Johnson D.S. [ 11 Computers and Intractability, San Francisco, Freeman, 1979 Garg K., Singh H. [ 11 Two-dimensional linear sequential machines, Digital Processes, 6 (1980), 315-324 Gill A. [l] Comparison offinite state models, IRE Transactions on Circuits Theory, 7 (l%O), 178-179
Bibliography
375
Time-varying sequential machines, Journal of the Franklin Institute, 276 (1%3), 519-539 [3] Linear Sequential Circuits, McGraw Hill, New York, 1966 [4] Single-channel and multichannel finite-state machines, IEEE Transactions on Computers, C-19 (1970), 1073-1078 Gill A., Flexer J.R. [l] Periodic decomposition of sequential machines, Journal of the Association for Computing Machinery, 14 (1967). 666-676 Ginsburg S. [l] Compatibility of states in input independent machines, Journal of the Association for Computing Machinery, 6 (1961), 400-403 [2] An Introduction to Mathematical Machine Theory, Weslex, Palo AltoLondon, 1962 [3] Algebraic and Automata-Theoretic Properties of Formal Languages, North-Holland, Amsterdam, 1975 Glushkov V.M. [11 Synthesis of Digital Automata, (in Russian), Izdatelstvo Fiziko-Maternaticheskoi Literatury, Moscow, 1962 Gold E.M. [l] Comlexity of automaton identification from given data, Information and Control, 37 (1978), 302-320 Golomb S.W. [ 13 Shift Register Sequences, Holden-Day, San Francisco, 1%7 Gossel M., Poschel R. [l] On the characterisation of linear and linearizable automata by a superposition principle, Mathematical Systems Theory, 11 (1977), 61-76 Grasseli A., Luccio F. [l] A method for minimizing the number of internal states in incompletely specified sequential networks, IEEE Transactions on Electronic Cornputem, EC-14 (1969, 350-359 Grodzki Z. [l] The k-machines, Bulletin de L’Academie Polonaise des Sciences, Sene des sciences math., astronom. et phys., 18 (1970), 399-402 Grodzki Z., Siwak P. [ 11 Relational system of parallel k-registers, Foundations of Control Engineering, 6 (1981), 61-75 Cries D. [l] Describing the algorithm by Hopcroft, Acta Informatica, 2 (1973), 97-109 Grzymala-Busse J.W. 111 Automorphisms of polyadic automata, Journal of Association for Computing Machinery, 16 (1%9), 208-219 121 On the periodic representations and the reducibility of periodic automata, Journal of Association for Computing Machinery, 16 (169), 432-441 [2]
Bibliography Automorphisms of total periodic automata, Bulletin de la Societk des Amis des Sciences et des Lemes de Pogan, B-22 (1970-1971), 113-123 On the automorphisms of infinite time-varying automata, Bulletin de L’AcadCmie Polonaise des Sciences, SCrie des sciences math., as&. et phys. 18 (1970), 261-266 On the endomorphisms of finite automata, Mathematical Systems Theory, 4 (1970), 373-384 On the decomposition of periodic representations of sequential machines, IEEE Transactions on Computers, C-20 (1971), 929-933 Operation-preservingfunctions and autonomous factors of finite automata, Journal of Computers and System Sciences, 5 (1971), 465474 Periodic representations and T-partitionable equivalents of sequential machines, IEEE Transactions on Computers, C-20 (1971), 190-198 Subautomata of the finite automata associated with the change of the operating time, (in Polish), Dissertation No. 46, Technical University of Poznan, 1972 On the connectivity of the periodic sum of automata, High Tatras Symposium and Summer School “Mathematical Foundations of Computer Science”, High Tatras (1973), 231-235 On the automorphisms of periodic automata extensions, Bulletin de L’Acadkmie Polonaise des Sciences, SCrie des sciences math., astronom., et phys., 22 (1974), 325-331 On the periodic sum and extensions of finite automata, International Symposium on “Mathematical Foundations of Computer Science”, Jadwisin-Warsaw, 1974 On the Problem of Automata Set Representation, Lecture Notes in Computer Science, 34, Springer, Berlin (1975), 60-69 Guha R., Yeh R. [l] On periodicity of sequential machines, Journal of Computer and System Sciences, 8 (1974), 41-70 Gupta P.K., Dietmeyer D.L., [ 11 Fast state minimization of incompletely specified sequential machines, IEEE Transactions on Computers, C-22 (1973), 215-220 Harao M., Noguchi S. [ 11 On some dynamical properties of finite cellular automaton, IEEE Transaction on Computers, C-27 (1978), 42-52 Hardouin-Duparc J. [l] Paradis terrestre dans l’automate cellulaire de Conway, RAIRO, R-3 (1974), 63-71 Harring D.R. [ 13 Sequential-Circuit Synthesis: State Assignment Aspects, The MIT Press, Cambridge, MA, 1966
Bibliography
377
Harrison M.A. [l] Lectures on Linear Sequential Machines, Academic Press, New York, 1969 HarMel W., Maxson C. [13 A semigroup characterization of a linearly realizable automaton over GF(p), Journal of Computer and System Sciences, 14 (1977). 150-155 Hartmanis J. [l] Maximal autonomous clock of sequential machines, IEEE Transactions on Electronic Computers, EC-11 (1962), 83-85 [2] Minimal feedback realizations of sequential machines, IEEE Transactions on Electronic Computers, EC-15 (1966), 931-933 [3] Feasible Computations and Provable Complexity Properties, S I A M , Philadelphia, PA, 1978 Hartmanis J., Davis W.A. [l] Homomorphic images of linear sequential machines, Journal of Computer and System Sciences, 1 (1967), 155-165 Hartmanis J., Stearns R.E. [11 Algebraic Structure Theory of Sequential Machines, Rentice-Hall, Englewood Cliffs, NY, 1966 Hartmanis J., Walter H. [13 Group-theoretic characterization of linear permutation automata, Journal of Computer and System Sciences, 7 (1973), 168-189 Herman G.T. [ 11 Every finite sequential machine is linearly realizable, Journal of Computer and System Sciences, 5 (1971), 489-510 [2] When is a sequential machine the realization of another, Mathematical Systems Theory, 5 (1971), 115-127 Holt R.C., Reingold E. [l] On the time required to detect cycles and connectivity in graphs, Mathematical Systems Theory, 6 (1972), 103-106 Hopcroft J.E. [I] n log n algorithm for minimizing states in finite automata, Technical Report CS 71-190, Computer Science Dept., Stanford Univ., Stanford, 1971 Hopcroft J.E., Ullman J.D. [l] Formal Languages and their Relation to Automata, Addison-Wesley, Reading, MA, 1%9 121 Introduction to Automata Theory, Languages and Computation, AddisonWesley, Reading. MA, 1979 Howard B.V. [ 13 Partition methods for read-only memory sequential machines, Electronic Letters, 8 (1972). 334-336
378
Bibliography
Huf'fman D.A. [ll The synthesis of sequential circuits, Journal of the Franklin Institute, 257 (1954). 275-303 An algebra for periodically time-varying linear binary sequence trans[21 ducers, AM. Comput. Lab. Harvard University, 29 (1959), 189-202 Hwang K. 111 On the direct product of periodically varying sequential machines, proceedings of the 5th Annual Princeton Conference on Information Sciences and Systems, Princeton, NJ, (1971) 323 123 Periodic realization of synchronous sequential machines, IEEE Transactions on Computers, C-22 (1973), 923-927 [3] Some structural complexities of time-varying sequential machines, International Journal of Computer and Information Sciences, 4 (1975), 237-245 141 On the periodicity of regular languages, Information and Control, 40 (1979), 205-222 Ibarra O.H. [l] On two-way multihead automata, Journal of Computer and System Sciences, 7 (1973), 28-36 Ito M. [l] A representation of strongly connected automaton and its applications, Journal of Computer and System Sciences, 17 (1978), 65-80 Jump J.R., Marathe S. [l] On the length of feedback shgt registers, Information and Control, 19 (1971). 345-352 Kameda T., Weiner P. El3 On the reduction of nondeterministic automata, Proceedings of the 2nd Annual Princeton Conference on Information Sciences and Systems, 1968, 348-352 Karpov Yu. [l] About the group of automorphisms of the finite automaton, (in Russian), Avtomatika i Telemekanika, 8 (1973). 70-74 Kleene S.C. [l] Representation of events in nerve nets and finite automata, Automata Studies, Princeton, (1956), 3-4 1 Kowalski S., Mostowski A.W. [l] Theory of Automata and Mathematical Linguistics, (in Polish), PWN, Warsaw 1979 Krzesniak A., Zakowski W. [l] On some properties of (a,k)-computations, Foundations of Control Engineering, 6 (1981), 95-107
Bibliography
379
Kuroda S.Y. [l] Classes of languages and linear-bounded automata, Information and Control, 7 (1964). 207-223 Leake RJ. [l] Realization of sequential machines, IEEE Transactions on Computers, C-17 (1968), 1177 van Leeuwen J. [l] Variations of a new machine model, Proceedings of the 17th Annual Symposium on Foundations of Computer Science, Houston, TX, 1976, 228-235 Levin L.A. [11 Universal sorting problems, Problemy Peredachi Informacii, 9 (1973), 265-266 Machtey M., Young P. [l] An Introduction to the General Theory of Algorithms, North-Holland, New York, 1978 Mago 0. [l] Monotone functions in sequential circuits, IEEE Transactions on Computers. C-22 (1973), 928-933 Majewski W., Albicki A. [l] Algebraic Automata Theory, (in Polish), WNT, Warsaw, 1980 Marouka A., Kimura M. [l] Injectivity and surjectivily of parallel maps for cellular automata, Journal of Computer and System Sciences, 18 (1979), 47-64 Masunaga Y., Noguchi S. [l] A structure theory of automata characterized by groups, Journal of Computer and System Sciences, 7 (1973), 300-305 Masunaga Y., Noguchi S., Oizumi J. [13 A characterization of automata and direct product decomposition, Journal of Computer and System Sciences, 13 (1976), 74-89 Maxson CJ., Smith H.C. [l] Endomorphisms of linear automata, Journal of Computer and System Sciences, 17 (1978), 98-107 [21 Automorphisms of linear automata, Journal of Computer and System Sciences, 19 (1979), 18-26 McDonald J.F., Inder Singh [ 11 Extensions of the Weiner-Smith algorithm for m-ary synchronous sequential circuits design, [in:] Proceedings of the 1974 International Symposium on Multiple-Valued Logic. 1974, 135-154 Mealy G.H. [l] A method for synthesizing sequential circuits, Bell System Technical Journal, 34 (1955), 1045-1079
380
Bibliography
Miadowicz Z. [l] On some problems concerning the periodic sum of finite automata, Proceedings of 2nd IFAC Symposium on Discrete Systems, Dresden, 5 (1977), 194-203 [21 The automorphism group of the periodic sum of finite automata, Foundations of Control Engineering, 2 (1977), 195-203 [31 Automata with the change of the operating time and trangormations [periodic] of finite automata, (in Polish), Dissertations No. 131, Technical University of Poznan, 1981 [4] On the problem of the connectedness of the periodic sum of finite automata, MTASzTAKI-Budapest Tanulmanyok, 137 (1982), 151-158 [ S ] Time-varying automata. A survey, ICS PAS Reports, 491, Warsaw 1982 Miadowicz Z., Mikolajczak B. [ll On the connectedness of periodic sum of automata, Foundations o f Control Engineering, 1 (1976), 97-102 Mikolajczak B. [l] On some properties of cyclic automata and their extensions, Goos G., Hartmanis J. (eds.), Proceedings of the Mathematical Foundations of Computer Science, Gdansk 1976, Lecture Notes in Computer Science, 45,
430435 [2]
Realization versus simulation in finite automata, Systems Science, 9 (1983), 87-101 [3] Algebraic theory of generalized extensions of finite automata, (in Russian), MTASzTAKI-Budapest, Tanulmanyok, (1977) [4] On the reducibility of periodic automata, Foundations of Control Erigineering, 1 (1975), 15-36 [ 5 ] On linear and extended linear realization of generalized automata extensions, Technical Report, Computer Science Department, Cornell University, Ithaca, 1977 [6] On the characteristic semigroup of strongly connected automata, Technical Report, Computer Science Department, Cornell University, Ithaca, 1977 On the isomorphisms of generalized finite automata extensions, Wissen[7] schaftliche Zeitschriften der Technische Universitiit Dresden, Proceedings of International Symposium “Algebraische Methoden in der Automaten Theorie”, Altenberg, 1978 [8] On the isomorphisms of generalized periodic sums, Foundations of Control Engineering, 3 (1978), 71-80 [9] On the structure of cyclic automata and their generalized periodic sums, Foundations of Conml Engineering, 3 (1978), 9-17 [ 101 Generalized periodic transformations of finite automata, Dissertations No. 98, Technical University of Poznan, 1979
Bibliography
38 1
[ll] On some problems associated with a memory minimization in finite automata, [in:] Arato M., Varga L. (eds.), Mathematical Models in Computer Systems, Proceedings of the Third Hungarian Computer Science Conference, AkadCmiai Kiad6, Budapest, 1981 [12] On the generalized functions presenting operations of finite automata, Foundations of Control Engineering, 6 (1981), 211-247 [13] On some NP-complete problems in the theory of finite automata, Rostocker Mathematischen Kolloquium (RAMAKO),19 (1982), 73-83 [14] Time computational complexity of decision and search problems in finite automata, Proceedings of the 6th Symposium uber Operations Research, Augsburg, 1981, Athaeum Printers, 405-417 [15] Realization versus simulation in finite automata, [in:] Ruschitzka M. et al. (eds.), Parallel and Large-Scale Computer, Performance, Architecture, Applications, North-Holland, Amsterdam, 1983, 91-94. 10th IMACS Congress on Systems Simulation and Scientic Computation, August 8-13, 1982, Montreal, Canada, Congress Proceedings Mikolajczak B., Miadowicz Z. [l] On the automorphisms group of strongly related automata and structural properties of finite automata extensions, Foundations of Control Engineering, 1 (1976), 83-95 Mikolajczak B., Stoklosa J. [ 13 Computational Complexity of Algorithms, (in Polish), Technical University of Poznan Press, Poznan, 1984 Moore E.F. [11 Gedanken-experiments of sequential machines, Automata Studies, Princeton University Press, Princeton, NJ. 1956, 129-153 [2] Sequential Machines: Selected Papers, Addison-Wesley, Reading, MA, 1974 [3] Machine models of self-reproduction, [in:] Burks A.W. (ed.), Essays on Cellular Automata, University of Illinois Press, Urbana, IL, (1970), 187-203 [4] On the bounds for state-set size in the proofs of equivalence between deterministic, nondeterministic and two-way finite automata, IEEE Transactions on Computers, C-20 (1971), 1211-1214 Myhill J. [l] Linear bounded automata, Wright Air Development Division Technical Note, Wright-Petterson Air Force Base. OH, (1960). 60-165 Nerode A. [13 Linear automaton transformations, Proceedings of the American Mathematical Society, 9 (1958), 541-544 Nichols AJ. [ 13 Minimal shift-register realizations of sequential machines, IEEE Transactions on Electronic Computers, EC-14, (1965), 688-700
382
Bibliography
Novansky R. 111 Memory elements and coding of internal states of sequential machines, Information Processing Machines, 44 (1968), 33-82 Nozaki A. 111 Equivalence problem of nondeterministic finite automata, Journal of Computer and System Sciences, 18 (1979), 8-17 Oehmke R.H. [ll On the structures of an automon and its input semigroup, Journal of the Association for Computing Machinery, 10 (1963). 521-525 121 On the strongly connected automata, Technical Report 62, University of Iowa, Iowa, 1971 [31 The semigroup of a strongly connected automaton, Mathematical Systems Theory, 15 (1978), 351-356 Oettinger A.G. [ 11 Automatic syntactic analysis and the push-down store, [in:] Proceedings of the Symposium of Applied Mathematics, 12, AMS, Providence, RI, 1961, 104-129 Paul1 M.C., Unger S.H. [l] Minimizing the number of states in incompletely specified sequential switching functions, IRE Transactions Electronic Computers, EC-8 (1959), 356-367 Pawlaczyk B. [l] On the connectivity of the subautomata associated with the change of the operating time of finite automata, Foundations of Control Engineering, 2 (1977), 27-32 [2] On some problems of the connectedness of the subautomata associated with the change of the operating time of finite automata, Foundations of Control Engineering, 3 (1978), 171-176 Pfleeger C.P. El3 State reduction in incompletely specified finite state machines, IEEE Transactions on Computers, C-22 (1973), 1099-1102 Philokyprou G., Halatsis C., Gaitanis N. [ 13 On the problem of finding d , t , r and j rype partition pairs of a sequential machine, IEEE Transactions on Computers, C-26 (1977), 294-297 Pickett H.E. [l] Note concerning the algebraic theory of automata, Journal of the Association for Computing Machinery, 14 (1967), 382-388 Poschel R., Gossel M. [l] On linear automata, their characterization by a superposition principle and state depending modeling, Foundation of Control Engineering, 1 (1976), 223-234
Bibliography
383
Prather R.E. [l] An algebraic proof of the Paull-Unger theorem, IEEE Transactions on Computers, C-20 (1971), 578-580 Pratt V.R., Stockmeyer LJ. [l] A characterization of the power of vector machines, Journal of Computer and System Sciences, 12 (1976), 198-221 Rabin M.O. [l] Two-way finite automata, [in:] Proceedings Summer Institute of Symbolic Logic, Cornell University, Ithaca, 1957, 366-369 Rabin M.O., Scott D. [l] Finite automata and their decision problems, IBM Journal of Research and Development, 3 (1959), 114-125 Rao C.V.S., Biswas N.A. [11 Minimizations of incompletely specified sequential machines, IEEE Transactions on Computers, C-24 (1975), 1089-1100 Rasiowa H. [l] The Introduction to the Contemporary Mathematics, (in Polish), PWN, Warsaw, 1971 Reischer G., Simovici D.A. [l] On the existence of the periodic analog of a finite connected automaton, IEEE Transactions'on Computers, C-21 (1972), 208-211 Reusch B. [l] Two papers on the linearity of finite automata, Department of Computer Science, Cornell University, Technical Report No. 267, 1976 Linear realization of finite automata, Journal of Computer and System [21 Science, 15 (1977), 146-168 [3] A note on state reduction and homomorphisms for incompletely specified sequential machines, Forschungsbericht nr 120, Abteilung Informatik, Universiat Dorunund, 1981 Salomaa A. [l] Formal Languages, Academic Press, New York, 1973 121 On finite automata with time-variant structure, Information and Control, 13 (1968), 185-198 [3] On languages accepted by probabilistic and time-variant automata, Proceedings of the 2nd Annual Princeton Conference on Information Science and Systems, Princeton, N.J., 1%8 Schutzenberger M.P. [ll On context-free languages and pushdown automata, Information and Control, 6 (1963). 246-264 Sheperdson J.C. [ll The reduction of two-way automata to one-way automata, IBM Journal of Research and Development, 3 (1959), 198-200
384
Bibliography
Simovici D.A. [l] Decomposition of time-varying automata, Ann. Sti. Univ. Iasi, Sec. Ia, 22 (1976), 243-248 Siwak P. On realization of the automaton with a shijt register, (in Polish), Studia z Automatyki, 1 (1971), 9-17 Realization of the automaton with two cyclic registers, (in Polish), Studia z Automatyki, 1 (1972), 5-15 On state assignment problem of synchronous automata, (in Polish), Studia z Automatyki, 3 (1974), 39-55 State assignment of synchronous automata and some structures of their realizations, (in Polish), Studia z Automatyki, 4 (1975). 35-76 Some extensions and memory of automata, Foundations of Control Engineering, 1 (1976), 235-242 Decomposition of automata onto components with gated clock signals, Foundations of Control Engineering, 2 (1977), 205-210 On some asynchronous net of synchronous automata, (in Polish), [in:] VIII Krajowa Konferencja Automatyki, Szczecin, 1980, 674-679 Realization of automata with gated clock pulses of flip-flops, (in Polish), Archiwum Automatyki i Telemechaniki, 25 (1980), 85-95 Realization of automata with controlled time sharing of components, (in Polish), Zeszyty Naukowe Politechniki Poznanskiej, Elektryka 23 (1981), 3547 The problem of looking for the GOE configurations in cellular network, Studia z Automatyki, 10 (1984), 5-19 Starke P.H. [l] On the sequential relations of time-variant automata, Proceedings of the Symposium and Summer School, MFCS, 1973 Stoklosa J. On operation-preserving functions of shgt registers, Foundations of Control Engineering, 2 (1977), 211-214 Simulation of process on (a,k)-machines, [in:] Sydow A. (ed.), Systems, Analysis and Simulation 1980, Berlin, Akademie-Verlag, 1980, 359 An automaton model for a dfference equation with real coefficients, IMAG, Rapport de recherche, No. 248, Grenoble, 1981 Difference equations and (a, k)-machines, Systems Science 9 (1983), 117-125 Properties of (a,k)-computations, Foundations of Control Engineering, 6 (1981), 163-171 Realizations of diference equations on (a,k)-machines, Fourth IMACS International Symposium for PDE’s held at Lehigh University, Bethlehem, PA, 1981
Bibliography
385
Linear automata, k-machines, differences, equations - a systematic approach, ICS PAS Reports No. 486. Warsaw, 1982 [8] Transformations of some dynam’cal systems-networks of (a, k)-machines generating cyclic sequences, [in:] Trappl R. (ed.), Cybernetic and Systems Research, Amsterdam, North Holland, 1982, 179-183 Stoklosa J., Zakowski W. [ 11 Computations of (a, k)-machines, Theoretical Computer Science, 14 (1981), 247-265 Stucky W., Walter H. [11 Minimal linear realization of autonomous automata, Information and Control, 16 (1970), 66-84 Traczyk W. [ 13 The Synthesis of Asynchronous Automata (in Polish), Technical University of Warsaw, Warsaw, 1969 Digital Systems. Theoretical Foundations and Methods of Synthesis (in [2] Polish), WNT, Warsaw, 1982 Trauth Ch.A. [l] Group-type automata, Journal of the Association for Computing Machinery, 13 (1966), 170-175 Turing A.M. [l] On computable numbers with an application to the Entscheidungsproblem, [in:] Proceeding London Math. Soc., 2-42, 230-265 (errata, ibid., 2-43, 544-546) Ury L. [l] Optimal decomposition of linear automata, [in:] Goos G., Hartmanis J. (eds.), Lecture Notes in Computer Science, 71, Springer, Berlin, (1970), 659-667 Vollmar R. [l] On Turing machines with variable structure, Information Sciences, 8 (1975), 259-270 weeg G.P. [l] The group and semigroup associated with automata, [in:] Fox J . (ed.), Proceedings of Symposium Mathematical Theory of Automata, Brooklyn, 1962, 257-266 [2] The structure of an automaton and its operation-preserving transformation group, Journal of the Association for Computing Machinery, 9 (1962), 345-349 [3] The automorphisms group of the direct product of strongly connected automata, Journal of the Association for Computing Machinery, 12 (1%5), 187-195 Weiner P., Smith EJ. [11 Optimization of reduced dependencis for synchronous sequential machines, IEEE Transactions on Electronic Computers, EC-16 (1%7), 835-847 [7]
386
Bibliography
Yau S.S. [l] Autonomous clocks in sequential machines, IEEE Transactions on Electronic Computers, EC-14 (1%5), 467-472 Zeigler B.D. [l] Every discrete input machine is linearly simultable, Journal of Computer and System Sciences, 7 (1972), 161-167 Zelcstein Y. [l] On the semigroup of linear sequential machines, manuscript, 1972 Zakowski W. [l] Some properties of (a,k)-machines, (in Polish), ICS PAS Reports No. 362, Warsaw, 1979
Index
(2,7)-numeration function 292 (2, T)-numeration relation of A
induced by f 295 (2,T)-numeration relation (2,T)-periodic automaton
295 270, 276,
280,282 (z, T)-periodic cover of A induced
by f 295 (2,T)-periodic partition 283, (2,T)-periodic representation
293 282,
292, 293, 295-297 (0, m)-asynchronous 132 (0, m)-asynchronous automaton 130, 132, 147.335 (1, 1)-asynchronousautomaton 130 (k, 1)-asynchronous 138 (k, 1)-asynchronousautomaton 139, 146, 147, 194 (k,m)-asynchronous 58, 130 (k,m)-asynchronous automaton 131, 132, 135, 136 (r, t)-generated function 160 (r + 1)-adic automorphism 339 (r + 1)-adic group 337 (s, [)-generated function 158 (s, t)-transition generated function 158, 165 (sA, sB)-transitiongenerated function 156 (T, n)-image of automaton 248 I-channel analog 123-126 1-track automaton 27 2-DFA 72,73,75 2-track automaton 27
Abelian 328 Abelian automaton 63, 146,329 Acceptable 94 Acceptable partition 95,96 Acceptor 17,262,265 Acceptor of the simulator 262 Addition and multiplication of partitions 145 Additive group 354 Admissibility 216 Admissible 102 Admissible sequence 102 Agasandian 298 Algebra 3 Algebraic system 3, 50 Algorithm 197 Algorithm SPLIT 96 Algorithm SPLIT@, (Bi,a)) 97 Alphabet 9 Alphabet generated 178, 179 Alphabet generated functions 180 Alternating Turing machine 34 Amoroso 268 Amount of feedback 266 Analogous 122 Analysis problem 186 Anti-isomorphic 59 Anti-isomorphism 4, 59 Arbib 196, 299 Array 257 Assignment 250 Associative 4 Asynchronism 25 1
388 Asynchronism of components 247, 249 Asynchronous automaton 62, 130, 138, 139, 146, 147, 150 Asynchronous net 246 Asynchronous network 246-249, 253 Automata equivalence 84 Automata set representation problem 186 Automata set simulation 187, 192 Automata set Simulation problem 171, 186 Automaton 49, 54, 57, 61, 67, 70, 73-76, 100, 102, 108, 109, 111-116, 121, 123, 127, 128, 132-134, 145, 147-149, 186, 193, 197, 199,200,205, 208, 223,246, 249, 252, 253, 255, 261-263, 286, 297, 301, 310, 311, 347-349, 352, 361,367 Automaton A simulates automaton B 186 Automaton A(i)d 172 Automaton B covers automaton A 107 Automaton without outputs 47 Automorphism 3, 148, 160, 163, 194,272, 303,305, 311, 337 Automorphism group 63, 146, 161, 337 Automorphism-preserving transformations 304 Autonomous 57 Autonomous automaton 57, 91, 166, 173,284, 285, 291, 362, 366 Autonomous factor 130, 132-134, 163, 166, 167, 168, 181, 188, 193 Autonomous factor of automaton 57, 193 Autonomous subautomaton 131, 132, 136
Index
Barnes 196, 299 Bavel 82, 128, 146, 153, 156, 189, 195, 196 Bergandy 129, 153 Beyga 305, 317 Bijection 322, 323, 326, 328, 330, 331, 338, 351 Binary relation 2, 16 Binary state assignment 227 Biswas 117 Bocian 192 Both 192 Bounded automaton 270 Bounded time-varying automaton 274 Canonical 180 Canonical generalized homomorphism 180, 181 Cellular net 257, 260-262, 264, 268 Cellular network 261 Cellular structure 257 Chain 164 Chandra 34 Chao Chih Yang 196 Characteristic 5 Characteristic group 228, 366 Characteristic monoid 58-60 characteristic number R 142, 144, 145 Characteristic polynomial 35 1, 360, 366 Characteristic semigroup 59-61, 63, 158, 160, 161, 176, 182, 188, 192 Chaudry 299 Chmiel 369 Chomsky 34 Chomsky normal form 34 Clique 6, 100, 101, 222 Clique problem 111 Clock pulses 251 Closed 3 Closed family 103
Index Closure 10, 68, 231 Coding 198,202,225, 356 Coding partition 209, 223, 225, 243 Commutative 4 Commutative normal subgroup 366 Companion mamx 351 Compatibility classes 113, 116 Compatibility relation 103 Compatible 103,287 Compatible states 104, 112 Complement 309 Complement graph 221 Complement of the automaton 308 Complete 6, 269 Complete automaton 218, 244, 249, 254,267,268 Complete deterministic automaton 91, 94, 100, 167 Complete deterministic Moore’s automaton 86,87 Complete family 103 Complex mnsform 302 Component 163, 167,204 Component of an automaton 54 Composition 287 Computation of a shift register 358 Computational complexity 297 Concatenation 5, 10, 68 Configuration 18, 25, 26, 28, 30, 73,74 Configuration of a net 257 Configuration of a two-way automaton 73 Configuration with a finite support 257 Congruence 3, 146, 148, 150 Congruence of an automaton 149 Connected 54, 129, 130 Connected automaton 131, 146, 285,293 Connected component 139, 140, 193
389 Connected components of an input subautomaton A’ 144 Connected “onto” automaton 140-142, 144, 145 Connectedness 130, 132, 137, 139 Connectedness of input subautomata 138 Connectedness of input subautomata A’ 145 Connectedness partition 139 Connectedness relation 139, 140, 146 Connectivity 249 Connectivity condition 165 Context-free grammar 13, 14 Context-free language 33, 34 Context-sensitive 26 Context-sensitive grammar 27 Control conditions 227 Controllability 336 Controllable automaton 62, 152, 304,337 Controllable permutation automaton 305 Conway 258 Conway’s cellular net 262, 268 Cook 34 Cooperate synchronously 23 1 Cooperate with time sharing 253 Cover 49,52, 103, 107 Cover induced by R 3 Cover on the set of states 103 Covers family 103 CP(A) 283 Current state 39 Cycle 131, 163, 165 Cycle length 193, 358 Cycle of component 57 Cycle-type partition 361 Cyclic 156 Cyclic automaton 62 Cyclic group 4
390 Cyclic partition 283 Cyclic sequence 361 Dauscha 298 Davis 367, 369 Dead 19 Decision problem 23 Decomposition 149, 160, 231, 247, 287 Degree 270,290,292 Delay type 213 Delay type automaton 230 Denning 34 Dennis 34 Dervisoglu 228 Deterministic 269 Deterministic automaton 17, 69, 90, 116 Deterministic complete 16 Deterministic complete automaton 87,91,92, 160, 182 Deterministic complete Moore’s automaton 92,96 Deterministic complete Rabin-Scott automaton 90 Deterministic incomplete 16 Deterministic incomplete automaton 104,111 Deterministic linear bounded automaton 33, 34 Deterministic pushdown automaton 28 Deterministic Rabin-Scott automaton 64,65,80 Deterministic Turing machine 18, 21 Deuel 369 DFA 36,41, 114, 128, 129, 145, 20 1 DFA-L 36 DFA-R 36 Diagonal automaton 101 Diagram of automaton 38
Index Dietmeyer 1 17 Difference 10 Direct product 27 1 Direct product of automata 54 Direct sum 271,293 Direct sum of automata 54 Directed graph 6, 241 Disjoint 27 1 Distance condition 165 Distinguishable states 114 Distributive 6 Distributive lattice 145 Divisor condition 165 Domain 283 Dorfler 82,268 Duel 299 Ecker 369 Empty 5 Empty closure 67 Empty language 10 Empty word 9, 70 Endomorphism 3, 48, 146, 148, 150, 194,272 Epimorphic image of automaton 91 Epimorphism 3, 108 Equipotent 290 Equipotent automaton 270,271 Equivalence (distinguishability) of states 89 Equivalence class 90,92, 134, 183 Equivalence of automata 83, 273, 276 Equivalence of states 84, 94, 126 Equivalence relation 49, 51, 84, 87, 89, 91, 92, 134, 177, 291 Equivalence relation E 80 Equivalence relation RL 79 Equivalent 41, 84, 86, 272, 273 Equivalent automaton 66,67, 114 Equivalent deterministic automata 91 Evey 34
Index
Excitation function 204,206, 213-215, 226-228 Exponential algorithm 24, 114 Exponential computational complexity 109 Extended (7,T)-periodic representation 294,297 Extended (T, T)-periodic representation of A induced by f 295 Extended autonomous factor 57, 181-183 Extended basic cover 296 Extended linear realization 367 Extended periodic representation 294,295 Extended periodic representation of A’ induced by C 294 Extended periodic representations of an automaton 297 Extended strictly periodic representation 294 Extended T-periodic representation of A’ 294 Extended transform 307, 309 Extension 312 Extension of configuration 258 Extension of the automaton 313 f-decomposition 247-249 Factor algebra 3 Family of final sets 103, 106 Family of languages accepted by the class of all time-varying RabinScott automata 277 Family of languages accepted by the class of all nondeterministic RabinScott automata 281 Family of maximal sets 106 Family of periodic covers of A’ induced by A 295 Feasible problems 25 Feedback 265,267 Feedback free 266, 366
39 1 Feedback free automaton 266, 366 Felea 299 Field 5 Field of characteristic p 355, 356 Final 19 Final function 73 Final state 111 Final tape 19 Finite 269 Finite automaton 330, 352, 354, 355 Finite configuration 257 Finite deterministic automaton of Moore type 35 Finite deterministic automaton of Mealy type 36 Finite extension 357 Finite field 357 Finite index 79 Finite support 260 Fixed analog 276,282,294,296, 321, 323-325, 327, 330, 332-338, 345,346 Fixed automaton 270, 273, 274, 291 Fixed constituents 282,322, 324, 325,327,328,337 Fleck 82, 161. 195 Flexer 299 Flow information inequalities 214, 215 Formal grammar 11-13 Fortune 34 Free monoid 5 Front automaton 236,253,266 Full quasi-subautomaton 53 Full subautomaton 53, 56 Function 2,271,287 Function preserving operation 47, 156 Fundamental cycle 360, 362 Fundamental cycle length 358 Fuzimoto 369
392
G(A) 289 Gajewski 299 Gallaire 369 Garey 34, 100, 117 Garg 369 Generalized automorphism 173, 183 Generalized canonical hornomorphism 181, 182 Generalized endomorphism 183 Generalized epimorphism 176 Generalized functions preserving operations 176, 189 Generalized homomorphic image 189 Generalized homomorphism 173, 177-181, 183, 188, 189, 191, 192 Generalized homomorphism of automaton A into B 173 Generalized isomorphism 178, 183 Generalized quotient automaton 177 Generalized subautomaton associated with h = (hs, hz+) 175 Generating partitions 218, 224, 225 Generator of an automaton 52 Generators 17 Genetic set 189 Genetic subset 189 Gill 82, 119, 153, 298, 299, 369 Ginsburg 82, 117 Global function 257 Gluskov 82 GOE 260 GOE configuration 258, 260, 262-264, 268 Golomb 369 Gossel 369 Grammar 7, 23, 34, 72 Graph 6, 38 Graph coloring 113 Graph of automaton transitions 38 Grasseli 117 Gries 117
Index
Grodzki 268,369 Group 4, 311 Group of automorphisms 160, 161, 167, 194,287,305, 308, 366 Group-type automaton 63 Group-type strongly connected automaton 63 Groupoid 4 Groups of automorphisms 194 Grzymala-Busse 120, 129, 153, 164, 171, 195, 196, 299, 317, 319, 336,346, 362 Guha 299 Gupta 117 Harao 268 Hardouin-Duparc 263, 268 Haring 228,268 Harring 241 Harrison 369 Hartmanis 34, 88, 186, 228, 268, 298, 366,367, 369 Hasse diagram 211,212 Herman 228,369 Herman realization 200-202 Heuristic algorithms 113 Homogeneous equation 359 Homomorphic image 91, 109, 158, 162, 164 Homomorphic preimage 110 Homomorphic realization 200, 202, 203, 228, 265-267 Homomorphic transformation 165 Homomorphism 3, 49, 51, 61, 63, 91, 107, 109, 156-158, 162, 163, 165-168, 171, 176, 189, 199, 202, 271, 294,296,297 Homomorphism of automaton A 47 Hopcroft 34, 82 Hopcroft’s algorithm 91, 93, 94, 100, 117 Hopcroft’s minimization algorithm 115
Index Hopcroft’s polynomial algorithm 100 Howard 268 Huffman 117,298 Hwang 298,299 i-channel analog 123, 125-127 i-channel automaton 120, 122-125 i-th neighbor 257 Ibarra 34 Idempotent 4, 162, 163 Identity 4 IIP(A) 283 Implication diagram 60 Implication diagram of the characteristic monoid 59 Incidence relation 100 Incompatible 102 Incompatible states 104 Incomplete 36 Incomplete automaton 91, 102, 109, 115, 116,267 Incomplete automaton minimization 113, 117 Incomplete deterministic automata 102 Incomplete Mealy’s automata 107 Index is utilized 216 Induced by a periodic representation 283 Induced by a periodic partition 283 Infimum 5 Infinite automaton 298 Infinite countable 179 Infinite fixed automaton 274, 277 Infinite looping 74 Infinite sequence of functions 276 Information flow 214 Information flow inequalities 213 Initial class 55 Initial state 16, 101, 111, 360, 361 Initial symbol 11 Initial tape 19
393 Injection 203 Input alphabet 35, 128 Input-dependent subset 53 Input-incomplete DFA 36 Input-independent 51, 242 Input-independent cover 296 Input-independent partition 291, 292,361 Input-independent partition pair 243 Input-state partition pair 208, 212 Input subautomaton 53, 119-121, 125, 126, 130, 131, 137, 140, 149, 188,309,324,327, 328 Input subautomaton A(? 171 Input subautomaton A,’ 133, 135-137, 139 Input subautomaton Agd(i,’3 140 Input subautomaton A’ 134-140, 145, 146, 148 Input symbols 35 Input tape 73 Instance 23 Internal variable 204 Intersection of languages 70 Intersection of partitions 50 Inverse relation 2 Irreducible 5 Irredundant 232,294 Irredundant cover 2,266 Irredundant generator 52 Isomorphic 6, 256, 295, 3 17, 351 Isomorphic automata 321, 342-344, 351 Isomorphic permutation automata 325 Isomorphic realization 203, 228 Isomorphism 3, 165, 167, 189, 272. 313-316, 329 Isomorphism of the periodic automata 316 Isomorphisms of extensions of automata 312
394 Isotrophism of local function 264 It0 82. 131 Johnson 34, 100, 117 Jump 241,268 k-asynchronous automaton 194 k-automorphism 288 k-channel automaton 120 k-channel finite automaton 119 k-colorability 111, 113, 191 k-colorable 6, 111 k-distinguishable 86 k-endomorphism 288 k-equivalence relations 87 k-equivalent 85, 86 k-function 287 k-G(A) 289 k-homomorphism 288 k-isomorphism 288 Kameda 117 Karpov’s algorithm 196 Karpow 195 Kernel 4, 55 Kernel of a configuration 257 Kimura 268 Kleene 34 Krzesniak 369 K u r d 34 /-distinguishable 86 Language 7, 10, 22, 25, 30, 73, 81, 83, 279 Language accepted by a time-varying Rabin-Scott automaton 277 Language accepted by a nondeterministic time-varying RabinScott automaton 281 Language L(G) generated by a formal grammarG 11 Language recognized by A 64 Lattice 5, 233 Leake 228 Left coset 4 Left linear 14
Index Left linear grammar 72 Left transform of automaton 301 Length 5 Length of a chain 164 Length of path 163 Length of register 240 Length of the cycle 57 Length of the state s 158 Length of the word 10 Level 292 Level condition 165 Level of state 57 Levin 191, 192 Linear automaton 347-351, 352, 353,355,356,358, 366, 368 Linear bounded 17 Linear bounded automaton 18,25, 26 Linear equation 349 Linear realizability 354 Linear shift register 368 Linear state behavior realization 366,367 Local transition function 257 Loop-free 23 1, 232 Loop-free decomposition 232-234 Loop-free network 232 Loop-free realizations 247 Loop-free state realization 231 Lowerbound 5 Luccio 117 m-adic group 5 m-adic semigroup 5 m-ary assignments 223 m-ary operation 3 Machtey 34 Mago 228 Manes 299 Marathe 241,268 Markov computable functions 24 Maruoka 268 Masunaga 82
Index Matrix 351,357 Matrix equation 349 Maximal 282 Maximal connected subautomata 145 Maximal connected “onto” subautomata 145, 146 Maximal cover 103 Maximal partitions 222,227 Maximal periodic representation 336 Maximal set of compatible states 103 Maximal set of incompatible states 103 Maximal subautomaton 156 Maxson 196,368,369 McDonald 228 Mealy 82 Mealy automaton 84, 101. 103, 119, 174, 198,261,268,272, 347 Mealy model 43,44,269,270 Mealy type 198 Mealy type automaton 37,41,44, 45 Mealy type deterministic automaton 42.43 Measure of complexity of the structure 207 Miadowicz 129, 153,299, 346 Mikolajczak 34,82, 117, 176, 177, 180. 181, 186, 189, 191, 195, 317, 319, 341,346,367, 369 Minimal 273 Minimal automaton 86, 90, 91, 103, 111, 115, 125, 199 Minimal automaton A,,, 87 Minimal conml information 226, 227 Minimal cover 107 Minimal cyclic partition 291 Minimal generating set 285,286,
395 295 Minimal generators 53 Minimal input-independent partition 292,293,296 Minimal n-admissibility 217 Minimal periodic partition 286 Minimal predecessing information 223 Minimal set of generators 159, 167, 193 Minimal SP covers 91 Minimal structure complexity 217, 218 Minimization algorithm 115 Minimization of automata 117 Minimization of incomplete automaton 111 Minimization problem 83, 111 Minimization process 102 Mirror-image of the word 10 Mm partition pair 208-215 Monoid 4 Monomorphism 3,49 Moore 82, 117,268 Moore automaton 84,88, 114, 115, 180, 198,272,276,277, 347, 366 Moore model 43,44,85,269,270 Moore neighbohood 259 Moore type 198,203 Moore type automaton 40,4 1, 4446.64 Moore type deterministic automaton 43 Morphism 198 Muller 82, 128, 146, 153 Multi-channel machine 119 Multichannel automata 119 Multichannel clock 172, 187 Multiplication of partitions 145 Myhill 34, 58 Myhill-Nerode Theorem 78 Myhill relation 58, 60,62, 79, 176
396 Natural automorphism 3 13 Natural epimorphism 4 Natural homomorphism 5 1 Natural polyadic automorphism 313 Natural SP-partition 51 NDFA 40,41 NDFA-L 40 NDFA-R 40 Negative state 101, 111 Neighborhood index 257 Nerode 58,82 Nerode relation 58, 62, 157 Net of automata 230 Network 231,246,248, 251 Next state 39 Next state function 240 Nichols 268 Nilpotent matrix 368 nk-G(A) 290 Noguchi 82, 268 Non-connected automata 334 Non-controllable input subautomaton 152 Non-isomorphic automata 128 Nondeterministic 16, 20 Nondeterministic automaton 17, 26, 40, 86,90, 91, 93, 116 Nondeterministic autonomous automata 116 Nondeterministic fixed automaton 280 Nondeterministic linear bounded automaton 26,27 Nondeterministic machine 21 Nondeterministic pushdown automaton 31 Nondeterministic RSautomaton 64-67, 71 Nondeterministic time-varying automaton 280 Nondeterministic time-varying RabinScott automaton 280
Index
Nondeterministic Turing machine 113 Nondeterministic two-way acceptor 31 Nonisomorphic automata 321 Nonsingular mauix 351 Nonterminal symbols 11 Nontrivial generalized canonical homomorphism 183 Nontrivial generalized homomorphisms 186 Nontrivial periodic representation 362 Normal subgroup 4, 163,289,290, 31 1 Novansky 228 Nozaki 90 NP 100 NP-complete 25, 100, 101, 113, 191, 192 "-completeness 100, 111, 117, 191, 192 "-hard 117 "-intermediate 191 Number of dependencies 204 Niirnberg 298 Oehmke 82 Oettinger 34 Oizumi 82 One-channel automaton 120, 124 Onto asynchronous automaton 332 Onto automaton 62, 135, 140, 202, 304, 305, 315,322, 323, 328, 330, 335,336,338,339, 345, 346 OP(A) 283 Operating time 121, 128, 151, 172, 186 Operation-preserving function 287 Operation preserving property 342 Order 6 Output alphabet 36
Index
Output function 36,44, 47, 86, 93, 100, 108, 109,261 Output-incomplete DFA 36 Output symbols 36 Pair of partitions 208 Pair-type notation 63 PAR(A) 283 Parallel connection 237 Parallel decomposition 237, 238, 267 Partial assignment 204,205,224, 227,248 Partial function 2 Partial recursive functions 24 Partial retrievability 191 Partially encoded table 209 Partially ordered system 5 Partially retrievable 191 Partially retrievable automaton 191 Partition 3.49, 95, %, 139. 140, 142,208,210,218,221,244,249, 251,252,261, 363 Partitiona 49 Partition index 215 Partition of block Bi with respect to (Bj, 0 ) 95 Partition of strong connectedness 55 Partition pair 207,211,212 Partition pair of automaton 208 Partition with the substitution property 49 Path 6, 163 Patt 268 Paul1 117 Pawlaczyk 129, 153 Perfect automaton 63,328 Period 282,362 Periodic automaton 270,274,280, 281,286,287,315, 336, 337 Periodic cover 283,294 Periodic equiptent automaton 320 Periodic extension 321, 323
397 Periodic partition 283-285 Periodic partition of A induced by f 293 Periodic representation 282,283, 291,293,297,336, 362 Periodic sum 324, 325, 327, 328, 335, 341,346 Periodic sum of automata 312, 320,321 Periodicity index 292 Permutation automaton 62,63, 130, 324-326, 332, 335, 336 Permutation size 266 Pfleeger 117 Philokyprou 228 Phrase-structure grammar 11 Picket 82 Polyadic 290 Polyadic automaton 290, 337 Polyadic automorphism 288, 337 Polynomial algorithm 24, 25 Polynomial reducibility 111 Polynomial time 113 Polynomial time complexity 9 1 Polynomial transformation 25 Poschel 369 Possibility of automaton 186 Potentially periodic 275 Prather 117 Praa 34 Predecessing component 23 1 Predecessing configuration 257 Predecessing information 212 Prefix condition 123, 125 Primary of automaton 156 Problem 23 Problems of representation of a set of automata by means of one automaton 171 Product 3, 4 Programmable automaton 270 Properpath 6
398 Proper subgraph 6 'Pumping' Lemma 80,81 Pushdown automaton 17, 18, 27, 28, 30, 34 Qualitz 34 Quasi-controllability 148 Quasi-controllable 147 Quasi-controllable automaton 62 Quasi-equivalence of automata 273 Quasi-equivalent 274 Quasi-indistinguishable 274 Quasi-perfect automaton 63 Quasi-subautomata 53 Quasi-subautomaton of an automaton 53 Quotient 3 Quotient automaton 50, 177, 178, 235, 247, 254, 367 Quotient group 163 r-admissibility 216, 218-220, 224 r-admissibility test 218 r-admissible 216 Rabin 34, 82 Rabin-Scott automaton 17, 18, 33, 64,68, 71, 72, 74, 75, 77, 79, 81, 261,276,277 Rabin-Scott model 85, 90 Range 2 Realization 198-201, 203, 223, 243, 249, 253, 255, 256, 352-354 Realization of an automaton 243 Realization srructure 218 Realization with shift register 240 Recurrence equation 359 Recursive 25, 366 Recursively enumerable 277 Recursively enumerable language 12 Reduced automaton 266 Reduced dependencies 226 Reducible 362 Reduction of dependencies 207
Index
Redundant 232 Refinement of a partition 217 Refinement partitions 224 Regular expression 10,68, 70, 71 Regular grammar 72 Regular language 10,69, 70, 78, 80 Regular time-varying automata 276 Regular transition generated 166 Regular transition generated function 166, 167 Reischer 299 Relation 2 Relation induced by C 2 Relation of strong connectedness 55 Representation of A with respect to x 291 Representation of A with respect to C 296 Representation problems 172 Represents automaton 103 Restricted GOE configurations 258 Retrievability 128, 134, 335 Retrievable 128, 134, 135, 136 Retrievable automaton 135 Retrievable state 55 Reusch 117,369 Reversibility 128 Reversible 136 Reversible automaton 138 RGOE 260,262,263 Right congruence 58, 80 Right coset 4 Right linear 14 Right linear grammar 72 Right transform of automaton 301 Ring 5 Row number 209 Salomaa 299 Satisfies the prefix condition 123 Scheme of dependencies 204, 206 Schuu 196 Schutzenberger 34
Index Scott 34, 82 Semi-retrievability 128, 136 Semi-retrievable 128, 136 Semi-remevableautomaton 137 Semiautomaton 47 Semigroup 161, 162 Semigroup of an automaton 58 Semigroup of endomorphisms 160, 167 Semiregular 161 Semiretrievability 189 Semiretrievable 189 Serial composition 312 Serial connection 236,237,366 Serial decomposition 236,286, 362 Set of all generators 52 Set of assigning partitions 205 Set of generators 3, 4, 159 Set of homomorphisms 168 Set of input-valid words 39 Set of output-valid words 39 Set of predecessors 52 Set of productions 11 Set of proper predecessors 52 Set of proper successors 52 Set of successors 52 Shepherdson 34,82 Shift register 240, 243, 244, 256, 268,358,359,361, 362, 366 SHom(A, B) 107 Similar 350 Simovici 299 Simple 163 Simple field 5 Simple input-independent cover 296 Simple path 6, 133 Simple transform 302, 304 Simulator 261, 262 Sing 369 Singh 228 Siwak 228,268 Smith 196, 228, 368, 369
399 SOP(A) 283 SPcover 52, 103 SP-partition 49,51, 160, 177, 196, 231-234, 237, 238, 247,248, 252, 254,267,367 Space complexity of the algorithm 24 SPLIT 96 SPLIT algorithm 95 SPLIT(B, (Bj, a)) 95,97 SPP(A) 49.283 Starke 298,299 State assignment 205, 213, 219, 223,224,226,230,244,245,246, 248,249,254,255 State assignment problem 207 State behavior realization 214, 215, 217,218,362,366 Statediagram 215 State endomorphism 49 State homomorphism 47,49,91, 157, 158, 160, 163, 167, 173, 174, 179, 181, 192,203 State independence 146 State-independent automaton 62, 63 State-input automorphism 48 State-input homomorphism 47,48, 172, 173, 174, 192, 199, 203 State-input isomorphism 48, 199 State isomorphism 49, 157 State periodic sum 321, 330, 332-335, 341 State periodic sum of automata 320 State realizability 244, 248 State realization 203,224,226-228, 230,237,238,240-244,248, 249, 253 State splitting 109 State subautomaton 53,61, 177, 203 State transition function 35 Stearns 88, 186,228,268
400 Stockmeyer 34 Stoklosa 34, 369 Strictly periodic automaton 270, 282,287,362 Strictly periodic cover 283 Strictly periodic partition 283 Strictly periodic partitions 284 Strictly periodic representation 282 Strong connectedness 56, 128, 130, 132, 145,329-333,335,346 Strong connectedness relation 139, 141 Strong epimorphism 108 Strong homomorphic image 109 Strong homomorphism 107-109 Strongly connected 63, 129, 130, 132, 133, 136 Strongly connected (0, m)-asynchronous automaton 132 Strongly connected abelian automaton 63 Strongly connected asynchronous automaton 332 Strongly connected automaton 130, 147, 160, 161, 194, 327, 329, 332, 333 Strongly connected components 135 Strongly connected permutation 150 Strongly connected permutation automaton 332, 366 Strongly connected permutation or asynchronous automaton 150 Strongly connected T-periodic automaton 289 Structural graph 204 Structure graph of a realization 207 Structure of realization 204,220, 224,226 Structure of transforms 307 Stucky 369 Subalgebra 3
Index
Subautomata associated with the change of operating time of the automaton 120 Subautomaton 53, 77, 78, 121, 122, 127, 128, 148, 172, 178, 186, 271, 310,361 Subautomaton Afi) 122, 127, 186 Subautomaton 172, 186 Subautomaton Ad 128, 129, 132-135, 137 Subautomaton A' 128, 129, 132 Subautomaton generated by set 53 Subgroup 4, 148, 305 Subproblems 114 Subsemipup 148, 161, 162 Subset construction 66 Substitution property 49, 52, 102, 29 1 Subword 9 Succeeding information 212 Successing configuration 257 Sum 3,68 Sum of languages 70 Sum of partitions 146 Superposition 2,48,287 Superposition of functions 325 Supremum 5 Synchronous networks 247 T-periodic automaton 270, 282, 290 T-periodic cover 283 T-periodic partition 283 T-valid 248, 251 Tail automaton 236,237, 267 Tail of component 57, 164 Tape automaton 15, 16 Terminal symbols 11 Time complexity 111 Time complexity of the algorithm 24 Time computational complexity 87, 94-96 Time sharing 254
Index
Time-varying automaton 269,270, 273-275, 277-279, 286, 298 Time-varying automaton with a fixed transition function 270 Time-varying automaton with a fixed state set 270 Time-varying automaton with a fixed output function 270 Time-varying Rabin-Scott automaton 276 Time-varying state automaton 27 1 Total automaton 63 Total function 2 Transducers 17, 83 Transformation 43 Transient duration 270,282 Transition and output table 37 Transition function 22,36, 112, 128,224,235,238,261,272, 352, 356,361 Transition generated 156 Transition generated function 59, 157 Transition graph 240 Transition relation 40,41 Transition table 209 Transitive closure 210 Tree 6 Triple 352, 353 Trivial generalized homomorphisms 179 Trouth 82 Turing 34 Turing computable 23 Turing computable function 23, 24 Turing machine 17, 18,20,22, 23, 25, 33, 193, 277 Turing machine accepting language 20 Turing realizable 20 Turing realizable function 19,20 Two-way acceptor 17, 18, 31
401 Two-way automaton 72,73,77 Type 0 grammar 12,21-23 Type 0 language 12 Type 1 (context-sensitive) grammar 12 Type 1 (context-sensitive) language 12 Type 2 (context-free) language 13 Type 3 (regular) grammars 13, 14 Type 3 (regular) language 14 Ullman 34,82 Undirected graph 6, 103 Unger 117 Uniformly partitionable 260 Uniformly partitionable cellular net 264 Union 10 Union of partitions 50 Unique decomposition 159 Uniqueness of coding 250 Universal automata 88 Unoriented graph 100 Unsolvable problems 25 Upperbound 5 Ury 369 v-th level of component 164 VanLeeuwen 34 Vector space 5, 348 Vectors 5 , 23 Vollmar 298 Walter 366,369 Weeg 82, 195, 196 Weiner 117, 228 Winkler 298 With respect to an instant 272,273 With varying input transformations 320 Word 72 Word x differentiates states si and sj 85 Wyllie 34 Yau 298
402
Yeh 299 Young 34 Zakowski 369 Zeigler 369 Zelcstein 369
Index