SLIDE 1 Five Lectures on CA
Thomas Worsch
Department of Informatics Karlsruhe Institute of Technology http://liinwww.ira.uka.de/~thw/vl-hiroshima/
at Hiroshima University, January 2012
SLIDE 2
Outline
Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook
SLIDE 3
Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook
SLIDE 4 FSSP (Firing Squad Synchronisation Problem)
◮ Fixed: R = Z, N = {−1, 0, 1}, and Q′ = {#, g, s, f}
◮ # is the border state ◮ g is the general state ◮ s is the soldier state ◮ f is the firing state
◮ Wanted: CA with Q ⊇ Q′ and some f , such that
◮ for all local configurations ℓ:
if ℓ(0) = # then f (ℓ) = #
◮ for all local configurations ℓ:
if ∀n ∈ N : ℓ(n) ∈ {#, s} then f (ℓ) = ℓ(0)
◮ C transforms each global start configuration #gss · · · s#
in a finite number of steps into the firing configuration #fff · · · f# having the same support
◮ such that in no configuration occuring before the firing
configuration state f appears anywhere.
SLIDE 5
FSSP (2)
please note:
◮ activities can only start at the general g and spread
throughout the grid cell by cell
◮ no matter how large the support of the initial configuration is,
it should always be the same Q and the same f
◮ the CA should work for arbitrarily large numbers of s cells
How could one try to achieve that?
SLIDE 6
Algorithm (Balzer)
SLIDE 7 Algorithm (Balzer)
( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> < ) ( 2> < ) ( 3> < ) ( 1> < ) ( 2> < ) ( < <1 ) ( 1> > )
SLIDE 8 Algorithm (Balzer)
( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> < ) ( 2> < ) ( 3> < ) ( 1> < ) ( 2> < ) ( < <1 ) ( 1> > ) ( < <2 ) ( 2> > ) ( < <3 ) ( 3> > ) ( < <1 ) ( 1> > ) ( > <2 ) ( 2> < ) ( > <3 ) ( 3> < ) ( <<1)(1>> ) ( <<1)(1>> )
SLIDE 9 Algorithm (Balzer)
( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> < ) ( 2> < ) ( 3> < ) ( 1> < ) ( 2> < ) ( < <1 ) ( 1> > ) ( < <2 ) ( 2> > ) ( < <3 ) ( 3> > ) ( < <1 ) ( 1> > ) ( > <2 ) ( 2> < ) ( > <3 ) ( 3> < ) ( <<1)(1>> ) ( <<1)(1>> ) ( < <2)(2> > ) ( < <2)(2> > ) ( > <3)(3> < ) ( > <3)(3> < ) ( <<1)(1>> )( <<1)(1>> ) ( <<1)(1>> )( <<1)(1>> )
SLIDE 10 Algorithm (Balzer)
( 1> > s s s s s s s s s ( 2> > s s s s s s s s ( 3> > s s s s s s s ( 1> > s s s s s s ( 2> > s s s s s ( 3> > s s s s ( 1> > s s s ( 2> > s s ( 3> > s ( 1> < ) ( 2> < ) ( 3> < ) ( 1> < ) ( 2> < ) ( < <1 ) ( 1> > ) ( < <2 ) ( 2> > ) ( < <3 ) ( 3> > ) ( < <1 ) ( 1> > ) ( > <2 ) ( 2> < ) ( > <3 ) ( 3> < ) ( <<1)(1>> ) ( <<1)(1>> ) ( < <2)(2> > ) ( < <2)(2> > ) ( > <3)(3> < ) ( > <3)(3> < ) ( <<1)(1>> )( <<1)(1>> ) ( <<1)(1>> )( <<1)(1>> ) f f f f f f f f f f
SLIDE 11
Running time (of Balzer’s algorithm)
for the synchronisation of n cells approximately t(n) ≈ 3 2n + t(n 2) which results in t(n) ≈ 3n + lower order terms Is that optimal? Or can you do faster?
SLIDE 12
Theorem
◮ Goto (1962):
There is a CA solving the FSSP for all n ≥ 2 in time 2n − 2.
◮ Mazoyer (1987):
There is such a CA which only uses 7 states. (i.e. only 3 more besides #, g, s, f) we will see fast algorithms later
Theorem
Waksman (1966): There is no CA which solves the FSSP for all n and needs only 2n − 3 steps for one n ≥ 2.
SLIDE 13
Proof of Waksman’s theorem
indirect proof
◮ given: a CA C solving the FSSP ◮ assumption:
There is a k for which the C needs at most 2k − 3 steps.
◮ will show: C does not solve the FSSP for all n
SLIDE 14
✂ ✄ ☎ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✞ ✞ ✞ ✞ ✞ ✞ ✟
☎✡✠ ✁ ☎✡✠
☎☛✠ ✄ ✁ ☎☛✠ ✂
SLIDE 15
✂ ✄ ☎ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✞ ✞ ✞ ✞ ✞ ✞ ✟
☎✡✠ ✁ ☎✡✠
☎☛✠ ✄ ✁ ☎☛✠ ✂
SLIDE 16
SLIDE 17
SLIDE 18
✂ ✄ ☎ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✞ ✞ ✞ ✞ ✞ ✞
✂ ✄ ☎ ✁ ☎ ✟
☎ ✟ ✁ ☎ ✟
☎ ✟ ✄ ✁ ☎ ✟ ✂ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✝ ✝ ✝ ✝ ✝ ✝
SLIDE 19 1 2 3 4 k g s s s s s s s s s s s s s s s s s s s s s f f f f f f f 1 2 3 4 k 2k − 1 1 2 k − 2 k − 1 2k − 4 2k − 3 g s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s f s s s s s s
Wrong!
SLIDE 20
Algorithm (Gerken)
SLIDE 21
Algorithm (Gerken)
SLIDE 22
Algorithm (Gerken)
SLIDE 23
Algorithm (Gerken)
SLIDE 24
Algorithm (Gerken)
SLIDE 25
Algorithm (Gerken)
SLIDE 26
Algorithm (Gerken)
SLIDE 27
Algorithm (Gerken)
SLIDE 28
Algorithm (Gerken)
SLIDE 29
Algorithm (Gerken)
SLIDE 30
Algorithm (Mazoyer)
7 states are sufficient for that!
SLIDE 31 Algorithm (infinitely many signals with different speeds)
> <> 1 <> 1 <0 <> 1 < <> 1 1 < <> 1 1 <0 < <> 1 <0 < < <> 1 1 < < <> 1 1 <0 < < <> 1 < < < < <> 1 1 1 < < < <> 1 1 1 <0 < < < 1 1 < < < < < 1 1 <0 1 < < < 1 <0 1 <0 < < < 1 < < < < 1 < 1 < < < 1 1 1 <0 < < 1 1 < < < < 1 1 < 1 < < 1 1 <0 1 <0 < < 1 < < < < 1 1 < 1 < < 1 1 < 1 <0 < 1 1 1 < < < 1 1 1 < 1 < 1 1 1 < 1 <0 < 1 1 1 <0 < < 1 1 < < 1 < 1 1 <0 < 1 <0 1 <0 < < < 1 1 < 1 1 1 < 1 <0 1 1 < < 1 1 <0 < 1
SLIDE 32
Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook
SLIDE 33 Problem
◮ Fixed: R = Z, N = {−1, 0, 1}, and Q′ = {#, g, s, f} ◮ Wanted: CA with Q ⊇ Q′ and some f , such that
◮ for all local configurations ℓ:
if ℓ(0) = # then f (ℓ) = #
◮ for all local configurations ℓ:
if ∀n ∈ N : ℓ(n) ∈ {#, s} then f (ℓ) = ℓ(0)
◮ C transforms each global start configuration #ss · · · sgs · · · s#
in a finite number of steps into the firing configuration #fff · · · f# having the same support
◮ such that in no configuration occuring before the firing
configuration state f appears anywhere.
SLIDE 34
Theorem
Each configuration to be fired has the form #sagsb# for some a, b ∈ N0. Let k = min{a, b} and n = a + 1 + b.
◮ The FSSP with a General at an arbitrary position can be
solved in 2n − 2 − k = a + b + max{a, b} steps.
◮ For n ≥ 2 this time is optimum.
SLIDE 35
Proof
◮ upper bound: algorithm; see later ◮ lower bound: analogously to the proof by Waksman:
Each end must “know”, how far the other end is away. Therefore time 2(n − k) − 2 in general is not enough.
SLIDE 37
Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook
SLIDE 38 FSSP for rectangles
◮ analogously to the one-dimensional case ◮ as neighborhood use
N = {(0, 1), (−1, 0), (0, 0), (1, 0), (0, −1)}
◮ initial configurations:
rectangles of s-cells with a g-cell in the upper left corner
SLIDE 39
Simple (slow) algorithm
SLIDE 40
Simple (slow) algorithm
◮ synchronize the first row ◮ instead of firing, create “row-generals” ◮ time: 2m − 2 + 2n − 2 steps
SLIDE 41 Simple (slow) algorithm
◮ synchronize the first row ◮ instead of firing, create “row-generals” ◮ time: 2m − 2 + 2n − 2 steps ◮ a faster algorithm?
◮ each border cell must “know” the “size” of the rectangle ◮ lower bound is m + n + max{m, n} − 3 steps ◮ this is enough for synchronization (see next slide)
SLIDE 42
Algorithm (optimum time)
SLIDE 43 Algorithm (optimum time)
◮ synchronize each L-shaped part using
the one-dimensional algorithm (general at arbitrary position)
◮ initialize the corners as generals
- ne after the other every 3 steps
◮ time: m + n + max{m, n} − 3 steps
SLIDE 44
Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook
SLIDE 45
More generalizations
◮ d-dimensional “rectangles” with the general at an arbitrary
position (Szwerinski, 1982)
◮ arbitrary d-dimensional connected pattern ◮ several generals (Schmid, 2003) ◮ Early-Bird-Problem (Rosenstiehl, Katona/Legendi, Vollmar)
SLIDE 46
Summary
◮ The one-dimensional FSSP can be solved
in time 2n − 2 − k (where k is . . . )
◮ This matches a lower bound exactly.