A Graph Based Parsing Algorithm for Context-free Languages

Size: px
Start display at page:

Download "A Graph Based Parsing Algorithm for Context-free Languages"

Transcription

1 A Graph Based Parsing Algorithm for Context-free Languages Giinter Hot> Technical Report A 01/99 June hotzocs.uni-sb.de VVVVVV: de Abstract We present a simple algorithm deciding the word problem of c. f. languages in O(n 3 ). It decides this problem in time O(n') for unambiguous grammars and in time O(n) in the case of LR(k) grammars. Fachbereich 14 Informatik Universitat des Saarlandes P08tfach Saarbriicken Germany

2 1 Introduction There are several algorithms known deciding the word problem of general context-free languages in time O(n 3 ). The algorithm of Younger [You67] is very simple and it solves the problem in time O(n 3 ), but it takes no advantage of special cases. Kasami in [KT69] describes an algorithm, which decides this problem for unambiguous context-free grammars in time O(n 2 log n). Early [Ear70] developed an algorithm which decides the general word problem in time O(n 3 ) but does it for unambiguous grammars in time O(n 2 ) and for a wide class of grammars as LR(k) grammars [Knu65] in time O(n). His algorithm takes no advantage of grammars in a normal form. The proofs are hard to read. We present here a simple algorithm with the same runtime eciency as Early's algorithm. 2 Notations and Denitions Let V T be nite alphabets, V \ T = S 2 V and P (V V 2 ) [ (V T ) a c. f. production system in Chomsky normal form (Ch-NF). We assume that the grammar G := (V T P S) does not contain superuous variables. That means for each x 2 V we nd u1 u2 u 2 T such that x ;! u and s ;! u1xu2 holds. We dene linear forms with variables from V and coecients from the boolean algebra B. These are mappings : V ;! B and we write B hv i := f j : V ;! B g: We use the equivalent notation :=X (v) v We dene the sum and a product in B hv i : As usual we put v2v ( + )(v) :=(v) +(v) for v 2 V: The product x y for x y 2 V gives all possible reductions of xy relative to P. More formally we dene Now we put x y :=X z2v (z) z () ((z) =1() (z xy) 2 P: := X x y2v (x) (y) (x y) 1

3 we use in this denition for 2 B and 2 B hv i the operation ()(v) = (v) for v 2 V: The product is not associative. (B hv i + ) is distributive. We use furthermore the notation P ;1 (t) =X t z z t z =1() (z t) 2 P: z2v If the operation is associative then for u = t1 ::: t n and (u) := P ;1 (t1) ::: P ;1 (t n ) we have u 2 L(G) () (u)(s) =1: In this case (B hv i ) is a nite monoid and P ;1 : T homomorphism and therefore L(G) is regular. ;! (B (V ) ) is a 3 The Graph ;(G u) We assign to the grammar G and u 2 T an oriented graph ;=(K E) K is the set of vertices and E the set of edges and n := juj the length of u. K [ f(v i 0) j v 2 V 1 <i ng [ f(v i 1) j v 2 V 1 i<n+1g E [ f((v i 1) (v j 0)) j V ;! t i ::: t j;1 1 i<j n +1g Obviously it holds u 2 L(G) () ((s 1 1) (s n 0)) 2 E: The graph ; is closed under the following operation: Let be i<j<m edges of ; and If (z) =1 then the edge (x i 1) s 1 ;! (x j 0) (y j 1) s 2 ;! (y m 0) := x y: (z i 1) s 3 ;! (z m 0) 2

4 is in ;. We write in this case s3 := s1 s2 in general there may be several edges s 0 3 in the relation s 0 3 := s 1 s2. This closure property corresponds to and x ;! t i ::: t j;1 y ;! t j ::: t m;1 z ;! xy: Therefore we have z ;! t1 ::: t m;1 and from this follows by denition of ;, that s3 is in E. Lemma 1. If there are two dierent operations producing the same edge s3, then G is ambiguous. Proof 1. Let s1 s2 and s 0 1 s0 2 two pairs of edges from ; producing under the explained operation the edge s3, then we have the two dierent derivations z ;! xy x ;! u1 y ;! u2 u3 = u1 u2 z ;! x 0 y 0 x 0 ;! u 0 1 y0 ;! u 0 2 u 3 = u 0 1 u 0 2 : Now we assume G not containing superuous variables. Therefore exist the derivations s ;! ~uzu ;! ~uu1 u2u = ~uu 0 1 u 0 2 u 2 T : So we have more than one derivation of ~uu3u from S, i.e. G is ambiguous. 4 The algorithm We now construct a sequence ;1 ;2 ::: ; n of subgraphs of ; such that ;1 depends only on t1 and with ; n =;: We give an operation which constructs ; i+1 from ; i and estimate the complexity ofthisoperation. Let ; i := (K i E i ) for i =1 ::: n and K i := (v l ") 2 K j 1 l i " 2f0 1gg [ f(x i +1 0) j x 2 V g E i := fs 2 E j source(s), sink(s) 2 K i g: The construction of ;1 can be done in time O(1). 3

5 We assume ; i, i<nhas been constructed. We add t i+1 and f(v i +1 1) j v 2 V [fv i +2 0) j v 2 V g to K i. We in the rst step add the following edges of E to E i : (v i +1 1) ;! (v i +2 0) for v ;! t i+1: Let ; 0 i the result of this construction. Now we apply the closure operations s1 s2 ;! s3 to edges s1 s2 from ; 0 i : ; i being closed under these operations we have to begin with the new edges in ; 0 i. We have the following situation (x j 1) s 1 ;! (x i +1 0) (y i +1 1) s 2 ;! (y i +2 0): We built from s1 s2 (z j 1) s 3 ;! (z i +2 0) if (z xy) 2 P. Iterating this construction in the worst case we need O(n 2 ) elementary operations to construct ; i+1 from ; i, because each edge of ; 0 i we have to consider only once. To construct ; n by this procedure therefore needs in the worst case O(n 3 ) -operations. If the grammar is unambiguous we construct each edge only one time. Operations s1 s2 which do not produce a new edge we are able to exclude by only once inspecting the pairs of vertices (x l 0) (y l 1). If x y =0, then none of the pairs s 1 ;! (x l 0) (y l 1) s 2 ;! has to be considered. Therefore in this case we need only O(n 2 ) steps because this is the bound for the number of edges in ;. So we proved the Theorem 1. The algorithm dened here solves the word problem for c. f. languages in time O(n 3 ). In the case of unambiguous grammars the running time of the algorithm is O(n 2 ). 4

6 Corollar 1. The algorithm solves the word problem in the case of grammars with m-bound ambiguity in time O(n 2 m). Proof 2. From the m-bound ambiguity it follows that the algorithm draws each new edge maximal m times. Now we study the case G is a LR(k) grammar. LR(k) grammars are characterized by the following property: For uvu 0 2 L(G) and jvj = k let w1 ::: w l be the reduced words of u v relative to G. Then the set of this words has a common prex u, where u is a reduced word of u, such that we can write w1 + :::+ w l = u (v1 + :::+ v l ) jv i jk for i =1 ::: l: This property enables us to compute an upper bound for the number j; i j of edges in ; i. Obviously we have j;1j m for m := #V: We assume ; i being constructed. We then get ; i+1 by the following steps: 1. We compute P ;1 (t i+1), which produces not more than m new edges. 2. We match the new edges with the existing edges. This leads to new edges connecting vertices belonging to (v1 + :::+ v l ) P ;1 (t i+1)g and edges connecting vertices belonging to vt i+1 with edges belonging to u. The number of edges belonging to the rst class is bound by a constant c depending on m = #V and k. The number of the edges belonging to the second class is 0 if u i is prex of u i+1. It is 1 if ju i+1j = ju i j and it is ju i j;ju i+1j if reductions of the reduced word u i take place. So we have From this we get From this follows j; i+1j j; i j + C + ju i j;ju i+1j +1: j; n j = O(n): Theorem 2. The given graph algorithm solves the word problem for LR(k) grammars G := (V T P S) and words w 2 T with = O(n) -operations. It is obvious that the -operations can be performed on a computer in time only depending on G. This means that it can be done in constant time relative tojwj. 5

7 Literatur [Ear70] J. Early. An ecient context-free parsing algorithm. Com. ACM, 13, [Knu65] D. E. Knuth. On the translation of languages from left to right. Information and Control, 8, [KT69] T. Kasami and K. Tori. A syntax-analysis procedure for unambiguous context-free grammars. ACM, 16, [You67] D. H. Younger. Recognition and parsing of context-free languages in time n 3. Information and Control, 10,

straight segment and the symbol b representing a corner, the strings ababaab, babaaba and abaabab represent the same shape. In order to learn a model,

straight segment and the symbol b representing a corner, the strings ababaab, babaaba and abaabab represent the same shape. In order to learn a model, The Cocke-Younger-Kasami algorithm for cyclic strings Jose Oncina Depto. de Lenguajes y Sistemas Informaticos Universidad de Alicante E-03080 Alicante (Spain) e-mail: oncina@dlsi.ua.es Abstract The chain-code

More information

Applications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001

Applications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001 1 Applications of Regular Algebra to Language Theory Problems Roland Backhouse February 2001 Introduction 2 Examples: Path-finding problems. Membership problem for context-free languages. Error repair.

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Push-Down Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

TECHNISCHE UNIVERSITÄT DRESDEN. Fakultät Informatik. Technische Berichte Technical Reports. Daniel Kirsten. TUD / FI 98 / 07 - Mai 1998

TECHNISCHE UNIVERSITÄT DRESDEN. Fakultät Informatik. Technische Berichte Technical Reports. Daniel Kirsten. TUD / FI 98 / 07 - Mai 1998 TECHNISCHE UNIVERSITÄT DRESDEN Fakultät Informatik TUD / FI 98 / 07 - Mai 998 Technische Berichte Technical Reports ISSN 430-X Daniel Kirsten Grundlagen der Programmierung Institut für Softwaretechnik

More information

Foundations of Informatics: a Bridging Course

Foundations of Informatics: a Bridging Course Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html

More information

Note that neither ; nor are syntactic constituents of content models. It is not hard to see that the languages denoted by content models are exactly t

Note that neither ; nor are syntactic constituents of content models. It is not hard to see that the languages denoted by content models are exactly t Unambiguity of Extended Regular Expressions in SGML Document Grammars Anne Bruggemann-Klein Abstract In the Standard Generalized Markup Language (SGML), document types are dened by context-free grammars

More information

CYK Algorithm for Parsing General Context-Free Grammars

CYK Algorithm for Parsing General Context-Free Grammars CYK Algorithm for Parsing General Context-Free Grammars Why Parse General Grammars Can be difficult or impossible to make grammar unambiguous thus LL(k) and LR(k) methods cannot work, for such ambiguous

More information

Laboratoire d Informatique Fondamentale de Lille

Laboratoire d Informatique Fondamentale de Lille 99{02 Jan. 99 LIFL Laboratoire d Informatique Fondamentale de Lille Publication 99{02 Synchronized Shue and Regular Languages Michel Latteux Yves Roos Janvier 1999 c LIFL USTL UNIVERSITE DES SCIENCES ET

More information

2 Garrett: `A Good Spectral Theorem' 1. von Neumann algebras, density theorem The commutant of a subring S of a ring R is S 0 = fr 2 R : rs = sr; 8s 2

2 Garrett: `A Good Spectral Theorem' 1. von Neumann algebras, density theorem The commutant of a subring S of a ring R is S 0 = fr 2 R : rs = sr; 8s 2 1 A Good Spectral Theorem c1996, Paul Garrett, garrett@math.umn.edu version February 12, 1996 1 Measurable Hilbert bundles Measurable Banach bundles Direct integrals of Hilbert spaces Trivializing Hilbert

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Sequences and Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

Fall 1999 Formal Language Theory Dr. R. Boyer. Theorem. For any context free grammar G; if there is a derivation of w 2 from the

Fall 1999 Formal Language Theory Dr. R. Boyer. Theorem. For any context free grammar G; if there is a derivation of w 2 from the Fall 1999 Formal Language Theory Dr. R. Boyer Week Seven: Chomsky Normal Form; Pumping Lemma 1. Universality of Leftmost Derivations. Theorem. For any context free grammar ; if there is a derivation of

More information

Abstract It is shown that formulas in monadic second order logic (mso) with one free variable can be mimicked by attribute grammars with a designated

Abstract It is shown that formulas in monadic second order logic (mso) with one free variable can be mimicked by attribute grammars with a designated Attribute Grammars and Monadic Second Order Logic Roderick Bloem October 15, 1996 Abstract It is shown that formulas in monadic second order logic (mso) with one free variable can be mimicked by attribute

More information

Geraud Senizergues. LaBRI. 351, Cours de la Liberation Talence, France?? is shown to be decidable. We reduce this problem to the -

Geraud Senizergues. LaBRI. 351, Cours de la Liberation Talence, France?? is shown to be decidable. We reduce this problem to the - ? (A)? (B)? Geraud Senizergues LaBRI Universite de Bordeaux I 351, Cours de la Liberation 33405 Talence, France?? Abstract. The bisimulation problem for equational graphs of nite outdegree is shown to

More information

On some computational problems in nite abelian groups. Universitat des Saarlandes. Fachbereich 14 - Informatik. Postfach

On some computational problems in nite abelian groups. Universitat des Saarlandes. Fachbereich 14 - Informatik. Postfach On some computational problems in nite abelian groups Johannes Buchmann Michael J. Jacobson, Jr. Universitat des Saarlandes Fachbereich 14 - Informatik Postfach 151150 66041 Saarbrucken Germany Edlyn Teske

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 14 Ana Bove May 14th 2018 Recap: Context-free Grammars Simplification of grammars: Elimination of ǫ-productions; Elimination of

More information

Context-Free Grammars (and Languages) Lecture 7

Context-Free Grammars (and Languages) Lecture 7 Context-Free Grammars (and Languages) Lecture 7 1 Today Beyond regular expressions: Context-Free Grammars (CFGs) What is a CFG? What is the language associated with a CFG? Creating CFGs. Reasoning about

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Decidability, Undecidability and Reducibility; Codes, Algorithms and Languages CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario,

More information

Lean clause-sets: Generalizations of minimally. unsatisable clause-sets. Oliver Kullmann. University of Toronto. Toronto, Ontario M5S 3G4

Lean clause-sets: Generalizations of minimally. unsatisable clause-sets. Oliver Kullmann. University of Toronto. Toronto, Ontario M5S 3G4 Lean clause-sets: Generalizations of minimally unsatisable clause-sets Oliver Kullmann Department of Computer Science University of Toronto Toronto, Ontario M5S 3G4 e-mail: kullmann@cs.toronto.edu http://www.cs.utoronto.ca/kullmann/

More information

Automata Theory Final Exam Solution 08:10-10:00 am Friday, June 13, 2008

Automata Theory Final Exam Solution 08:10-10:00 am Friday, June 13, 2008 Automata Theory Final Exam Solution 08:10-10:00 am Friday, June 13, 2008 Name: ID #: This is a Close Book examination. Only an A4 cheating sheet belonging to you is acceptable. You can write your answers

More information

Theory of Computation 8 Deterministic Membership Testing

Theory of Computation 8 Deterministic Membership Testing Theory of Computation 8 Deterministic Membership Testing Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Theory of Computation

More information

Fundamenta Informaticae 30 (1997) 23{41 1. Petri Nets, Commutative Context-Free Grammars,

Fundamenta Informaticae 30 (1997) 23{41 1. Petri Nets, Commutative Context-Free Grammars, Fundamenta Informaticae 30 (1997) 23{41 1 IOS Press Petri Nets, Commutative Context-Free Grammars, and Basic Parallel Processes Javier Esparza Institut fur Informatik Technische Universitat Munchen Munchen,

More information

Properties of Context-Free Languages

Properties of Context-Free Languages Properties of Context-Free Languages Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr

More information

Properties of context-free Languages

Properties of context-free Languages Properties of context-free Languages We simplify CFL s. Greibach Normal Form Chomsky Normal Form We prove pumping lemma for CFL s. We study closure properties and decision properties. Some of them remain,

More information

Structural Grobner Basis. Bernd Sturmfels and Markus Wiegelmann TR May Department of Mathematics, UC Berkeley.

Structural Grobner Basis. Bernd Sturmfels and Markus Wiegelmann TR May Department of Mathematics, UC Berkeley. I 1947 Center St. Suite 600 Berkeley, California 94704-1198 (510) 643-9153 FAX (510) 643-7684 INTERNATIONAL COMPUTER SCIENCE INSTITUTE Structural Grobner Basis Detection Bernd Sturmfels and Markus Wiegelmann

More information

AUGMENTED REGULAR EXPRESSIONS: A FORMALISM TO DESCRIBE, RECOGNIZE AND LEARN A CLASS OF CONTEXT-SENSITIVE LANGUAGES.

AUGMENTED REGULAR EXPRESSIONS: A FORMALISM TO DESCRIBE, RECOGNIZE AND LEARN A CLASS OF CONTEXT-SENSITIVE LANGUAGES. AUGMENTED REGULAR EXPRESSIONS: A FORMALISM TO DESCRIBE, RECOGNIZE AND LEARN A CLASS OF CONTEXT-SENSITIVE LANGUAGES. Rene Alquezar () and Alberto Sanfeliu () () Dept. de Llenguatges i Sistemes Informatics,

More information

Languages. Languages. An Example Grammar. Grammars. Suppose we have an alphabet V. Then we can write:

Languages. Languages. An Example Grammar. Grammars. Suppose we have an alphabet V. Then we can write: Languages A language is a set (usually infinite) of strings, also known as sentences Each string consists of a sequence of symbols taken from some alphabet An alphabet, V, is a finite set of symbols, e.g.

More information

Solvability of Word Equations Modulo Finite Special And. Conuent String-Rewriting Systems Is Undecidable In General.

Solvability of Word Equations Modulo Finite Special And. Conuent String-Rewriting Systems Is Undecidable In General. Solvability of Word Equations Modulo Finite Special And Conuent String-Rewriting Systems Is Undecidable In General Friedrich Otto Fachbereich Mathematik/Informatik, Universitat GH Kassel 34109 Kassel,

More information

Almost Optimal Sublinear Time Parallel. Lawrence L. Larmore. Wojciech Rytter y. Abstract

Almost Optimal Sublinear Time Parallel. Lawrence L. Larmore. Wojciech Rytter y. Abstract Almost Optimal Sublinear Time Parallel Recognition Algorithms for Three Subclasses of Contet Free Languages Lawrence L. Larmore Wojciech Rytter y Abstract Sublinear time almost optimal algorithms for the

More information

Abstract This work is a survey on decidable and undecidable problems in matrix theory. The problems studied are simply formulated, however most of the

Abstract This work is a survey on decidable and undecidable problems in matrix theory. The problems studied are simply formulated, however most of the Decidable and Undecidable Problems in Matrix Theory Vesa Halava University of Turku, Department of Mathematics, FIN-24 Turku, Finland vehalava@utu. Supported by the Academy of Finland under the grant 447

More information

Decision Problems Concerning. Prime Words and Languages of the

Decision Problems Concerning. Prime Words and Languages of the Decision Problems Concerning Prime Words and Languages of the PCP Marjo Lipponen Turku Centre for Computer Science TUCS Technical Report No 27 June 1996 ISBN 951-650-783-2 ISSN 1239-1891 Abstract This

More information

FLAC Context-Free Grammars

FLAC Context-Free Grammars FLAC Context-Free Grammars Klaus Sutner Carnegie Mellon Universality Fall 2017 1 Generating Languages Properties of CFLs Generation vs. Recognition 3 Turing machines can be used to check membership in

More information

Finite Presentations of Pregroups and the Identity Problem

Finite Presentations of Pregroups and the Identity Problem 6 Finite Presentations of Pregroups and the Identity Problem Alexa H. Mater and James D. Fix Abstract We consider finitely generated pregroups, and describe how an appropriately defined rewrite relation

More information

to t in the graph with capacities given by u e + i(e) for edges e is maximized. We further distinguish the problem MaxFlowImp according to the valid v

to t in the graph with capacities given by u e + i(e) for edges e is maximized. We further distinguish the problem MaxFlowImp according to the valid v Flow Improvement and Network Flows with Fixed Costs S. O. Krumke, Konrad-Zuse-Zentrum fur Informationstechnik Berlin H. Noltemeier, S. Schwarz, H.-C. Wirth, Universitat Wurzburg R. Ravi, Carnegie Mellon

More information

Grammars and Context Free Languages

Grammars and Context Free Languages Grammars and Context Free Languages H. Geuvers and A. Kissinger Institute for Computing and Information Sciences Version: fall 2015 H. Geuvers & A. Kissinger Version: fall 2015 Talen en Automaten 1 / 23

More information

For the property of having nite derivation type this result has been strengthened considerably by Otto and Sattler-Klein by showing that this property

For the property of having nite derivation type this result has been strengthened considerably by Otto and Sattler-Klein by showing that this property FP is undecidable for nitely presented monoids with word problems decidable in polynomial time Robert Cremanns and Friedrich Otto Fachbereich Mathematik/Informatik Universitat Kassel, 349 Kassel, Germany

More information

Integer Circuit Evaluation is PSPACE-complete. Ke Yang. Computer Science Department, Carnegie Mellon University, 5000 Forbes Ave.

Integer Circuit Evaluation is PSPACE-complete. Ke Yang. Computer Science Department, Carnegie Mellon University, 5000 Forbes Ave. Integer Circuit Evaluation is PSPACE-complete Ke Yang Computer Science Department, Carnegie Mellon University, 5000 Forbes Ave., Pittsburgh, PA 15213, USA E-mail: yangke@cmu.edu Key Words: PSPACE, Integer

More information

Non-elementary Lower Bound for Propositional Duration. Calculus. A. Rabinovich. Department of Computer Science. Tel Aviv University

Non-elementary Lower Bound for Propositional Duration. Calculus. A. Rabinovich. Department of Computer Science. Tel Aviv University Non-elementary Lower Bound for Propositional Duration Calculus A. Rabinovich Department of Computer Science Tel Aviv University Tel Aviv 69978, Israel 1 Introduction The Duration Calculus (DC) [5] is a

More information

1. Affine Grassmannian for G a. Gr Ga = lim A n. Intuition. First some intuition. We always have to rst approximation

1. Affine Grassmannian for G a. Gr Ga = lim A n. Intuition. First some intuition. We always have to rst approximation PROBLEM SESSION I: THE AFFINE GRASSMANNIAN TONY FENG In this problem we are proving: 1 Affine Grassmannian for G a Gr Ga = lim A n n with A n A n+1 being the inclusion of a hyperplane in the obvious way

More information

Analog Neural Nets with Gaussian or other Common. Noise Distributions cannot Recognize Arbitrary. Regular Languages.

Analog Neural Nets with Gaussian or other Common. Noise Distributions cannot Recognize Arbitrary. Regular Languages. Analog Neural Nets with Gaussian or other Common Noise Distributions cannot Recognize Arbitrary Regular Languages Wolfgang Maass Inst. for Theoretical Computer Science, Technische Universitat Graz Klosterwiesgasse

More information

Institute for Advanced Computer Studies. Department of Computer Science. On the Convergence of. Multipoint Iterations. G. W. Stewart y.

Institute for Advanced Computer Studies. Department of Computer Science. On the Convergence of. Multipoint Iterations. G. W. Stewart y. University of Maryland Institute for Advanced Computer Studies Department of Computer Science College Park TR{93{10 TR{3030 On the Convergence of Multipoint Iterations G. W. Stewart y February, 1993 Reviseed,

More information

Uniquely 2-list colorable graphs

Uniquely 2-list colorable graphs Discrete Applied Mathematics 119 (2002) 217 225 Uniquely 2-list colorable graphs Y.G. Ganjali a;b, M. Ghebleh a;b, H. Hajiabolhassan a;b;, M. Mirzazadeh a;b, B.S. Sadjad a;b a Institute for Studies in

More information

Formal Languages and Automata

Formal Languages and Automata Formal Languages and Automata Lecture 6 2017-18 LFAC (2017-18) Lecture 6 1 / 31 Lecture 6 1 The recognition problem: the Cocke Younger Kasami algorithm 2 Pushdown Automata 3 Pushdown Automata and Context-free

More information

Quasigroups and Related Systems 21 (2013), Introduction

Quasigroups and Related Systems 21 (2013), Introduction Quasigroups and Related Systems 21 (2013), 175 184 On 2-absorbing semimodules Manish Kant Dubey and Poonam Sarohe Abstract. In this paper, we introduce the concept of 2-absorbing semimodules over a commutative

More information

Feature Constraint Logics. for Unication Grammars. Gert Smolka. German Research Center for Articial Intelligence and. Universitat des Saarlandes

Feature Constraint Logics. for Unication Grammars. Gert Smolka. German Research Center for Articial Intelligence and. Universitat des Saarlandes Feature Constraint Logics for Unication Grammars Gert Smolka German Research Center for Articial Intelligence and Universitat des Saarlandes Stuhlsatzenhausweg 3, D-66123 Saarbrucken, Germany smolka@dfki.uni-sb.de

More information

A shrinking lemma for random forbidding context languages

A shrinking lemma for random forbidding context languages Theoretical Computer Science 237 (2000) 149 158 www.elsevier.com/locate/tcs A shrinking lemma for random forbidding context languages Andries van der Walt a, Sigrid Ewert b; a Department of Mathematics,

More information

The Best Circulant Preconditioners for Hermitian Toeplitz Systems II: The Multiple-Zero Case Raymond H. Chan Michael K. Ng y Andy M. Yip z Abstract In

The Best Circulant Preconditioners for Hermitian Toeplitz Systems II: The Multiple-Zero Case Raymond H. Chan Michael K. Ng y Andy M. Yip z Abstract In The Best Circulant Preconditioners for Hermitian Toeplitz Systems II: The Multiple-ero Case Raymond H. Chan Michael K. Ng y Andy M. Yip z Abstract In [0, 4], circulant-type preconditioners have been proposed

More information

Computation of Substring Probabilities in Stochastic Grammars Ana L. N. Fred Instituto de Telecomunicac~oes Instituto Superior Tecnico IST-Torre Norte

Computation of Substring Probabilities in Stochastic Grammars Ana L. N. Fred Instituto de Telecomunicac~oes Instituto Superior Tecnico IST-Torre Norte Computation of Substring Probabilities in Stochastic Grammars Ana L. N. Fred Instituto de Telecomunicac~oes Instituto Superior Tecnico IST-Torre Norte, Av. Rovisco Pais, 1049-001 Lisboa, Portugal afred@lx.it.pt

More information

Approximate Map Labeling. is in (n log n) Frank Wagner* B 93{18. December Abstract

Approximate Map Labeling. is in (n log n) Frank Wagner* B 93{18. December Abstract SERIE B INFORMATIK Approximate Map Labeling is in (n log n) Frank Wagner* B 93{18 December 1993 Abstract Given n real numbers, the -CLOSENESS problem consists in deciding whether any two of them are within

More information

Knowledge Discovery. Zbigniew W. Ras. Polish Academy of Sciences, Dept. of Comp. Science, Warsaw, Poland

Knowledge Discovery. Zbigniew W. Ras. Polish Academy of Sciences, Dept. of Comp. Science, Warsaw, Poland Handling Queries in Incomplete CKBS through Knowledge Discovery Zbigniew W. Ras University of orth Carolina, Dept. of Comp. Science, Charlotte,.C. 28223, USA Polish Academy of Sciences, Dept. of Comp.

More information

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP CS 301 - Lecture 29 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of

More information

Weeks 6 and 7. November 24, 2013

Weeks 6 and 7. November 24, 2013 Weeks 6 and 7 November 4, 03 We start by calculating the irreducible representation of S 4 over C. S 4 has 5 congruency classes: {, (, ), (,, 3), (, )(3, 4), (,, 3, 4)}, so we have 5 irreducible representations.

More information

Flow Network. The following figure shows an example of a flow network:

Flow Network. The following figure shows an example of a flow network: Maximum Flow 1 Flow Network The following figure shows an example of a flow network: 16 V 1 12 V 3 20 s 10 4 9 7 t 13 4 V 2 V 4 14 A flow network G = (V,E) is a directed graph. Each edge (u, v) E has a

More information

example like a b, which is obviously not true. Using our method, examples like this will quickly halt and say there is no solution. A related deciency

example like a b, which is obviously not true. Using our method, examples like this will quickly halt and say there is no solution. A related deciency Goal-Directed E-Unication Christopher Lynch and Barbara Morawska Department of Mathematics and Computer Science Box 5815, Clarkson University, Potsdam, NY 13699-5815, USA, E-mail: clynch@clarkson.edu,morawskb@clarkson.edu??

More information

Grammars and Context Free Languages

Grammars and Context Free Languages Grammars and Context Free Languages H. Geuvers and J. Rot Institute for Computing and Information Sciences Version: fall 2016 H. Geuvers & J. Rot Version: fall 2016 Talen en Automaten 1 / 24 Outline Grammars

More information

Upper and Lower Bounds on the Number of Faults. a System Can Withstand Without Repairs. Cambridge, MA 02139

Upper and Lower Bounds on the Number of Faults. a System Can Withstand Without Repairs. Cambridge, MA 02139 Upper and Lower Bounds on the Number of Faults a System Can Withstand Without Repairs Michel Goemans y Nancy Lynch z Isaac Saias x Laboratory for Computer Science Massachusetts Institute of Technology

More information

CSCI Compiler Construction

CSCI Compiler Construction CSCI 742 - Compiler Construction Lecture 12 Cocke-Younger-Kasami (CYK) Algorithm Instructor: Hossein Hojjat February 20, 2017 Recap: Chomsky Normal Form (CNF) A CFG is in Chomsky Normal Form if each rule

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Rewriting Systems and Chomsky Grammars CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard

More information

UNIT II REGULAR LANGUAGES

UNIT II REGULAR LANGUAGES 1 UNIT II REGULAR LANGUAGES Introduction: A regular expression is a way of describing a regular language. The various operations are closure, union and concatenation. We can also find the equivalent regular

More information

A parsing technique for TRG languages

A parsing technique for TRG languages A parsing technique for TRG languages Daniele Paolo Scarpazza Politecnico di Milano October 15th, 2004 Daniele Paolo Scarpazza A parsing technique for TRG grammars [1]

More information

3.1 Basic properties of real numbers - continuation Inmum and supremum of a set of real numbers

3.1 Basic properties of real numbers - continuation Inmum and supremum of a set of real numbers Chapter 3 Real numbers The notion of real number was introduced in section 1.3 where the axiomatic denition of the set of all real numbers was done and some basic properties of the set of all real numbers

More information

Language-Processing Problems. Roland Backhouse DIMACS, 8th July, 2003

Language-Processing Problems. Roland Backhouse DIMACS, 8th July, 2003 1 Language-Processing Problems Roland Backhouse DIMACS, 8th July, 2003 Introduction 2 Factors and the factor matrix were introduced by Conway (1971). He used them very effectively in, for example, constructing

More information

To make a grammar probabilistic, we need to assign a probability to each context-free rewrite

To make a grammar probabilistic, we need to assign a probability to each context-free rewrite Notes on the Inside-Outside Algorithm To make a grammar probabilistic, we need to assign a probability to each context-free rewrite rule. But how should these probabilities be chosen? It is natural to

More information

2 JOHAN JONASSON we address in this paper is if this pattern holds for any nvertex graph G, i.e. if the product graph G k is covered faster the larger

2 JOHAN JONASSON we address in this paper is if this pattern holds for any nvertex graph G, i.e. if the product graph G k is covered faster the larger An upper bound on the cover time for powers of graphs Johan Jonasson Chalmers University of Technology January 14, 1999 Abstract It is shown that if G is any connected graph on n vertices, then the cover

More information

2 EBERHARD BECKER ET AL. has a real root. Thus our problem can be reduced to the problem of deciding whether or not a polynomial in one more variable

2 EBERHARD BECKER ET AL. has a real root. Thus our problem can be reduced to the problem of deciding whether or not a polynomial in one more variable Deciding positivity of real polynomials Eberhard Becker, Victoria Powers, and Thorsten Wormann Abstract. We describe an algorithm for deciding whether or not a real polynomial is positive semidenite. The

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Non-determinism, Regular Expressions CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard

More information

Hamiltonian problem on claw-free and almost distance-hereditary graphs

Hamiltonian problem on claw-free and almost distance-hereditary graphs Discrete Mathematics 308 (2008) 6558 6563 www.elsevier.com/locate/disc Note Hamiltonian problem on claw-free and almost distance-hereditary graphs Jinfeng Feng, Yubao Guo Lehrstuhl C für Mathematik, RWTH

More information

1 Introduction It will be convenient to use the inx operators a b and a b to stand for maximum (least upper bound) and minimum (greatest lower bound)

1 Introduction It will be convenient to use the inx operators a b and a b to stand for maximum (least upper bound) and minimum (greatest lower bound) Cycle times and xed points of min-max functions Jeremy Gunawardena, Department of Computer Science, Stanford University, Stanford, CA 94305, USA. jeremy@cs.stanford.edu October 11, 1993 to appear in the

More information

A theorem on summable families in normed groups. Dedicated to the professors of mathematics. L. Berg, W. Engel, G. Pazderski, and H.- W. Stolle.

A theorem on summable families in normed groups. Dedicated to the professors of mathematics. L. Berg, W. Engel, G. Pazderski, and H.- W. Stolle. Rostock. Math. Kolloq. 49, 51{56 (1995) Subject Classication (AMS) 46B15, 54A20, 54E15 Harry Poppe A theorem on summable families in normed groups Dedicated to the professors of mathematics L. Berg, W.

More information

615, rue du Jardin Botanique. Abstract. In contrast to the case of words, in context-free tree grammars projection rules cannot always be

615, rue du Jardin Botanique. Abstract. In contrast to the case of words, in context-free tree grammars projection rules cannot always be How to Get Rid of Projection Rules in Context-free Tree Grammars Dieter Hofbauer Maria Huber Gregory Kucherov Technische Universit t Berlin Franklinstra e 28/29, FR 6-2 D - 10587 Berlin, Germany e-mail:

More information

The following can also be obtained from this WWW address: the papers [8, 9], more examples, comments on the implementation and a short description of

The following can also be obtained from this WWW address: the papers [8, 9], more examples, comments on the implementation and a short description of An algorithm for computing the Weierstrass normal form Mark van Hoeij Department of mathematics University of Nijmegen 6525 ED Nijmegen The Netherlands e-mail: hoeij@sci.kun.nl April 9, 1995 Abstract This

More information

Note On Parikh slender context-free languages

Note On Parikh slender context-free languages Theoretical Computer Science 255 (2001) 667 677 www.elsevier.com/locate/tcs Note On Parikh slender context-free languages a; b; ; 1 Juha Honkala a Department of Mathematics, University of Turku, FIN-20014

More information

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata. Code No: R09220504 R09 Set No. 2 II B.Tech II Semester Examinations,December-January, 2011-2012 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 75 Answer

More information

Decidability of Existence and Construction of a Complement of a given function

Decidability of Existence and Construction of a Complement of a given function Decidability of Existence and Construction of a Complement of a given function Ka.Shrinivaasan, Chennai Mathematical Institute (CMI) (shrinivas@cmi.ac.in) April 28, 2011 Abstract This article denes a complement

More information

Minimal enumerations of subsets of a nite set and the middle level problem

Minimal enumerations of subsets of a nite set and the middle level problem Discrete Applied Mathematics 114 (2001) 109 114 Minimal enumerations of subsets of a nite set and the middle level problem A.A. Evdokimov, A.L. Perezhogin 1 Sobolev Institute of Mathematics, Novosibirsk

More information

Nine Test Tubes Generate any RE Language. C. Ferretti, G. Mauri, C. Zandron. Universita di Milano - ITALY. Abstract

Nine Test Tubes Generate any RE Language. C. Ferretti, G. Mauri, C. Zandron. Universita di Milano - ITALY. Abstract Nine Test Tubes Generate any RE Language C. Ferretti, G. Mauri, C. Zandron Dipartimento di Scienze dell'informazione via Comelico 39, 20135 Milano Universita di Milano - ITALY Abstract In this paper we

More information

output H = 2*H+P H=2*(H-P)

output H = 2*H+P H=2*(H-P) Ecient Algorithms for Multiplication on Elliptic Curves by Volker Muller TI-9/97 22. April 997 Institut fur theoretische Informatik Ecient Algorithms for Multiplication on Elliptic Curves Volker Muller

More information

Music as a Formal Language

Music as a Formal Language Music as a Formal Language Finite-State Automata and Pd Bryan Jurish moocow@ling.uni-potsdam.de Universität Potsdam, Institut für Linguistik, Potsdam, Germany pd convention 2004 / Jurish / Music as a formal

More information

Results on Equivalence, Boundedness, Liveness, and Covering Problems of BPP-Petri Nets

Results on Equivalence, Boundedness, Liveness, and Covering Problems of BPP-Petri Nets Results on Equivalence, Boundedness, Liveness, and Covering Problems of BPP-Petri Nets Ernst W. Mayr Jeremias Weihmann March 29, 2013 Abstract Yen proposed a construction for a semilinear representation

More information

Einführung in die Computerlinguistik

Einführung in die Computerlinguistik Einführung in die Computerlinguistik Context-Free Grammars formal properties Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2018 1 / 20 Normal forms (1) Hopcroft and Ullman (1979) A normal

More information

(1.) For any subset P S we denote by L(P ) the abelian group of integral relations between elements of P, i.e. L(P ) := ker Z P! span Z P S S : For ea

(1.) For any subset P S we denote by L(P ) the abelian group of integral relations between elements of P, i.e. L(P ) := ker Z P! span Z P S S : For ea Torsion of dierentials on toric varieties Klaus Altmann Institut fur reine Mathematik, Humboldt-Universitat zu Berlin Ziegelstr. 13a, D-10099 Berlin, Germany. E-mail: altmann@mathematik.hu-berlin.de Abstract

More information

Linear Algebra, 4th day, Thursday 7/1/04 REU Info:

Linear Algebra, 4th day, Thursday 7/1/04 REU Info: Linear Algebra, 4th day, Thursday 7/1/04 REU 004. Info http//people.cs.uchicago.edu/laci/reu04. Instructor Laszlo Babai Scribe Nick Gurski 1 Linear maps We shall study the notion of maps between vector

More information

[3] R.M. Colomb and C.Y.C. Chung. Very fast decision table execution of propositional

[3] R.M. Colomb and C.Y.C. Chung. Very fast decision table execution of propositional - 14 - [3] R.M. Colomb and C.Y.C. Chung. Very fast decision table execution of propositional expert systems. Proceedings of the 8th National Conference on Articial Intelligence (AAAI-9), 199, 671{676.

More information

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given Completely Specied Machines STGs may contain redundant states, i.e. states whose function can be accomplished by other states. State minimization is the transformation of a given machine into an equivalent

More information

An Efficient Context-Free Parsing Algorithm. Speakers: Morad Ankri Yaniv Elia

An Efficient Context-Free Parsing Algorithm. Speakers: Morad Ankri Yaniv Elia An Efficient Context-Free Parsing Algorithm Speakers: Morad Ankri Yaniv Elia Yaniv: Introduction Terminology Informal Explanation The Recognizer Morad: Example Time and Space Bounds Empirical results Practical

More information

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in

Fall 1999 Formal Language Theory Dr. R. Boyer. 1. There are other methods of nding a regular expression equivalent to a nite automaton in Fall 1999 Formal Language Theory Dr. R. Boyer Week Four: Regular Languages; Pumping Lemma 1. There are other methods of nding a regular expression equivalent to a nite automaton in addition to the ones

More information

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 10 : Context-Free Grammars

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 10 : Context-Free Grammars COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lec. 10 : Context-Free Grammars COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic finite

More information

The rest of the paper is organized as follows: in Section 2 we prove undecidability of the existential-universal ( 2 ) part of the theory of an AC ide

The rest of the paper is organized as follows: in Section 2 we prove undecidability of the existential-universal ( 2 ) part of the theory of an AC ide Undecidability of the 9 8 part of the theory of ground term algebra modulo an AC symbol Jerzy Marcinkowski jma@tcs.uni.wroc.pl Institute of Computer Science University of Wroc law, ul. Przesmyckiego 20

More information

October 7, :8 WSPC/WS-IJWMIP paper. Polynomial functions are renable

October 7, :8 WSPC/WS-IJWMIP paper. Polynomial functions are renable International Journal of Wavelets, Multiresolution and Information Processing c World Scientic Publishing Company Polynomial functions are renable Henning Thielemann Institut für Informatik Martin-Luther-Universität

More information

October 23, concept of bottom-up tree series transducer and top-down tree series transducer, respectively,

October 23, concept of bottom-up tree series transducer and top-down tree series transducer, respectively, Bottom-up and Top-down Tree Series Transformations oltan Fulop Department of Computer Science University of Szeged Arpad ter., H-670 Szeged, Hungary E-mail: fulop@inf.u-szeged.hu Heiko Vogler Department

More information

Grammar formalisms Tree Adjoining Grammar: Formal Properties, Parsing. Part I. Formal Properties of TAG. Outline: Formal Properties of TAG

Grammar formalisms Tree Adjoining Grammar: Formal Properties, Parsing. Part I. Formal Properties of TAG. Outline: Formal Properties of TAG Grammar formalisms Tree Adjoining Grammar: Formal Properties, Parsing Laura Kallmeyer, Timm Lichte, Wolfgang Maier Universität Tübingen Part I Formal Properties of TAG 16.05.2007 und 21.05.2007 TAG Parsing

More information

Chap. 7 Properties of Context-free Languages

Chap. 7 Properties of Context-free Languages Chap. 7 Properties of Context-free Languages 7.1 Normal Forms for Context-free Grammars Context-free grammars A where A N, (N T). 0. Chomsky Normal Form A BC or A a except S where A, B, C N, a T. 1. Eliminating

More information

Implementing -Reduction by. Hypergraph Rewriting. Sabine Kuske 1. Fachbereich Mathematik und Informatik. Universitat Bremen. D{28334 Bremen, Germany

Implementing -Reduction by. Hypergraph Rewriting. Sabine Kuske 1. Fachbereich Mathematik und Informatik. Universitat Bremen. D{28334 Bremen, Germany URL: http://www.elsevier.nl/locate/entcs/volume2.html 8 pages Implementing -Reduction by Hypergraph Rewriting abine Fachbereich Mathematik und Informatik Universitat Bremen D{28334 Bremen, Germany email:

More information

One Quantier Will Do in Existential Monadic. Second-Order Logic over Pictures. Oliver Matz. Institut fur Informatik und Praktische Mathematik

One Quantier Will Do in Existential Monadic. Second-Order Logic over Pictures. Oliver Matz. Institut fur Informatik und Praktische Mathematik One Quantier Will Do in Existential Monadic Second-Order Logic over Pictures Oliver Matz Institut fur Informatik und Praktische Mathematik Christian-Albrechts-Universitat Kiel, 24098 Kiel, Germany e-mail:

More information

Introduction to Finite-State Devices in Natural Language Processing

Introduction to Finite-State Devices in Natural Language Processing MITSUBISHI ELECTRIC RESEARCH LABORATORIES http://www.merl.com Introduction to Finite-State Devices in Natural Language Processing Emmanuel Roche, Yves Schabes TR96-13 December 1996 Abstract The theory

More information

Analysis on Graphs. Alexander Grigoryan Lecture Notes. University of Bielefeld, WS 2011/12

Analysis on Graphs. Alexander Grigoryan Lecture Notes. University of Bielefeld, WS 2011/12 Analysis on Graphs Alexander Grigoryan Lecture Notes University of Bielefeld, WS 0/ Contents The Laplace operator on graphs 5. The notion of a graph............................. 5. Cayley graphs..................................

More information

Grammars and Context-free Languages; Chomsky Hierarchy

Grammars and Context-free Languages; Chomsky Hierarchy Regular and Context-free Languages; Chomsky Hierarchy H. Geuvers Institute for Computing and Information Sciences Version: fall 2015 H. Geuvers Version: fall 2015 Huygens College 1 / 23 Outline Regular

More information

2. THE MAIN RESULTS In the following, we denote by the underlying order of the lattice and by the associated Mobius function. Further let z := fx 2 :

2. THE MAIN RESULTS In the following, we denote by the underlying order of the lattice and by the associated Mobius function. Further let z := fx 2 : COMMUNICATION COMLEITY IN LATTICES Rudolf Ahlswede, Ning Cai, and Ulrich Tamm Department of Mathematics University of Bielefeld.O. Box 100131 W-4800 Bielefeld Germany 1. INTRODUCTION Let denote a nite

More information

Note Watson Crick D0L systems with regular triggers

Note Watson Crick D0L systems with regular triggers Theoretical Computer Science 259 (2001) 689 698 www.elsevier.com/locate/tcs Note Watson Crick D0L systems with regular triggers Juha Honkala a; ;1, Arto Salomaa b a Department of Mathematics, University

More information

of acceptance conditions (nite, looping and repeating) for the automata. It turns out,

of acceptance conditions (nite, looping and repeating) for the automata. It turns out, Reasoning about Innite Computations Moshe Y. Vardi y IBM Almaden Research Center Pierre Wolper z Universite de Liege Abstract We investigate extensions of temporal logic by connectives dened by nite automata

More information

ON THE COMPLEXITY OF SOLVING THE GENERALIZED SET PACKING PROBLEM APPROXIMATELY. Nimrod Megiddoy

ON THE COMPLEXITY OF SOLVING THE GENERALIZED SET PACKING PROBLEM APPROXIMATELY. Nimrod Megiddoy ON THE COMPLEXITY OF SOLVING THE GENERALIZED SET PACKING PROBLEM APPROXIMATELY Nimrod Megiddoy Abstract. The generalized set packing problem (GSP ) is as follows. Given a family F of subsets of M = f mg

More information