Linear Conjunctive Grammars and One-turn Synchronized Alternating Pushdown Automata Formal Grammar 2009, Bordeaux Tamar Aizikowitz* and Michael Kaminski.

Slides:



Advertisements
Similar presentations
PDAs Accept Context-Free Languages
Advertisements

&& Department of nskinfo-i educationwww.nsksofttch.com CS2303-THEORY OF COMPUTATION uChapter: Closure.
Chapter 4 An Introduction to Finite Automata
Source of slides: Introduction to Automata Theory, Languages and Computation.
Automata Theory December 2001 NPDAPart 3:. 2 NPDA example Example: a calculator for Reverse Polish expressions Infix expressions like: a + log((b + c)/d)
6.2 Closure Properties of CFL's
Lecture 10: Context-Free Languages Contextually David Evans
CSCI 3130: Formal Languages and Automata Theory Tutorial 5
Conjunctive Grammars and Synchronized Alternating Pushdown Automata October 2009 Tamar Aizikowitz Joint work with Michael Kaminski Technion – Israel Institute.
Lexical Analysis Arial Font Family.
Cook-Levin Theorem Proof and Illustration
How to convert a left linear grammar to a right linear grammar
Grammar types There are 4 types of grammars according to the types of rules: – General grammars – Context Sensitive grammars – Context Free grammars –
Finite-state Recognizers
Conjunctive Grammars and Alternating Automata Tamar Aizikowitz and Michael Kaminski Technion – Israel Institute of Technology WoLLIC 2008 Heriot-Watt University.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
NFAs and DFAs Sipser 1.2 (pages 47-63).
The Pumping Lemma for CFL’s
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Closure Properties of CFL's
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
CFGs and PDAs Sipser 2 (pages ). Long long ago…
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
CFGs and PDAs Sipser 2 (pages ). Last time…
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 4 Context-free grammars Jan Maluszynski, IDA, 2007
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2009 with acknowledgement.
January 14, 2015CS21 Lecture 51 CS21 Decidability and Tractability Lecture 5 January 14, 2015.
Normal forms for Context-Free Grammars
CS 3240: Languages and Computation Pushdown Automata & CF Grammars NOTE: THESE ARE ONLY PARTIAL SLIDES RELATED TO WEEKS 9 AND 10. PLEASE REFER TO THE TEXTBOOK.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
CSR 2011, St. Petersburg, Russia
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Pushdown Automata (PDAs)
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 11 Midterm Exam 2 -Context-Free Languages Mälardalen University 2005.
Context-Free and Noncontext-Free Languages Chapter 13 1.
Closure Properties Lemma: Let A 1 and A 2 be two CF languages, then the union A 1  A 2 is context free as well. Proof: Assume that the two grammars are.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 203: Introduction to Formal Languages and Automata
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
An Introduction to Rabin Automata Presented By: Tamar Aizikowitz Spring 2007 Automata Seminar.
Chapter 8 Properties of Context-free Languages These class notes are based on material from our textbook, An Introduction to Formal Languages and Automata,
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 2 Context-Free Languages Some slides are in courtesy.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Grammar Set of variables Set of terminal symbols Start variable Set of Production rules.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
Language Recognition MSU CSE 260.
Formal Languages, Automata and Models of Computation
Pushdown Automata.
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
Natural Language Processing - Formal Language -
CIS Automata and Formal Languages – Pei Wang
PDAs Accept Context-Free Languages
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
Intro to Theory of Computation
Deterministic PDAs - DPDAs
Chapter 2 Context-Free Language - 01
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Linear Conjunctive Grammars and One-turn Synchronized Alternating Pushdown Automata Formal Grammar 2009, Bordeaux Tamar Aizikowitz* and Michael Kaminski Technion – Israel Institute of Technology

Introduction  Context-free languages combine expressiveness with polynomial parsing, making them appealing for practical applications.  Several fields (e.g., Programming Languages, Computational Linguistics, Computational Biology) have expressed a need for a slightly stronger language class. of 26 2

Conjunctive Grammars and SAPDA  Conjunctive Grammars (CG) [Okhotin, 2001] are an extension of context-free grammars.  Have explicit intersection rules.  Retain polynomial parsing  practical applications.  Synchronized Alternating Pushdown Automata (SAPDA) [Aizikowitz et al., 2008] extend PDA.  First automaton counterpart for Conjunctive Grammars. of 26 3

Linear CG and One-turn SAPDA  Linear Conjunctive Grammars (LCG) [Okhotin, 2001] are a sub-family of Conjunctive Grammars.  Analogous to Linear Grammars as a sub-family of Context-free Grammars.  Have efficient parsing algorithms [Okhotin, 2003]  Equivalent to Trellis Automata [Okhotin, 2004]  Related to Mildly Context Sensitive Languages  We define a sub-family of SAPDA, one-turn SAPDA, and prove its equivalence to LCG. of 26 4

Outline  Model Definitions  Conjunctive Grammars  Linear Conjunctive Grammars  Synchronized Alternating Pushdown Automata  Main Results  One-turn Synchronized Alternating PDA  Equivalence Results  Linear Conjunctive Languages  Characterization of Language Class  Mildly Context Sensitive Languages of 26 5

Conjunctive Grammars Linear Conjunctive Grammars Synchronized Alternating Pushdown Automata Model Definitions

Conjunctive Grammars  A CG is a quadruple: G=(V, Σ, P, S )  Rules: A → (α 1 & ⋯ & α n ) s.t. A ∊ V, α i ∊ (V ⋃ Σ) *  Derivation steps:  s 1 As 2  s 1 (α 1 & ⋯ & α n )s 2 where A → (α 1 & ⋯ & α n ) ∊ P  s 1 (w & ⋯ & w)s 2  s 1 w s 2 where w ∊ Σ *  Language: L(G) = {w ∊ Σ * | S  * w}  Note: (A & B)  * w iff A  * w ∧ B  * w non-terminals terminals derivation rules start symbol n=1  standard CFG of 26 7

Linear Conjunctive Grammars  A CG G=(V, Σ, P, S ) is linear if all rules are:  A → (u 1 B 1 v 1 & ⋯ & u n B n v n ) s.t. u i,v i ∊ Σ *, B i ∊ V  A → w s.t. w ∊ Σ *  Example: a Linear CG for the multiple-agreement language {a n b n c n | n ∊ ℕ } :  C → Cc | D ; D → aDb | ε  L(C) = {a n b n c m | n,m ∊ ℕ }  A → aA | E ; E → bEc | ε  L(A) = {a m b n c n | n,m ∊ ℕ }  S → (C & A)  L(S ) = L(C) ⋂ L(A)  S  (C & A)  (Cc & A)  (Dc & A)  (aDbc & A)   (abc & A)  ⋯  (abc & abc)  abc of 26 8

Synchronized Alternating Pushdown Automata  Synchronized Alternating Pushdown Automata (SAPDA) are an extension of classical PDA.  Transitions are made to conjunctions of ( state, stack-word ) pairs, e.g., δ( q, σ, X ) = { ( p 1, XX ) ∧ ( p 2,Y ), ( p 3, Z ) }  Note: if all conjunctions are of one pair only, the automaton is a “regular” PDA. of 26 9 non-deterministic model = many possible transitions

SAPDA Stack Tree of  The stack of an SAPDA is a tree. A transition to n pairs splits the current branch into n branches.  Branches are processed independently.  Empty sibling branches can be collapsed if they are synchronized = are in the same state and have read the same portion of the input. B AC D q p B A q δ(q,σ,A)={(q,A)  (p,DC)} B q collapse B εε q q

SAPDA Formal Definition of  An SAPDA is a sextuple A = ( Q, Σ, Γ, q 0, δ, ⊥ )  Transition function: δ(q,σ, X ) ⊆ {(q 1,α 1 ) ∧ ⋯ ∧ (q n,α n ) | q i ∊ Q, α i ∊ Γ *, n ∊ ℕ } states terminalsinitial state transition function initial stack symbol stack symbols

SAPDA Computation and Language of  Computation:  Each step, a transition is applied to one stack-branch  If a stack-branch is empty, it cannot be selected  Synchronous empty sibling branches are collapsed  Initial Configuration:  Accepting Configuration:  Language: L(A) = {w ∊ Σ * | ∃ q ∊ Q, (q 0,w, ⊥ ) ⊢ * (q,ε,ε)}  Note: all branches must empty ~ must “agree”. ⊥ q0q0 ε q have the same state and remaining input

Reduplication with a Center Marker of  The reduplication with a center marker language (RCM), { w$w | w ∊ Σ * }, describes structures in various fields, e.g.,  Copying phenomena in natural languages: “deal or no deal”, “boys will be boys”, “is she beautiful or is she beautiful?”  Biology: microRNA patterns in DNA, tandem repeats  We will construct an SAPDA for RCM.  Note: it is not known whether reduplication without a center marker can be derived by a CG.

Example: SAPDA for RCM of  We consider an SAPDA for { w$uw | w,u ∊ Σ * }, which can easily be modified to accept RCM.  The SAPDA is especially interesting, as it utilizes recursive conjunctive transitions.  Construction Idea: if σ in the n th letter before the $, check that the n th letter from the end is also σ. σσ$ n - 1 wuw

Computation of SAPDA for RCM of ⊥ ⊥⊥ q0q0 ⊥⊥ ⊥ ⊥ ε q0q0 qa1qa1 # ε qa1qa1 q0q0 qb1qb1 ε q0q0 # qa1qa1 # qb1qb1 qb2qb2 qa2qa2 qb2qb2 ε qeqe qeqe qeqe qeqe ε ε ε qeqe qeqe qeqe a b b $ b a b b word accepted!

One-turn Synchronized Alternating PDA Equivalence Results Main Results

Motivation of  It is a well known result [Ginsburg et al., 1966] that Linear Grammars are equivalent to one-turn PDA.  A one-turn PDA is a PDA s.t. all accepting computations, have only one turn.  A turn is a computation step where the stack height changes from increasing to decreasing.

One-turn SAPDA of  We introduce a similar notion of one-turn SAPDA, analogously to one-turn PDA.  An SAPDA is one-turn if all stack-branches make exactly one turn in all accepting computations.  Note: the requirement of a turn is not limiting as we are considering acceptance by empty stack.

Informal Definition of  Assume all transitions on a stack-branch and its sub-tree are applied consecutively (reordering if needed).  We refer to this segment of the computation as the relevant transitions w.r.t. the branch.  An SAPDA is one-turn if for every branch, the relevant transitions can be split into three phases: (1) Increasing transitions applied to the stack-branch. (2) A conjunctive transition followed by transitions applied to the branches in the sub-tree, and then a collapsing transition of the sub-tree. (3) Decreasing transitions on the stack-branch.

Informal Definition Continued… of  Note: if the automaton is a classical PDA, then there is only one branch with no second phase (no conjunctive transitions), and therefore the automaton is a classical one-turn PDA.  Example: The SAPDA we saw for RCM is one-turn. phase 1phase 3 phase 2

Equivalence Results of  Theorem 1. A language is generated by an LCG if and only if it is accepted by a one-turn SAPDA.  This result mirrors the classical equivalence between Linear Grammars and one-turn PDA, strengthening the claim of SAPDA as a natural automaton counterpart for CG.  Corollary: One-turn SAPDA are equivalent to Trellis automata.

Proof Sketch of  “only if”: given an Linear Conjunctive Grammar, we construct a one-turn SAPDA.  Extension of the classical construction of a Context- free Grammar from a PDA.  “if”: given a one-turn SAPDA we construct an equivalent Linear Conjunctive Grammar.  Extension of the classical construction of a LG from a one-turn PDA [Ginsburg et al., 1966].  The full proofs for both directions can be found in [Aizikowitz et al., Technical Report CS , Technion].

Characterization of Language Class Mildly Context Sensitive Languages Linear Conjunctive Languages

Characterization of Language Class of  LCG can derive all finite conjunctions of linear CF languages as well as some additional languages (e.g., RCM).  Closure Properties:  Union, intersection, complement, inverse homomorphism  Concatenation, ε -free homomorphism  Kleene star  Decidability Problems:  Membership: O(n 2 ) time and O(n) space.  Emptiness, finiteness, equivalence, inclusion, regularity LG CFGLCG CG  ?   

Mildly Context Sensitive Languages of  We explore the correlation between LC Languages and Mildly Context Sensitive Languages (MCSL).  Consider the categorization of MCSL: (1)They contain the context-free languages  this requirement holds only for general CG. (2)They contain multiple-agreement, cross-agreement and reduplication (3) They are polynomially parsable (4) They are semi-linear  an LCG exists for the language { ba 2 ba 4 ⋯ ba 2n b | n ∊ ℕ }    

Summary of  One-turn SAPDA introduced as a sub-family of Synchronized Alternating Pushdown Automata.  One-turn SAPDA shown to be equivalent to Linear Conjunctive Grammars.  The result strengthens SAPDA’s claim as a natural automaton counterpart for Conjunctive Grammars.  Conjunctive Grammars are a very appealing model for potential practical application, and thus encourage further research.

Thank you.

References  Aizikowitz, T., Kaminski, M.: Conjunctive grammars and alternating pushdown automata. WoLLIC’09. LNAI 5110 (2008) 30 – 41  Aizikowitz, T., Kaminski, M.: Linear conjunctive grammars and one-turn synchronized alternating pushdown automata. Technical Report CS Technion (2009)  Ginsburg, S., Spanier, E.h.: Finite-turn pushdown automata. SIAM Journal on Control. 4(3) (1966) 429 – 453  Okhotin, A.: Conjunctive grammars. Journal of Automata, Languages and Combinatorics. 6(4) (2001) 519 – 535  Okhotin, A.: Efficient automaton-based recognition for linear conjunctive languages. IJFCS. 14(6) (2003) 1103 – 1116  Okhotin, A.: On the equivalence of linear conjunctive grammars and trellis automata. RAIRO Theoretical Informatics and Applications. 38(1) (2004) 69 – 88

Construction of SAPDA for RCM of A=(Q,{a,b,$},{ ⊥,#},q 0,δ, ⊥ ) Q = {q 0,q e } ⋃ {q σ i | σ ∊ {a, b}, i ∊ {1, 2}} δ(q 0,σ, ⊥ ) = {(q σ 1, ⊥ ) ∧ (q 0, ⊥ )} δ(q σ 1,τ, X) = {(q σ 1,#X)} δ(q 0,$, ⊥ ) = {(q e, ε)} δ(q σ 1,$, X) = {(q σ 2, X)} δ(q σ 2,τ  σ, X) = {(q σ 2, X)} δ(q σ 2,σ, X) = {(q e, X), (q σ 2, X)} δ(q e,τ,#) = {(q e, ε)} δ(q e, ε, ⊥ ) = {(q e, ε)} recursively open branch to verify σ is n th from the $ and from the end “count” symbols between σ and $ $ reached, stop recursion $ reached, stop “counting” symbols look for σ “guess” that this is the σ we are looking for, or keep looking “count” symbols from σ to the end all done: empty stack

“only if” Proof Sketch Continued… of S  * w 1 A w 2  w1(u1B1v1 & ⋯)w2w1(u1B1v1 & ⋯)w2  ⋯ u 1 xCyv 1 ⋯  ⋯ u1x(⋯ & ⋯)yv1 ⋯⋯ u1x(⋯ & ⋯)yv1 ⋯ ** ⋯ u 1 x w yv 1 ⋯ A v1v1 B1B1 u1u1 w 1 u 1 x w y v 1 ⋯ w 2 ⋯ ε y C xε ⋯ phase 1phase 2phase 3