[email protected] [email protected] · Violetta Lonati1,Matteo Pradella2 [email protected],...
Transcript of [email protected] [email protected] · Violetta Lonati1,Matteo Pradella2 [email protected],...
![Page 1: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/1.jpg)
Picture Recognizability with Automata Based on Wang Tiles
Violetta Lonati1, Matteo Pradella2
[email protected],[email protected]
(1) DSI, Universita degli studi di Milano(2) IEIIT, Consiglio Nazionale delle Ricerche
SOFSEM 2010.01.25 (Spindleruv Mlyn, Czech Rep.)
![Page 2: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/2.jpg)
Outline
• Picture languages and class REC
• Wang Systems + example
• Determinism and scanning strategies
• Wang automata + example
• Properties, new results and open problems
2
![Page 3: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/3.jpg)
Picture languages: class REC
• Seminal work on 2D languages:Dora Giammarresi and Antonio Restivo. Two-dimensional languages. Hand-book of Formal Languages, volume 3, Beyond Words, pages 215-267, 1997.
• Strings are 2D arrays of symbols, called pictures.
• REC is proposed by the authors as a 2D analogous of Regular languages -Tiling Systems, Online Tessellation Cellular Automata, Wang Systems are allequivalent formalisms.
3
![Page 4: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/4.jpg)
Pictures
An example of bordered picture (conventionally, # marks borders)
p =
# # # # # # # # ## 1 0 0 0 0 0 1 ## 0 1 0 0 0 0 1 ## 0 0 1 0 0 0 1 ## 0 0 0 1 0 0 1 ## 0 0 0 0 1 0 1 ## 0 0 0 0 0 1 1 ## # # # # # # # #
Notation: the red pixel is at position (4, 2), i.e. p(4, 2) = 0.The size of p is |p| = (6, 7) (i.e. # of rows, columns).
4
![Page 5: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/5.jpg)
Wang Systems (WS): a simple formalization of jigsaw puzzles
Introduced by de Prophetis, Varricchio (1997).
Every labeled Wang tile bears a central symbol (its label), and has four “colored”edges. To “compose” tiles, you have to match edges.
E.g.
# ## a D D a #
A CA C
# b B B a ## #
represents the picturea ab a
Given a set of tiles Θ, a picture p ∈ L(Θ) if it is possible to take tiles from Θ and builda picture p′ having label p. (It is possible to take a tile more than once, if needed.)
5
![Page 6: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/6.jpg)
An example
Language Lhalf of pictures of size (n, 2n) with the first row like x x,where x is the reverse of x.
For example
p =
a b c c b ab b a c b ac a a b a a
6
![Page 7: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/7.jpg)
WS of the example: main idea
To generate this kind of pictures, the idea is using tiles to “propagate” the symbolsfound in the first row, to check their consistency in the lower part of the tiled picture.
For example, if we have a at the top left corner, we propagate this information below,
with the tiles:#
# a ·
A,
A# ? ·
A(? stands for “don’t care”).
Then, when we reach the border, we propagate A towards east withA
# ? A#
,
·
A ? A#
. Last, we go back north:A
A ? ##
,A
· ? #A
, and check#
· a #A
.
7
![Page 8: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/8.jpg)
Recognizing p with the WS
Hence, the information flows following nested “U-like” paths.
In the case of the example picture p, we obtain:
## a ·
A
#· b ·
B
#· c C·
#C c ·
·
#· b ·
B
#· a #
AA
# b ·
A
B· b B·
·
B a B·
·
B c B·
BB b ·
·
A· a #
AA
# c A#
·
A a A#
·
A a A#
·
A b A#
·
A a A#
AA a #
#
8
![Page 9: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/9.jpg)
Determinism and scanning
WSs are implicitly non-deterministic: REC is not closed under complement and pars-ing is NP-complete.
It is natural to introduce some kind of scanning strategy, to define the order in whichpixels of the picture are visited (and then determinism)
The classical approach is the one used in Online Tessellation Automata, introducedby Inoue, Nakamura (’77) and recently generalized and studied by Anselmo, Gi-ammarresi, Madonia: Diagonal determinism
In this case, pictures are visited starting from a corner, and considering diagonals (or
counter-diagonals), e.g. following this order:1 2 4 73 5 8 106 9 11 12
9
![Page 10: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/10.jpg)
Determinism and scanning: approaches in the literature
Recent approaches are the following:
• Tiling automata by Anselmo, Giammarresi, Madonia (CIAA 2007)
• Sudoku determinism by Borchert, Reinhardt (LATA 2007)
• Quilted snake tilings by Brijder, Hoogeboom (TCS 2009)
10
![Page 11: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/11.jpg)
Scanning strategies
We consider here various kinds of strategies. The main properties that we requireare
• continuity: the next considered position must be adjacent to the previous one
• one-pass: each position is considered exactly once
• blind: it cannot “see” pixels, but can only “feel” borders and already consideredpositions
We will call polite any such kind of strategy.11
![Page 12: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/12.jpg)
Examples of polite strategies
Snake:1
12
![Page 13: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/13.jpg)
Examples of polite strategies
Snake:1 2
![Page 14: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/14.jpg)
Examples of polite strategies
Snake:1 2 3
![Page 15: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/15.jpg)
Examples of polite strategies
Snake:1 2 3 4
![Page 16: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/16.jpg)
Examples of polite strategies
Snake:1 2 3 4
5
![Page 17: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/17.jpg)
Examples of polite strategies
Snake:1 2 3 4
6 5
![Page 18: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/18.jpg)
Examples of polite strategies
Snake:1 2 3 4
7 6 5
![Page 19: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/19.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 5
![Page 20: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/20.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59
![Page 21: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/21.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59 10
![Page 22: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/22.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59 10 11
![Page 23: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/23.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59 10 11 12
![Page 24: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/24.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59 10 11 12
Spiral:1 2 3 410 11 12 59 8 7 6
![Page 25: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/25.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59 10 11 12
Spiral:1 2 3 410 11 12 59 8 7 6
U-like:1 12 9 82 11 10 73 4 5 6
![Page 26: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/26.jpg)
Examples of polite strategies
Snake:1 2 3 48 7 6 59 10 11 12
Spiral:1 2 3 410 11 12 59 8 7 6
U-like:1 12 9 82 11 10 73 4 5 6
L-like:1 2 3 410 9 8 511 12 7 6
We have recently proved that all possible polite strategies can be described in termsof these ones (submitted).
![Page 27: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/27.jpg)
Wang automata (WA)
Wang automata are finite-state devices that follow some polite scanning strategy, tovisit the input picture.
During the visit of each pixel, WAs try to “color” the edges of the position, thus ob-taining an analogous of a labeled Wang tile.
The direction of movement of the head is given by the scanning strategy.
In a sense, colors and directions define the states of the automaton.
If the “coloring” is unique, then the automaton is deterministic (DWA).
13
![Page 28: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/28.jpg)
An example run of a DWA with Lhalf
We consider picture p of the previous example, and a “U-like” polite strategy.
↓ ## a ⊥
⊥
→ #⊥ b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ ⊥
# b ⊥
⊥
↑ ⊥
⊥ b ⊥
⊥
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ ⊥
# c ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
14
![Page 29: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/29.jpg)
An example run of a DWA with Lhalf
Arrows represent next-position movements of the strategy:
↓ ## a ⊥
⊥
→ #⊥ b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ ⊥
# b ⊥
⊥
↑ ⊥
⊥ b ⊥
⊥
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ ⊥
# c ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 30: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/30.jpg)
An example run of a DWA with Lhalf
The data structure starts like this (red marks the head position):
↓ ## a ⊥
⊥
→ #⊥ b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ ⊥
# b ⊥
⊥
↑ ⊥
⊥ b ⊥
⊥
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ ⊥
# c ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 31: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/31.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ⊥
⊥
↑ ⊥
⊥ b ⊥
⊥
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ ⊥
# c ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 32: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/32.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
⊥
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ A# c ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 33: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/33.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
⊥
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ A# c A
#
→ ⊥
A a ⊥
#
→ ⊥
⊥ a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 34: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/34.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
⊥
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ A# c A
#
→ ·
A a A#
→ ⊥
A a ⊥
#
→ ⊥
⊥ b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 35: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/35.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
⊥
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ⊥
A b ⊥
#
→ ⊥
⊥ a ⊥
#
↑ ⊥
⊥ a ##
![Page 36: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/36.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
·
← ⊥
⊥ b ⊥
⊥
↑ ⊥
⊥ a #⊥
→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ⊥
A a ⊥
#
↑ ⊥
⊥ a ##
![Page 37: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/37.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
·
← ⊥
⊥ b ⊥
·
↑ ⊥
⊥ a #⊥
→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ ⊥
A a ##
![Page 38: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/38.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #⊥
↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
·
← ⊥
⊥ b ⊥
·
↑ ⊥
⊥ a #A
→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 39: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/39.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ⊥
⊥
← #⊥ a #
A↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
·
← ⊥
⊥ b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
The symbol found under the head is compatible, so we continue...
![Page 40: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/40.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ⊥
⊥
↓ #⊥ b ·
⊥
← #· a #
A↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
·
← ⊥
⊥ b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 41: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/41.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ·
⊥
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c ⊥
·
← B⊥ b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 42: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/42.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ·
⊥
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a ⊥
·
← ⊥
⊥ c B·
← BB b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 43: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/43.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
⊥
→ #⊥ c ·
·
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ ⊥
· b ⊥
·
← ⊥
⊥ a B·
← ·
B c B·
← BB b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 44: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/44.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
⊥
→ #⊥ c ⊥
·
→ #⊥ c ·
·
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ ⊥
· b B·
← ·
B a B·
← ·
B c B·
← BB b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 45: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/45.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ⊥
B
→ #⊥ c ⊥
·
→ #⊥ c ·
·
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ B· b B·
← ·
B a B·
← ·
B c B·
← BB b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
Again, the found symbol is compatible...
![Page 46: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/46.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ·
B
→ #· c ⊥
·
→ #⊥ c ·
·
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ B· b B·
← ·
B a B·
← ·
B c B·
← BB b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
![Page 47: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/47.jpg)
An example run of a DWA with Lhalf
↓ ## a ·
A
→ #· b ·
B
→ #· c C·
→ #C c ·
·
↓ #· b ·
B
← #· a #
A↓ A# b ·
A
↑ B· b B·
← ·
B a B·
← ·
B c B·
← BB b ·
·
↑ A· a #
A→ A# c A
#
→ ·
A a A#
→ ·
A a A#
→ ·
A b A#
→ ·
A a A#
↑ AA a #
#
so we accept.
![Page 48: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/48.jpg)
Main properties
For every polite scanning strategy µ, we have:
• L(µ-WA) = REC
• L(µ-DWA) is a Boolean sub-class of REC
15
![Page 49: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/49.jpg)
Properties of L(µ-DWA)
• L(Snake-DWA) = top-to-bottom unambiguous REC of Anselmo et al.
• L(Spiral-DWA) is closed under rotation
• L(Spiral-DWA) and L(Snake-DWA) are incomparable (submitted)
16
![Page 50: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/50.jpg)
Scan-DREC
We call Scan-DREC the union of classes L(µ-DWA) over all polite strategies µ.
• Scan-DREC is closed under complement and rotation
• Diagonal Deterministic REC ⊂ Scan-DREC ⊂ REC
17
![Page 51: lonati@dsi.unimi.it pradella@elet.polimi · Violetta Lonati1,Matteo Pradella2 lonati@dsi.unimi.it, pradella@elet.polimi.it (1) DSI, Universita degli studi di Milano` (2) IEIIT, Consiglio](https://reader036.fdocuments.net/reader036/viewer/2022062605/5fd8819eff02d46f244a4e6e/html5/thumbnails/51.jpg)
Open problems
Is Scan-DREC closed under union or intersection?
Is Scan-DREC properly contained in unambiguous REC?
Which are the relations among the various L(µ-DWA)?
Which is the relation between Scan-DREC and the class of languages recognizedby deterministic 4-way automata?
18