NORTH-HOLLAND MATHEMATICS STUDIES 102 Annals of Discrete Mathematics( 24) General Editor: Peter L. HAMMER Rutgers University,N ew Brunswick, NJ, U.S.A. Advisory Editors C. BERG6 Universited e Paris, France M. A. HARRISON, University of California, Berkeley, CA, U.S.A. V. KLEE, Universityo f Washington, Seattle, WA, U.S.A. J-H. VAN LINT; CaliforniaI nstitute of Technology,P asadena, CA, U.S.A. G.-C.R OTA, Massachusetts Institute of Technology, Cambridge, MA, U.S .A. NORTH-HOLLAND- AMSTERDAM 0 NEW YORK OXFORD TOPICS IN THE THEORY OF COMPUTATION Selected Papers of the International Conference on 'Foundations of Computation Theory',F CT '83, Borgholm, Sweden, August21-2z 1983 edited by Marek KARPlNSKl University of Pittsburgh and JanVAN LEEUWEN University of Utrecht 1985 NORTH-HOLLAND -AMSTERDAM NEW YORK 0 OXFORD 0E lsevier Science Publishers B. V., 1985 All rights reserved, No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior permission of the copyright owner. ISBN: 0 444 87647 2 Publishers: ELSEVIER SCIENCE PUBLISHERS B.V. P.O. BOX 1991 1000 BZ AMSTERDAM THE NETHERLANDS Sole distributors for the U.S.A. and Canada: ELSEVIER SCIENCE PUBLISHING COMPANY, INC. 52 VAN D ER B IL T AVENUE NEW YORK, N.Y. 10017 U.S.A. Library of Congress Cataloglng In Pnbllcation Data International Conference on ”Foundations of Computation Theory” (1983 : Bxgholm, Sweden) Topics In the theory of computation. (Annals of discrete mathematics ; 24) (Ncrth- Holland mathematics studies ; 102) 1. Computational complexity-Congresses. 2. Machine theory--Congresses. 3. Electronic data processing-- Mathematics--Congresses. I. Karpifiski, Marek, 1948- 11. Leewen. 3. van (Jan van) 111. Title. IV. Series. V. Series: krth-Hol&d mathematics studies ; 102. QA267.156 1983 511 ah-21089 ISBN 0-444-87647-2 (U.S.) PRINTED IN THE NETHERLANDS V PREFACE This Volume of the Annals of Discrete Mathematics contains nine selected papers presented at the International Conference on “Foundation of Computation Theory” held at Borgholm, Sweden, in August 21-27, 1983. The full Conference’s Proceedings have appeared in: M. Karpinski, ed., Lecture Notes in Computer Science, Vol. 158, Springer-Verlag, Berlin-New York, 1983, pp. 1-517. The papers of this Volume are complete and extended versions of the papers presented before this Conference which were selected, and refereed according to the usual high standards of the research journal publications. The topics of nine papers selected by the Editors, should reflect the nature of this Borgholm Conference. They were chosen on the basis of their immediate relevance to the most fundamental aspects of the theory of computation, and the newest developments in this area. The selection foci reflect thematically the idea of the series of ‘Foundational‘ FCT-Conferences initiated in 1977 (LNCS 466, Springer-Verlag). The main areas of Foundations of Computation Theory covered by the Conference, and in part represented in this Volume, fall into eight categories: * Constructive Mathematics in Models of Computation and Programming (Constable); * Abstract Calculi and Denotational Semantics (Langmaack, Parikh); * Theory of Machines, Computations, and Languages (F reivalds, Trum-W ot schke) ; * Nondeterminism, Concurrency, and Distributed Computing (Shmir-Upfal); * Abstract Algebras, Logics, and Combinatorics in Computation Theory (Harel, Macintyre); * General Computability and Decidability (Harel, Macintyre); * Computational and Arithmetic Complexity (Freivalds); * Analysis of Algorithms and Feasible Computing (v. Braunmiihl-Verbeek, Freivalds). vi We hope that the Volume will further help to promote, as well as advertise the highest quality research in the area of Foundations of Computation Theory. To ensure timeliness of the production, it was decided to use North-Holland's camera-ready rapid reproduction system. At this place we want to thank heartily Mariele Knepper of the Department of Computer Science, University of Bonn, as well as Nancy Swiantek, Crystal Hamill of the University of Pittsburgh, and Lydia Defilippo of Carnegie-Mellon University for the masterful supervision of all operations during the process of selection, refereeing, and preparation for printing with North-Holland. The number of anonymous referees of the papers in this book deserves special mention, their highest scholarly standards in refereeing were one of the major factors behind the present final shape of publication. It is our great pleasure to thank all authors for the smooth cooperation with the Editors, remarkably, within exceedingly constrained time limits. We hope this Volume succeeded in covering the new and exciting research areas. Marek Karpinski Jan van Leeuwen Editors June I984 vii C O N F E R E N C E C O M M I T E E S "Foundations of Computation Theory- 1983" Borgholm, Sweden, August 21-27, 1983 Program Committee: K.R. Apt (Paris), G. Ausiello (Rome), A.J. Blikle (Warsaw), E. Borger (Dortmund), W. Brauer (Hamburg), M. Broy (Munich), L. Budach (Berlin), R. Burstall (Edinburgh), P. van Emde Boas (Amsterdam), F. Gecseg, (Szeged), J. Gruska (Bratislava), M.A. Harrison (Berkeley), J. Hartmanis (Ithaca), K. Indermark (Aachen), M. Karpinski (Bonn/ Pittsburgh), D. Kozen (Yorktown Heights), J. van Leeuwen (Utrecht), L. Lovasz (Budapest), A. Mazurkiewicz (Warsaw), G.L. Miller (Cambridge Mass.), P. Mosses (Aarhus), B. Nordstrom (Gothenburg), M. Paterson (Warwick), A. Salomaa (Turku), C.P. Schnorr (Frankfurt), J.W. Thatcher (Yorktown Heights). Program Committee Chairman: Prof. Marek Karpinski Computer Science Department University of Bonn Wegelerstr. 6 D-5300 Bonn 1 W. Germany Organizing Committee: E. Sandewall (Chairman) A. Lingas J. Maluszynski Organizing Secretary: Lillemor Wallgren Program Secretary: Mariele Knepper viii Conference committees The International Conference on "Foundations of Computation Theory" followed thematically the series of the FCT-Conferences founded in 1977 in Poznan-Kornik, Poland. The program of the Conference, including invited lectures, and the selected contributions fell into eight categories: * Constructive Mathematics in Models of Computation and Programming * Abstract Calculi and Denotational Semantics * Theory of Machines, Computations, and Languages * Nondeterminism, Concurrency, and Distributed Computing * Abstract Algebras, Logics, and Combinatorics in Computation Theory General Computability and Decidability I( * Computational and Arithmetic Complexity * Analysis of Algorithms and Feasible Computing Organized by: The Department of Computer and Information Science, Linkoping University and Institute of Technology With the cooperation of: The Departments of Computer Science and Mathematics, University of Bonn Under the auspices of: The Royal Swedish Academy of Engineering Sciences The European Association for Theoretical Computer Science Gesellschaft fur Informatik e.V., Bonn The Swedish Society for Information Processing Co-sponsors: ASEA Ericsson Information System AB IBM Svenska AB The Swedish Philips Group t 0 Elsevier Science Publishers B.V. (North-Holland) I Input Driven Languages are Recognized in logn Space by Burchard von Braunmuhl Rutger Verbeek University of Bonn -Abs-tra ct We show that the class of input driven languages is contained in logn space, an improvement over the previously known bound of 2 log n/loglogn space [Me 801. We also show the power of de- terministic and nondeterministic input driven automata is the same and that these automata can recognize e.g. the parenthesis languages and the leftmost Szilard languages (cf. [Me 751, ~ L Y76 1, [Ig 771). 1. Introduction Since the famous algorithm of Lewis, Hartmanis and Stearns [LSH 651 many attempts have been made to determine the exact lower and upper bounds for the recognition of context free languages. It is quite 2 improbable that the log n upper bound can be improved for general CFLs because every improvement would improve the bound for the de- terministic simulation of nondeterministic Turing machines [Su 751. 2 Even for deterministic CFLs no better space bound than log n is known. Only the simultaneous time-space bound for DCFLs is much better than in the general case of CFLs: using a black pebbling strategy for the computation graphs of deterministic pushdown automata Cook [Co 791 has shown that DCFLs can be recognized using 2 logn pebbles (i.e. in log n space) and polynomial time simulta- neously. The strategy was improved by the authors [BV 8o],[BCMV 831 and shown to be almost optimal (as pebbling strategy) [Ve 811, [Ve 831. On the other hand several important subclasses of DCFLs are known to be recognized in logn space (e.g. Dyck sets [RS 721, parenthesis languages [Me 75],[Ly 761 and leftmost Szilard languages [Ig 771). All these examples are shown to be included in, or are easily (i.e. by a homomorphism) transformable to the class of input driven languages (defined in [Me 80]), which is already known to 2 require a bit less than log n space: according to Mehlhorn [Ke 801 2 B. u. Braunmuehl and R. Verbeek there is a black pebbling strategy with (log n/ log log n) pebbles where every pebble requires only O(log1ogn) space. In this paper we present a logn space algorithm for the recogni- tion of input driven languages. Our algorithm uses a black and white pebbling strategy [CS 761 for the computation graphs, where we make use of the fact, that the structure of the computation graph of an input driven PDA can be computed by a counter automaton (and hence in logn space). The pebbles are distributed on the graph in such a way that their positions need not to be stored but can be recom- puted. In this way our algorithm uses O(1ogn) pebbles, where each pebble requires only bounded space. Our approach gives a simple proof for the space complexity of a larqe subclass of DCFLs. In terms of pebbling complexity the strategy is optimal: it pebbles every n-node computation graph using O(1ogn) pebbles in n steps and there are computation graphs which require n(1ogn) black and white pebbles [Ve 831. Since our aim is to prove a space bound for some DCFLs we shall pre- sent the algorithm directly as simulation algorithm for input driven PDAs rather than as black and white pebble game. Unfortunately, there exist some classes of DCFLs that are contained in DSPACE(1ogn) but are not obviously transformable to input driven languages (certainly they all are logn- space reducible to any other nontrivial language): counter languages (where the space bound is obvious), the languages recognized by finite minimal stacking PDAs [Ig 781 (which can be proved to be accepted in logn space via a simple black pebbling strategy with a bounded number of pebbles) and the two sided Dyck sets [LZ 771, which is the only known example of a non input driven DCFL in DSPACE(1ogn) for which the space bound is not obvious. In section 2, we show that parentheses languages are input driven, leftmost Szilard languages are homomorphic transformable to input driven languages and the (nondeterministic) input driven languages are all deterministic (i.e. acceptable by deterministic input driven PDAs) which again proves that parentheses languages are DCFLs. In section 3, we present the simulation algorithm for input driven languages which uses log n space and n2 time on a Turing machine. Inputdriven languages are recognized in log n space 3 2. Properties of input driven languages We call a (deterministic or nondeterministic) real-time pushdown automaton (PDA) "input driven", if it reacts to some input symbol always with a push (the stack grows) or always with a pop (the stack falls). The moves of the stack are controlled only by the actual in- put symbol. The sequence of push and pop, (i.e. the graph of the stack height function h(t) (1 2 t 4 n)) is determined by the in- put and is readable from it. Definition A real-time pushdown automaton (PDA) is denoted by P = (CrrrQr#rqotQf,6) where Z,r,Q are finite disjoint sets of input symbols, pushdown symbols and states, # E r (bottom symbol), Qf c_ Q (accepting states), q, E Q (initial state), and 6 is a finite subset of Q x r x z x Q x r*. P is input driven, (idPDA) if 1 is the disjoint union of u2 . CorC1,C2 and 6 C Q x r x Ci x Q x Ti (x E Zo means pop, i=o x E I2 means replace and push) A language L 5; I* is input driven (idCFL), if it is recognized by some input driven PDA. A configuration is a pair (q,W) containing the state q and the content of the pushdown store W. For every w E Z*, q,q' E Q, X E r, W,W' E r*, we define - I W inductively by < (SfWX) (q,WXI, wx (q,WX) (q',W') iff there are Wl,W2 E T*, Y E r, q1 E Q, Such that (qrwx) (ql,WIY), (ql,Y,x,q'rW2) E 6 and W' = WlW2. If xl...xn is the input word, we define the stack height at time t (that is just before step t) by h(t) = \W\ if (q,#) (q',W) for 1 5 t I n+l. xl".x t- 1 is the empty word). (Xixi-1