Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Computing languages by (bounded) local sets Dora Giammarresi Università di Roma “Tor Vergata” Italy."— Presentation transcript:

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

2 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.

3 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 # # 0 0011 string w over Γ= {0, 1} w=w=0 0011 Θ = finite set of strings of length 2 over Γ  #  … allowed substrings 0000 0 11 1 ##

4 … 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

5 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 ####### # # # #### # # # ### 0 00 00 00 00 1 1 1 111 Θ = finite set of 2x2 pictures over Γ  #  … allowed subpictures 0 0 00 00 00 ## #0 ## 1 1 11 11 0 00 00 00 00 1 1 1 111

6 …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 ####### # # # #### # # # ### 0 0 0 0 0 1 0 1 1 12 2 2 2 2

7 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 10 1 00 0 10 0 10 0 ## 1 1 0 ## 1 ## 1 ## 0 0 ## 1 ## 1 $ Γ= {0, 1, $}

8 …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= ##############

9 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

10 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 # # # 0000 0000 # # # 0 ## 000

11 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;

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

13 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 ######### # # # # # # # # # # # # # # # # # # # ########

14 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

15 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!

16 Bounded Grids Local Sets Computations Definition : grids with 2-sides frontiers ######## # # # # # # # # # ####### 0000 11 0 1 1 1 00 0 0 0 0 0 1 11 11 1 1 0000 11 0 1 1 1 10 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

17 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]

18 An example L=  a n b n | n≥0 } 0 0000 0000 000 00 0 1 11 111 1111 44444 # #### # #### # # # # # # # # # # # # # # # # π: Γ →  projection 4 → a 0 → b  = {a,b} Γ= { 0,1,4 }

19 Another example (use same idea!) L=  a n b n c n | n≥0 } 0 0000 0000 000 00 0 1 11 111 1111 22222 2222 222 22 2 3 33 3 3 3 3 3 33 4444455555 π: Γ →  projection 4 → a 5 → b 2 → c  = {a,b,c} Γ= { 0,1,4,2,3,5 }

20 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 }

21 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.

22 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 # ##### # # # # ## # 00011 1 1 1 11 1 0 0 0 finish to build the picture by elements of Θ

23 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

24 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.

25 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.

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

27 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  Θ Θ

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

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

30 The end

31 Proof (by example) 1 1 0 0 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

32 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

33 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


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

Similar presentations


Ads by Google