Computing languages by (bounded) local sets Dora Giammarresi Università di Roma “Tor Vergata” Italy.

Slides:



Advertisements
Similar presentations
Two-dimensional Rational Automata: a bridge unifying 1d and 2d language theory Marcella Anselmo Dora Giammarresi Maria Madonia Univ. of Salerno Univ. Roma.
Advertisements

Chapter 5 Pushdown Automata
8/27/2009 Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 2 Theory of Computation Finite Automata Operations on languages Nondeterminism L2.1.
Natural Language Processing - Formal Language - (formal) Language (formal) Grammar.
Tiling Automata: a computational model for recognizable two-dimensional languages Marcella Anselmo Dora Giammarresi Maria Madonia Univ. of Salerno Univ.
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,
Pushdown Automata Chapter 12. Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
Introduction to Computability Theory
NFAs Sipser 1.2 (pages 47–54). CS 311 Fall Recall… Last time we showed that the class of regular languages is closed under: –Complement –Union.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
NFAs Sipser 1.2 (pages 47–54). CS 311 Mount Holyoke College 2 Recall… Last time we showed that the class of regular languages is closed under: –Complement.
Languages, grammars, and regular expressions
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
1 Languages and Finite Automata or how to talk to machines...
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
Normal forms for Context-Free Grammars
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Problem of the DAY Create a regular context-free grammar that generates L= {w  {a,b}* : the number of a’s in w is not divisible by 3} Hint: start by designing.
Week 14 - Friday.  What did we talk about last time?  Exam 3 post mortem  Finite state automata  Equivalence with regular expressions.
CSE 3813 Introduction to Formal Languages and Automata Chapter 8 Properties of Context-free Languages These class notes are based on material from our.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Theory of Languages and Automata
Context-free Grammars Example : S   Shortened notation : S  aSaS   | aSa | bSb S  bSb Which strings can be generated from S ? [Section 6.1]
TM Design Universal TM MA/CSSE 474 Theory of Computation.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Section 14.2 A Hierarchy of Languages Context-Sensitive Languages A context-sensitive grammar has productions of the form xAz  xyz, where A is a nonterminal.
The Chomsky Hierarchy and Beyond
1 INFO 2950 Prof. Carla Gomes Module Modeling Computation: Language Recognition Rosen, Chapter 12.4.
Grammars CPSC 5135.
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
Introduction to Language Theory
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
1 Dal non-determinismo al determinismo ( nei linguaggi 2dim ): alcune riflessioni Marcella Anselmo, Dora Giammarresi, Maria Madonia, Antonio Restivo Riunione.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 11 Midterm Exam 2 -Context-Free Languages Mälardalen University 2005.
Strings and Languages CS 130: Theory of Computation HMU textbook, Chapter 1 (Sec 1.5)
CS 3240 – Chapter 4.  Closure Properties  Algorithms for Elementary Questions:  Is a given word, w, in L?  Is L empty, finite or infinite?  Are L.
Context-Free and Noncontext-Free Languages Chapter 13 1.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
CS 203: Introduction to Formal Languages and Automata
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
Chapter 8 Properties of Context-free Languages These class notes are based on material from our textbook, An Introduction to Formal Languages and Automata,
Formal Languages and Grammars
Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.
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.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
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,
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
CS6800 Advance Theory of Computation Spring 2016 Nasser Alsaedi
Theory of Languages and Automata By: Mojtaba Khezrian.
Languages.
Theory of Languages and Automata
Linear Bounded Automata LBAs
Natural Language Processing - Formal Language -
Context Sensitive Languages and Linear Bounded Automata
PDAs Accept Context-Free Languages
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
CSE322 The Chomsky Hierarchy
Chapter 1 Regular Language
The Chomsky Hierarchy Costas Busch - LSU.
CSCE 355 Foundations of Computation
Presentation transcript:

Computing languages by (bounded) local sets Dora Giammarresi Università di Roma “Tor Vergata” Italy

Summary of the talk Put in a unique framework some know (disjoint) results and get a: Characterization of Chomsky’s hierarchy by local sets + alphabetic projections 1. Insert new families into Chomsky’s hierarchy by introducing new types of local sets: Bounded-Grids Context-Sensitive languages 2.2.

Definition: String language L is local if all substrings of length 2 are in a finite set Θ. (L=L(Θ) ) Local (string) languages… w with border # # string w over Γ= {0, 1} w=w= Θ = finite set of strings of length 2 over Γ  #  … allowed substrings ##

… to define Regular languages Theorem : L is regular   local set of strings S such that L=π(S). , Γ alphabetsπ: Γ  alphabetic projection Local set + projection = Finite automaton Proof : local alphabet Γ = edges of automaton set Θ = pairs of consecutive edges π gives labels of the edges

Local Picture Languages [GR’94] picture p over Γ= {0, 1} Definition: Picture language L is local if all subpictures of size 2x2 are in a finite set Θ. (L=L(Θ) ) p=p= p with border ####### # # # #### # # # ### Θ = finite set of 2x2 pictures over Γ  #  … allowed subpictures ## #0 ##

…to define Context-sensitive languages Theorem [F69 – LS97]: L is context-sensitive   local set of pictures S such that L=π(fr(S)). Proof: (  ) given an accepting run of an LBA, take all instantaneous configurations and write them in order, one above the others. This gives a local picture. (  ) given a local set of 2x2 squares, define corresponding context-sensitive grammar rules such that derivations correspond to the local pictures. p= fr(p) = frontier of p ####### # # # #### # # # ###

Local sets of binary trees… tree t with border Definition: Tree set L is local if all 3-vertices sub-trees belong to a finite set Θ. (L=L(Θ) ) Θ = finite set of 3-vertices trees over Γ  #  … allowed sub-trees ## ## 1 ## 1 ## 0 0 ## 1 ## 1 $ Γ= {0, 1, $}

…to define Context-free languages Theorem [MW67]: L is context-free   local set of binary trees S such that L=π(fr(S)). Proof: Notice that a derivation tree of a context free grammar in Chomsky's Normal Form is actually a local binary tree (possibly after some minor modifications). fr(t) = frontier of t $ t= ##############

Look at them all together… ● Local sets of binary trees elementary binary tree: x y z ● Local sets of lines elementary line: x y x y ● Local sets of grids elementary grid: x y z t x y z t

look at them all together… ● Sets of line graphs Γ= {0,1} ● Sets of binary trees ● Sets of grid graphs frontier = all non-border vertices frontier = vertices adjacent to the leaves frontier = lowest non-border row ######## ###### ###### 0000 # # # # # # 0 ## 000

Chomsky’s hierarchy by local sets Proposition : Let L be a (string) language. Then: 3. L is context-sensitive  L is projection of the frontier of a local set of grids; 2. L is context-free  L is projection of the frontier of a local set of binary trees; 1. L is regular  L is projection of the frontier of a local set of lines;

Local sets as computations… # ######### ## ## # # # # # # # # # # # # # # # ######## ## ### # ######## ## Regular Context-free Context-sensitive Local machines!

Remark on local computations Size of local graph is measure of TIME of computation NOT measure of SPACE! No need to keep the all graph space: Lines left-to-right ## Trees leaves-to-root $ ## ### # ######## Grids bottom-to-top ######### # # # # # # # # # # # # # # # # # # # ########

New families into Chomsky’s hierarchy? Define a new type of local sets …. ….. and get a new family of string languages! ## ######### # # # # # # # # # # # # # # # # # # # ######## $ ## ### # ######## Regular Context-free Context-sensitive

What are the differences? ## ######### # # # # # # # # # # # # # # # # # # # ######## $ ## ### # ######## Regular Context-free Context-sensitive degree ≤ 2 ≤ 3 ≤ 4 ≤ 4n O(n) not bounded by n size n+2 O(1) BIG GAP!

Bounded Grids Local Sets Computations Definition : grids with 2-sides frontiers ######## # # # # # # # # # ####### length of w n Exact size depends on the position where we turn the string! size of local grid for w, ≤ (n+2) 2 2

Bounded Grids Local Sets Need to exploit geometric local properties of patterns defined in the pictures…. No more space for istantaneous configurations of a run of a LBA automaton! Use local picture languages theory techniques [GR’94]

An example L=  a n b n | n≥0 } # #### # #### # # # # # # # # # # # # # # # # π: Γ →  projection 4 → a 0 → b  = {a,b} Γ= { 0,1,4 }

Another example (use same idea!) L=  a n b n c n | n≥0 } π: Γ →  projection 4 → a 5 → b 2 → c  = {a,b,c} Γ= { 0,1,4,2,3,5 }

Another example L=  ww R | w  * } palindromes a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a0a0 a1a1a1a1 a1a1 a1a1a1a1a1a1 a1a1 a1a1 a1a1a1a1a1a1 a1a1 a1a1 a1a1 a0a0b0b0 b0b0 b0b0 b0b0 b0b0 b0b0 b0b0 b1b1b1b1b1b1b1b1b1b1 b1b1b1b1 π: Γ →  projection a0, a1 → a b0, b1 → b  = {a,b} Γ= {a 0, b 0, a 1, b 1 }

Bounded Grids Computations Bounded-grids context sensitive (Bgrid-CS). Theorem: If L is a projection of the 2-sides frontier of a local picture language, then L is context-sensitive.

Proof : Idea: define a LBA that “behaves” as a local machine: all the writing operations effectively build the picture! non deterministically rewrite w=x 1 x 2....x n, π(x i )=a i put w as frontier of a picture (non deterministically choose i and put x i in the BR-corner of a picture) check that all bottom and right border subpictures are in Θ Let w=a 1 a 2....a n ## 0 # ##### # # # # ## # finish to build the picture by elements of Θ

More examples  L=  a n b 2n c (n+3) | n≥0 }  L=  a n | n≥0 }; L=  a 2 | n≥0 }  L=  a p | p prime }; L=  a f | f not prime }  L=  ww | w  * }  L=  w |w| | |w|>1 } 2 n

Closure properties Theorem: Bgrid-CS languages are closed under concatenation and Kleene's star. Theorem: Bgrid-CS languages are closed under Boolean union and intersection.

Open problem ● Bgrid-CS languages = CS languages ? Remark 2: [ Gladkij] there are CS-languages with no linear bounded derivations Remark 1: [ R.Book71] In 1971 R. Book defined infinite hierarchy of subfamilies of context-sensitive languages corresponding to different time bounding functions leaving open question whether hierarchy collaps.

Open problem …recall that CS languages are closed under complement. ● Are Bgrid-CS languages closed under complement? What about deterministic versions?

Deterministic Local B-grid (machines) Open question: are deterministic B-grid CS languages equivalent to non-deterministic ones?  x 1,x 2,x 3  Γ  {#} there is at most one Definition: Set of 2x2 grids Θ is deterministic when, y x1x1 x2x2 x3x3  Θ Θ

Remark ● Bgrid-CS languages = CS languages ● Bgrid-CS languages are “deterministic” DSPACE(n)=NSPACE(n)

Open problem (the last one!) …turning back to characterization for the Chomsky's hierarchy ……. ● Can we define a “local set” to characterize recursive languages?

The end

Proof (by example) p q p0 p1p1 p1p1 p1p1 q1 q0q0 q0q0 q0q0q0q0  = {0, 1} p0q1 p1p1 Γ = { p0, p1, q0, q1 } #p0 #p1p1 # #q1 p0 p p q q π:π: p0, q0 p1, q1 0101

Look at them more generally… Γ alphabet # 1,…, # k  Γ border symbol embedded labeled graph over Γ  {# 1,…, # k } frontier = (labels of) a path of non-border vertices border vertices = vertices carryng # 1,…, # k (string over Γ) elementary graph = “small” graph shape local set of graphs = (labels of) a path of non-border vertices

Local sets Definition: A set of graphs S over Γ  {#} is local if there exists a finite set of elementary graphs Θ over Γ  {#} such that, for all s  S, every subgraph of elementary size belongs to Θ. We write S= L (Θ). Given a typology of graphs, fix “shape” of elementary graph