1 / 33

Computing languages by (bounded) local sets

Computing languages by (bounded) local sets. Dora Giammarresi Università di Roma “Tor Vergata” Italy. 1. Put in a unique framework some know (disjoint) results and get a: Characterization of Chomsky’s hierarchy by local sets + alphabetic projections. 2 .

chill
Download Presentation

Computing languages by (bounded) local sets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

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

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

  6. # # # # # # # 0 # 2 1 2 0 # 2 0 1 0 2 # # 0 1 # 0 2 1 # # # # # # # # …to define Context-sensitive languages p= fr(p) = frontier of p 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.

  7. finite set of 3-vertices trees over Γ # Θ = 0 0 0 0 # # # 0 # # # 0 0 1 0 0 1 1 1 # 1 1 1 # $ 0 1 # 0 1 # 1 # # allowed sub-trees … Γ= {0, 1, $} 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(Θ) )

  8. t= # # # # # # # # # # # # # # $ …to define Context-free languages fr(t) = frontier of t 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).

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

  10. 0 0 0 0 # # # # # # # # # # # # # # # # # # # # # # # # # # # # 0 0 0 0 0 0 0 0 0 0 0 0 Γ= {0,1} ● Sets of line graphs look at them all together… frontier = all non-border vertices ● Sets ofbinary trees frontier = vertices adjacent to the leaves ● Sets ofgrid graphs frontier = lowest non-border row

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

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

  13. # # # # # # # # # # # # # # # # # # # • Lines left-to-right # # # # # # • Trees leaves-to-root # # $ # # # # # # # # # # # # # # # # # # # # # # # # # • Grids bottom-to-top Remark on local computations Size of local graph is measure ofTIMEof computation NOTmeasure ofSPACE! No need to keep the all graph space:

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

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

  16. size of local grid for w, ≤ (n+2)2 2 # # # # # # # # # # # # # # # # # # # # # # # # 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 1 1 1 0 1 0 0 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!

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

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

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

  20. b1 b1 b1 b1 b1 b0 b0 b0 b0 b0 Another example L= wwR | w*} palindromes = {a,b} a1 a1 a1 a1 a1 a1 a0 Γ= {a0, b0, a1, b1} a0 a1 a1 a1 a1 a1 a0 a0 a1 a1 π:Γ → projection a0, a1→ a b0, b1→ b b1 b1 a0 a0 a0 a0 a1 a0 a0 b0 a0 a0 b0 a0 a0

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

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

  23. L=anb2nc(n+3) | n≥0 } • L=an | n≥0 }; L=a2 | n≥0 } • L=ap | p prime}; L=af | f not prime} • L=ww | w* } • L=w|w| | |w|>1} More examples n 2

  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 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. Remark 2:[ Gladkij] there are CS-languages with no linear bounded derivations

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

  27. Definition: Set of 2x2 grids Θ is deterministic when, y x3  x1,x2,x3  Γ{#} there is at most one  Θ x1 x2 Deterministic Local B-grid (machines) Open question: are deterministic B-grid CS languages equivalent to non-deterministic ones?

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

  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. p p q q # p0 p1 q1 q0 # q1 q1 p0 p0 p0 p0 p1 # p0 p1 q0 p1 q0 q0 q1 # q1 p1 p0 , q0 p1 , q1 0 1 π: 0 = {0, 1} 1 Proof (by example) 0 Γ = {p0, p1, q0, q1} q p 1

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

  33. Given a typology of graphs, fix “shape” of elementary graph 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 (Θ).

More Related