Applications of Scheduling Theory to Formal Language Theory

Abstract Context-free grammars are extended to the case where it is required that at each derivation step, a fixed number k of nonterminals must be rewritten in parallel. This way of rewriting constitutes a ‘missing link’ between context-free rewriting, where only one nonterminal is rewritten in each step (k=1), and E0L rewriting, where always all nonterminals are rewritten. We approach the study of these families by investigating their computational complexity. In both the E0L and CF case, as well as for the case k=2, simple dynamic programming membership algorithms exist (see [13, 22, 29]). We solve the general problem using results from Scheduling Theory. Rewriting k symbols at each derivation step corresponds to scheduling the corresponding derivation forest on k processors. Using Scheduling Theory techniques, we present dynamic programming membership algorithms that run in polynomial time, for constant k. On the other hand, it is shown that membership is NP-hard if k is a variable of the problem, even when the grammar is fixed. An analogous NP-hardness result is shown for the case where the k symbols to be rewritten are required to be adjacent.

[1]  Jan Karel Lenstra,et al.  Complexity of Scheduling under Precedence Constraints , 1978, Oper. Res..

[2]  Jan van Leeuwen,et al.  The Membership Question for ET0L-Languages is Polynomially Complete , 1975, Inf. Process. Lett..

[3]  Grzegorz Rozenberg,et al.  Context-Free Like Restrictions on Selective Rewriting , 1981, Theor. Comput. Sci..

[4]  David S. Johnson,et al.  Scheduling Opposing Forests , 1983 .

[5]  Jeffrey D. Ullman,et al.  NP-Complete Scheduling Problems , 1975, J. Comput. Syst. Sci..

[6]  Jakob Gonczarowski,et al.  Pattern Selector Grammars and Several Parsing Algorithms in the Context-Free Style , 1985, J. Comput. Syst. Sci..

[7]  Catriel Beeri,et al.  Checking Stacks and Context-Free Programmed Grammars Accept p-complete Languages , 1974 .

[8]  M. Fujii,et al.  Erratum “Optimal Sequencing of Two Equivalent Processors” , 1971 .

[9]  Danny Dolev,et al.  Scheduling Flat Graphs , 1985, SIAM J. Comput..

[10]  John Bruno,et al.  Deterministic and Stochastic Scheduling Problems with Treelike Precedence Constraints , 1982 .

[11]  Michael A. Harrison,et al.  Introduction to formal language theory , 1978 .

[12]  Ernst W. Mayr,et al.  Well structured parallel programs are not easier to schedule , 1981 .

[13]  Arto Salomaa,et al.  Formal languages , 1973, Computer science classics.

[14]  Haim Gaifman,et al.  Concerning Two-Adjacent Context-Free Languages , 1985, Theor. Comput. Sci..

[15]  Danny Dolev,et al.  Scheduling Precedence Graphs of Bounded Height , 1984, J. Algorithms.

[16]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[17]  T. C. Hu Parallel Sequencing and Assembly Line Problems , 1961 .

[18]  Daniel H. Younger,et al.  Recognition and Parsing of Context-Free Languages in Time n^3 , 1967, Inf. Control..

[19]  Manfred K. Warmuth,et al.  Profile Scheduling of Opposing Forests and Level Orders , 1985 .

[20]  M. Fujii,et al.  Optimal Sequencing of Two Equivalent Processors , 1969 .

[21]  Alfred V. Aho,et al.  Inferring a Tree from Lowest Common Ancestors with an Application to the Optimization of Relational Expressions , 1981, SIAM J. Comput..

[22]  Harold N. Gabow,et al.  An Almost-Linear Algorithm for Two-Processor Scheduling , 1982, JACM.

[23]  Mihalis Yannakakis,et al.  Scheduling Interval-Ordered Tasks , 1979, SIAM J. Comput..

[24]  Manfred K. Warmuth Scheduling on profiles of constant breadth , 1981 .

[25]  Jakob Gonczarowski,et al.  Manipulating Derivation Forests by Scheduling Techniques , 1986, Theor. Comput. Sci..

[26]  Grzegorz Rozenberg,et al.  The mathematical theory of L systems , 1980 .