Tilingand Walking - uni-giessen.de
Transcript of Tilingand Walking - uni-giessen.de
![Page 1: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/1.jpg)
Tiling and Walkingautomata on trees and grids
Hendrik Jan Hoogeboom
Workshop on
Non-Classical Models of Automata and Applications
August 31 - September 1, 2009, Wroclaw, Poland
Hendrik Jan HoogeboomLeiden
![Page 2: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/2.jpg)
themes
acceptanceacceptanceacceptanceacceptance• tiling a global labelling• walking a local control
structuresstructuresstructuresstructures• strings• strings• trees• pictures• …
pebblespebblespebblespebbles• non-classical
![Page 3: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/3.jpg)
background
� XML document transformationXML document transformationXML document transformationXML document transformation
M
� graph explorationgraph explorationgraph explorationgraph explorationmany heads on graphs ‘robots’grids, toruses, mazes, …
![Page 4: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/4.jpg)
bottom-up tree automaton
∨∨∨∨∨∨∨∨
∧∧∧∧ ∨∨∨∨
T∨∨∨∨
∧∧∧∧
1111
1111
1111
1111
0000
1111
1111
1111
1111
1111
0000 00001111
∧∧∧∧0000
00000000
0000
∨∨∨∨0000
00000000
1111
FT00001111rules:
TF TF
T∧∧∧∧∨∨∨∨F FT1111 0000
1111
1111
11110000
0000 0000
0000
1111∧∧∧∧0000
00001111
∧∧∧∧0000
11110000
∧∧∧∧1111
11111111
∨∨∨∨1111
00001111
∨∨∨∨1111
11110000
∨∨∨∨1111
11111111
bottom-up evaluation
![Page 5: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/5.jpg)
walking along the tree
∨∨∨∨∨∨∨∨
∧∧∧∧ ∨∨∨∨
∨∨∨∨
∧∧∧∧
1111
1111
1111
1111
0000
1111
1111
1111
11110000 1111
∧∧∧∧0000
00001111
∨∨∨∨0000
00000000
∨∨∨∨1111
11110000
21
21 21
∧∧∧∧0000
00001
?
TF F
T∧∧∧∧∨∨∨∨F T1111 0000
1111
1111
0000
0000
0000
111100001111
∧∧∧∧1111
11111111
11110000
FT00001111
21∨∨∨∨
1111
11111
?
?
cf. two-way finite state automaton
evaluates and/or trees !
![Page 6: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/6.jpg)
tree walking automaton
3 1
H
internal:down1
leaf
ch2:up
root
example: complete pre order tree traversal
11
at internal node
move to first child
2 down2ch1:up
walk along edges, moves based on• state• node label• child number
(= incoming edge)
∧∧∧∧
21
2lab
ch
2
1
3
![Page 7: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/7.jpg)
strings: 2way automata
‘visit sequences’
Rabin&Scott, Shepherdson (1959)
![Page 8: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/8.jpg)
pictures (arrays, lattices)
tiling: Γ-markings match# # tiling: Γ-markings match
language: Σ-labelled rectangles
TILE
recognizable REC
(Giammarresi & Restivo, Handbook FLT 1997)
Wang tiles
local lattice languages h(LLL)
1
#
0#
0
#
#0
1
1#
0
#1
![Page 9: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/9.jpg)
squares ∈ TILE
may add more colours 9
, …,,,,
0
1
1#
1
#
0#
1
0
01
0
#
00
0
0
00
0
0
0#
0
1
10
1
0
01
#
0
0#
#
0
00
#
1
10
0
#
#0
0
0
#0
#
0
#1
0
1
1#
1
#
0#
1
0
01
0
#
00
0
0
00
0
0
0#
0
1
10
1
0
01
#
0
0#
#
0
00
#
1
10
0
#
#0
0
0
#0
0
0
#0
#
0
#1
0
#
00
#
#
##
#
1
1#
![Page 10: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/10.jpg)
other languages in TILE over pictures
• binary counting
• connected area (*)
• equal numbers (**)
(Reinhardt)
![Page 11: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/11.jpg)
not closed complement
equal- �∈ TILE
X y
(Kari & Moore, STACS 2001)
unequal- ∈ TILE
![Page 12: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/12.jpg)
picture walking
odd squares:
middle cell blue
‘four-way automaton’
nondeterministic
![Page 13: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/13.jpg)
examples
“By bouncing like a billiard ball or making knights' moves, and
ending one cell from the corner, a DFA can check that the two sides
of a rectangle are mutually prime,
or that the side of a square is a power of 2”
avoid infinite loops!
(Lindgren, Moore & Nordahl, J. Stat. Phys. 1998)
![Page 14: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/14.jpg)
tree automata as tiling system
∨∨∨∨1111
11110000
1111
∨∨∨∨
1111
1111
11110000
∧∧∧∧1111
T1111
T
####
TF TF
∨∨∨∨
T∧∧∧∧
∨∨∨∨
∨∨∨∨F
∧∧∧∧
FT
∨∨∨∨
T∨∨∨∨
∧∧∧∧
1111
1111
1111
1111
0000
1111
1111
1111
1111
1111
11110000
0000 0000
0000
1111
![Page 15: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/15.jpg)
not accepted by walking
equivalent n×2n ‘chunks’ (k states)
1 2n
n
#
#
(Inoue & Nakamura, 1977)
equivalent n×2 ‘chunks’ (k states)
inout
outout
![Page 16: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/16.jpg)
TILE vs. WALK
WALK ⊆⊆⊆⊆ TILE
visit sequences
WALK = TILE (REG) strings
WALK ⊂⊂⊂⊂ TILE (REG) trees (open untill 2005!)
WALK ⊂⊂⊂⊂ TILE (REC) pictures ‘chunks’
![Page 17: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/17.jpg)
‘branching structure’ of even lengthBojańczyk & Colcombet STOC, 2005
WALK ⊂⊂⊂⊂ TILE
bbbb
branching? for trees
not by WALKbut FO
aa
aaaaa
a
bbbb
ba
a
bb
![Page 18: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/18.jpg)
ADDING PEBBLES
![Page 19: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/19.jpg)
pebbles to mark nodesBojańczyk & Colcombet
bbbb
WALK ⊂⊂⊂⊂ TILEfor trees
not by WALKbut PBBL
using a pebbleto determine branching
aa
aaaaa
a
bbbb
ba
a
bb
![Page 20: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/20.jpg)
adding nested pebbles to the TWA
pebblepebblepebblepebble: mark a node
dropretrieve
� fixed number for automaton� can be distinguished & reused� used to determine where to go
PBBL ⊆ REG
� nested lifetimesnested lifetimesnested lifetimesnested lifetimes ‘stack discipline’
‘regular’ extension
1111
2222
3333
2222
for trees
![Page 21: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/21.jpg)
beware of the pebble
a a a b b b
1111
2222
3333
2222
1111 2222
avoid counting
a a a b b b
1111 2222
a a a b b b
1111 2222
a a a b b b a a a b b b a a a b b b
a a a b b b
1111 2222
a a a b b b
1111 2222
a a a b b b
1111 2222
► nest!
► bounded number!
1111 2222 1111 22221111 2222
general: LOGSPACE
![Page 22: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/22.jpg)
power of tree walking automata
WALK ⊆ REG
WALK ⊂⊂⊂⊂ REG
Bojańczyk & Colcombet STOC’05
(≡TILE)
“tree walking automata easily loose their way”(even with the help of pebbles)
PBBL ⊆ REG
PBBL ⊂⊂⊂⊂ REG
Bojańczyk, Samuelides,
Schwentick & Segoufin ICALP'06
Engelfriet & H ‘99
![Page 23: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/23.jpg)
nested pebbles on strings
single pebblekeep track of excursions
p
similar techniques in trees
PBBL = WALK = TILEfor strings
![Page 24: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/24.jpg)
single pebble on pictures
equal- �∈ TILE
unequal- ∈ TILE
(un)equal- ∈ 1PBBL
(cf. Nakamura, ‘one-pebble rectangular array acceptors’, IPL, 1981)
X y
![Page 25: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/25.jpg)
CONNECTIONS TO LOGIC
![Page 26: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/26.jpg)
labelled graphs
a
1
2
2
3
3
1 1 1
1 1 1
1 1 1
2 2 2 2
2 2 2 2
edges:locally injective
1 1 1
2 2 2 2
picture=grid, torus
locally injective
ffff
k1 2
trees
![Page 27: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/27.jpg)
mso logic
x,y node variablesX,Y node sets
laba(x)edgi(x,y)x ≤ y (partial order)
i
x y
ax
x = yx ∈ X
¬ ∧∧∧∧ ∨∨∨∨ connectives ∀∀∀∀x ∃∃∃∃x quantification (nodes)∀∀∀∀X ∃∃∃∃X (sets)
FO first orderEMSO existential mso
![Page 28: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/28.jpg)
example (strings)
next a
no position in between has a
number of a’s is even
there exists a set X that contains
every other position with aevery other position with a
b a a b a b b a a b b a
![Page 29: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/29.jpg)
classic
closed formula a language
for strings, treesMSO = REG (aka TILE)
for picturesEMSO = REC (aka TILE)
![Page 30: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/30.jpg)
graph acceptors
(Thomas: Logics, tilings and automata, ICALP 1991)
• labelling of nodes with states
• look at subgraphs of certain diameter
• distinguish types
• acceptance: boolean combination of ‘type α occurs ≤ k times’
► generalization of TILEcorresponds to EMSO
diameter and counting can be avoided in special cases
FO
![Page 31: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/31.jpg)
tiling necklaces
baa
a
a
a
a a
‘has label b’ ∉ TILE
aa
graph acceptors can force ‘b’-tile
![Page 32: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/32.jpg)
(1) logic to nested pebbles
free variables ~fixed pebbles
laba(x)edgi(x,y)
x x x x ≤≤≤≤ yyyyx = y
¬ ∧∧∧∧ ∨∨∨∨
ϕ → A
FO+dTC ⊆⊆⊆⊆ dPBBL
x
y
x x x x ≤≤≤≤ yyyy
x
∀∀∀∀x x x x ϕϕϕϕ(x)(x)(x)(x)
¬ ∧∧∧∧ ∨∨∨∨
∀∀∀∀xxxx ∃∃∃∃x
ϕ*(x,y)
Aϕ
![Page 33: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/33.jpg)
transitive closure
∨∨∨∨
∧∧∧∧
∨∨∨∨
∧∧∧∧
∧∧∧∧
∨∨∨∨
T∨∨∨∨
∧∧∧∧
21
21
21
21
21
21v
uv’
ϕ(x,y)
ϕ*(u,v) tc
TF TF
T∧∧∧∧F ∧∧∧∧
FT
2121 21
vu
v’
deterministic tc: ϕ functional
ϕ(u,v,z)
![Page 34: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/34.jpg)
(2) nested pebbles to logic
laba(u) ∧∧∧∧ (∃u’)edg2(u’,u) ∧∧∧∧ u ≠≠≠≠ x3 ∧∧∧∧ edg1(u,v)
iiii single move ϕpq(u,v)
aaaa
2
1uuuu
vvvvfree variables for pebbles
dPBBL ⊆⊆⊆⊆ FO+dTC
p
q
3( not here )
iiiiiiii computation ~ tc with states
ϕpq(x,y)
p1 p2 p3 p4 p5 p6 p7
#
Kleene: removing states finite aut to reg expr
iiiiiiiiiiii dropping pebbles ~ tc (inductively)
![Page 35: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/35.jpg)
logic vs. automata
TILE = EMSO
PBBL = FO+TC
for general graph-like structures
PBBL = FO+TC
(almost)
![Page 36: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/36.jpg)
use a guide
FO+dTC = dPBBLFO+posTC = PBBL
for families of searchablesearchablesearchablesearchable graphswith a ‘guide’
guide: deterministicwith pebbles
visits each node (at least) once& halts
unranked trees, grids, toruses, …
(∀x) lab0(x)
2 pebbles
![Page 37: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/37.jpg)
walking the torus
1 1 1
1 1 1
2 2 2 2
1
1fixed
1 1 1
1 1 1
2 2 2 2
2 2 2 2
1
1
2 2 2 2
two pebbles(nested)
![Page 38: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/38.jpg)
mazes / labyrinths
![Page 39: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/39.jpg)
mazes
counter, ortwo heads, ortwo pebbles
(Blum & Kozen ‘power of the compass’)
two pebbles(not nested)
xxxxxxxx
(Budach)
single pebble not ok
![Page 40: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/40.jpg)
conclusion
‘invisible’ pebbles obtain all REG trees(distributed stack)
nested pebbles and … pictures 1PBBL � TILE… pictures 1PBBL � TILE
… mazes… traces / dependence graphs… texts (two orders on string)
strong / weak pebbles
![Page 41: Tilingand Walking - uni-giessen.de](https://reader034.fdocuments.us/reader034/viewer/2022042109/625725cee74d6b48f112b5ea/html5/thumbnails/41.jpg)
thank you 9 ‘tossing Pebbles’‘tossing Pebbles’‘tossing Pebbles’‘tossing Pebbles’
thank you 9
Joost Engelfriet
Hendrik Jan HoogeboomLeiden NL