Five Lectures on CA 3. Synchronization Thomas Worsch Department of - - PowerPoint PPT Presentation

five lectures on ca 3 synchronization
SMART_READER_LITE
LIVE PREVIEW

Five Lectures on CA 3. Synchronization Thomas Worsch Department of - - PowerPoint PPT Presentation

Five Lectures on CA 3. Synchronization Thomas Worsch Department of Informatics Karlsruhe Institute of Technology http://liinwww.ira.uka.de/~thw/vl-hiroshima/ at Hiroshima University, January 2012 Outline Classical Firing Squad


slide-1
SLIDE 1

Five Lectures on CA

  • 3. Synchronization

Thomas Worsch

Department of Informatics Karlsruhe Institute of Technology http://liinwww.ira.uka.de/~thw/vl-hiroshima/

at Hiroshima University, January 2012

slide-2
SLIDE 2

Outline

Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook

slide-3
SLIDE 3

Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook

slide-4
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
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
SLIDE 6

Algorithm (Balzer)

slide-7
SLIDE 7

Algorithm (Balzer)

( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> > ( 2> > ( 3> > ( 1> < ) ( 2> < ) ( 3> < ) ( 1> < ) ( 2> < ) ( < <1 ) ( 1> > )

slide-8
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
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
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
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
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
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 14
✂ ✄ ☎ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✞ ✞ ✞ ✞ ✞ ✞ ✟
☎✡✠ ✁ ☎✡✠
☎☛✠ ✄ ✁ ☎☛✠ ✂
slide-15
SLIDE 15
✂ ✄ ☎ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✞ ✞ ✞ ✞ ✞ ✞ ✟
☎✡✠ ✁ ☎✡✠
☎☛✠ ✄ ✁ ☎☛✠ ✂
slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18
✂ ✄ ☎ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✞ ✞ ✞ ✞ ✞ ✞
✂ ✄ ☎ ✁ ☎ ✟
☎ ✟ ✁ ☎ ✟
☎ ✟ ✄ ✁ ☎ ✟ ✂ ✆ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✝ ✞ ✝ ✝ ✝ ✝ ✝ ✝
slide-19
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
SLIDE 20

Algorithm (Gerken)

slide-21
SLIDE 21

Algorithm (Gerken)

slide-22
SLIDE 22

Algorithm (Gerken)

slide-23
SLIDE 23

Algorithm (Gerken)

slide-24
SLIDE 24

Algorithm (Gerken)

slide-25
SLIDE 25

Algorithm (Gerken)

slide-26
SLIDE 26

Algorithm (Gerken)

slide-27
SLIDE 27

Algorithm (Gerken)

slide-28
SLIDE 28

Algorithm (Gerken)

slide-29
SLIDE 29

Algorithm (Gerken)

slide-30
SLIDE 30

Algorithm (Mazoyer)

7 states are sufficient for that!

slide-31
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
SLIDE 32

Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook

slide-33
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
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
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-36
SLIDE 36

Algorithm

slide-37
SLIDE 37

Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook

slide-38
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
SLIDE 39

Simple (slow) algorithm

slide-40
SLIDE 40

Simple (slow) algorithm

◮ synchronize the first row ◮ instead of firing, create “row-generals” ◮ time: 2m − 2 + 2n − 2 steps

slide-41
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
SLIDE 42

Algorithm (optimum time)

slide-43
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
SLIDE 44

Classical Firing Squad Synchronization Problem General at an arbitrary position Two-dimensional FSSP Outlook

slide-45
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
SLIDE 46

Summary

◮ The one-dimensional FSSP can be solved

in time 2n − 2 − k (where k is . . . )

◮ This matches a lower bound exactly.