350 likes | 445 Views
Tiling Automata: a computational model for recognizable two-dimensional languages. Marcella Anselmo Dora Giammarresi Maria Madonia Univ. of Salerno Univ. Roma Tor Vergata Univ. of Catania ITALY. Overview.
E N D
Tiling Automata: a computational model for recognizable two-dimensional languages Marcella Anselmo Dora Giammarresi Maria Madonia Univ. of Salerno Univ. Roma Tor Vergata Univ. of Catania ITALY
Overview • Topic:recognizability of 2dim languages (picture languages) by finite devices • Motivation:define a computational device for 2dim languages based on tiling systems • Results:definition of tiling automata, comparison of deterministic and non-deterministic models, with OTA, 4NFA
Two-dimensional string (or picture)over a finite alphabet: a b b c a c b a c b b a a b a • finite alphabet • ** all 2dim strings (pictures) over • L **2dim language Two-dimensional (2dim) Languages Problem: generalizing formal language theory from 1dim to 2dim
From 1dim to 2dim A unifying point of view (G, Restivo, 1992): Recognizability by tiling system (= local language + projection) REC family Several attempts since 60s: • Automata (4NFA and OTA, AFA, … ) • Logics (monadic second-order, first-order, existential monadic second-order) • Grammars (matrix, image, array, TRG,… grammars) • Operations (column-, row- concatenation, stars, …) Definition of different classes of picture languages
First model by Blum & Hewitt (1967) • Generalization of classical 2-way automata: They can move: Left, Right, Up, Down 4-way automata (4NFA) Transition function (p,a)= (q,d )d{,,,} - The deterministic model is denoted by 4DFA - L(4DFA)L(4NFA) - L(4DFA), L(4NFA) not closed under concatenations and *
OTA: a restricted type of 2dim cellular automata ….computing by diagonal waves q i-1,j-1 q i-1,j q i,j-1 • L(DOTA)L(OTA) / On-line tesselation automata (OTA) : Q Q Q 2Q • DOTA if : Q Q Q Q
p = p = • L islocalif there exists a set of tiles (i. e. square pictures of size 22) such that, for any p in L, any sub-picture 22of is in p REC family I • REC family is defined in terms of local languages • It is necessary to identify the boundary of a picture p • using a boundary symbol
0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 = 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 p = # # # # # 1 0 0 # 1 0 0 # 0 1 0 # 0 1 0 # p = 0 0 1 # 0 0 1 # # # # # # (Usual) Example of local language Ld = the set of square pictures with symbol “1” in all main diagonal positions and symbol “0” in the other positions
REC family II • L is recognizable by tiling systemif L= (L’) where L’ is a local language and is a mapping from the alphabet of L’ to the alphabet of L (, , , ) , where L’=L(), is called tiling system Example: LSq = all squares over = {a} is recognizable by tiling system. Set L’=Ld and (1)= (0)= a • REC is the family of two-dimensional languages recognizable by tiling system
b b0 a0 b1 b0 b0 a0 b2 a1 b1 b2 a1 b1 a1 b1 a0 a1 b2 b2 a1 a0 b1 # b b1 b2 a b a1 b0 # Θ= 1 2 0 # # # # a0 b1 b0 a0 a (a0)=(a1) =a; (b0)= (b1) = (b2)=b; w = b a b a a b a w’= # b0 a1 b2 a0 a1 b2 a0# 1dim case: from an automaton to a tiling system L= strings over ={a,b}starting with b and with evenoccurrences of a
b b0 b0 b1 b0 b2 a0 a1 a0 b2 b1 a1 a1 a1 b2 b1 b1 b2 a1 a0 b1 a0 # b b1 b2 a b a1 # b0 Θ= 1 2 0 # # # # a0 a0 b0 b1 a # # 1dim case: “Computing” by a tiling system (from a tiling systemto an automaton) b w = w’= # b0 a1 b2 a0 a1 b a b a a a a0 b2 Θ corresponds to undirected edges! To use Θ for a computation we need to decide a scanning strategy + variable to keep current local symbol (state)
0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 = 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 p = 0 1 0 2dim case: “Computing” by a tiling system (from a tiling systemto an automaton) LSq = squares over {a}. Use L’=Ld(1)= (0)= a # # # # # First, decide a scanning strategy! Recall last computed local symbols! 1 a a 0 a # # 0 a a a # # 0 a a a # # # # # # #
“Computing” by a tiling system (from a tiling system to an automaton) Remark : Tiling system = “undirectional” transitions For a 2dim finite tiling automaton we need Tiling system+scanning strategy+data structure Local picture is the run of the automaton.
Scanning strategies (I) By column Diagonal (“OTA”) 1 2 4 1 4 5 3 13 2 5 3 6 6 14 15
Scanning strategies (II) Snake-like Free 1 2 3 4 5 4 6 3 5 1 2
Scanning strategy We need a “good” one! • Start in a corner • Filling-all-the-picture property • Computable next-position function • Contiguity property • Mono-directional (tl2br or tr2bl or br2tl or bl2tr)
By column scanning strategy Start in a corner # # # # # # # # # Filling-all-the-picture 1 4 # # 2 5 Comp. next-position function: (i, j) (i+1, j) # # 3 6 # # # # # # # Contiguity property Mono-directional (tl2br) An example
1 2 3 • Supports updating operations • extract 3 local symbols 1,2,3needed to compute • the next local symbol (ex. ) • insert new local symbol Data Structure In 1dim automata the data structure saves the current state (local symbol) and updates it. In 2dim • Depends on the chosen scanning procedure
Definition: A tiling automaton (TA) of type tl2bris A=(T, S, D0, ) where: • T = (, , , ) is a tiling system • S is a tl2br-directed scanning strategy • D0 initial content of data structure • : (1, 2, 3, a) = 4if Θ and (4)=a 1 2 3 4 Tiling Automata (1)
1 0 0 # # 0 0 Example Consider a tiling automatonA=(TSq, Sr, D0, ) where Tsq tiling system for LSq and Sr a scanning strategy that goes row by row (from the left to the right) 0 1 0 (*) = a a 0 *
Similarly define tiling automata of types tr2bl, br2tl,bl2tr L(TA-tl2br)= L(TA-tr2bl)= L(TA-br2tl)= L(TA-bl2tr)= = L(TA) = REC Acceptance defined as usual L(TA- tl2br) Tiling Automata (2)
Tiling Automata (3) • Use standard definitions from string case and define: • Unambiguos Tiling Automata (UTA) • Deterministic Tiling Automata (DTA) L(DTA) =L(DTA-tl2br) L(DTA-tr2bl) L(DTA-br2tl) L(DTA-bl2tr)
L(TA) = REC = L(OTA) • L(DTA) L(DOTA) Languages of Tiling Automata Proposition: The following properties hold • L(DTA) is incomparable with L(4DFA) • L(UTA) L(DTA)L(4DFA)
Sketch proof item 3) • L(DTA) is incomparable with L(4DFA) Remark : TA are conceptually different from 4NFA in L(4DFA) but not in L(DTA) in L(DTA) but not in L(4DFA) (K. Inoue, A. Nakamura 77)
Conclusions • Tiling Automata necessary: • - to use tiling system as computational devices • - to introduce a “more computational” notion of determinism • Tiling Automata reduce to classical string automata in the • case of one-row pictures
Proposition:Deterministic TA with - next-position function in O(1) time, - data structure occupies space O(m+n) and supports the operations in time O(1) parsing in time O(mn) and O(m+n) extra-space. Complexity issue
Why Tiling Automata? A Tiling System does not correspond to an effective procedure of recognition.
b b0 b2 a1 b2 a1 b1 b0 a0 b0 a0 b1 b1 a0 b1 a1 b2 a1 a0 a1 b1 b2 # b b1 b2 a b a1 # b0 Θ= 1 2 0 # # # # a0 b1 a0 b0 a w = b a b a a b a # # 1dim case: “Computing” by a tiling system (from a tiling systemto an automaton) a0 Θ corresponds to undirected edges! w’= # b0 a1 b2 a0 a1 b2 a0 # To use Θ for a computation we need to decide a scanning strategy + variable to keep current local symbol (state)
b b0 b0 a1 b2 a1 b0 b1 a0 a0 b1 b2 a1 b1 a1 b1 a1 b2 a0 a0 b1 b2 # b b1 b2 a b a1 # b0 Θ= 1 2 0 # # # # a0 b1 a0 b0 a w = b a b a a b a w’= # b0 a1 b2 a0 a1 b2 a0# 1dim case: “Computing” by a tiling system (from a tiling systemto an automaton) Θ corresponds to undirected edges! To use Θ for a computation we need to decide a scanning strategy + variable to keep current local symbol (state)
“Computing” by a tiling system (from a tiling system to an automaton) Remark : Tiling system = “undirectional” transitions For a 2dim finite tiling automaton we need Tiling system+scanning strategy+data structure Local picture is the run of the automaton. Remark : All 2dim tiling automata “correspond” to family REC (i.e. scanning procedure does not matter!) BUT it is necessary to define determinism (= backtracking 0, where???)
w with border # 0 1 0 0 1 # 0 0 1 0 0 1 Θ = … 0 1 # # Local (string) languages…(TOGLIERE string w over Γ= {0, 1} w= 0 1 0 0 1 finite set of strings of length 2 over Γ # allowed substrings Definition: String language L is local if all substrings of length 2 are in a finite set Θ. (L=L(Θ) ) Sono equivalenti ai regular
b0 b1 b0 a1 # # a1 a1 a1 b0 b0 b0 b1 Θ = # b1 b1 a1 b1 a0 a0 a0 a0 b0 a1 # a0 b0 a0 # # 1DIM case: “Computing” by a tiling system (from a tiling system to an automaton) (Usual) Example a b b # 1 0 a w= a b b a a b a Θ corresponds to undirected edges! w’= # a1 b1 b1 a0 a1 b1 a0# To use Θ for a computation we need to decide a scanning procedure +variable to keep current local symbol (state)
Diagonal scanning strategy (“2OTA”) Start in a corner # # # # # # # # # 1 2 4 Filling-all-the-picture # # 5 3 13 Comp. next-position function: (i, j) (i+1, j-1) # # 6 14 15 # # # # # # # Contiguity property Mono-directional (tl2br) A second example