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
Simple Signals Markings
SLIDE 3
Simple Signals Markings
SLIDE 4
Example: signal with speed 1
Q = { , > }
3 4 5 6 7 t = 10 > t = 11 > t = 12 > t = 13 > t = 14 > empty places: quiescent state
SLIDE 5 Example: signal with speed 1
Q = { , > }
3 4 5 6 7 t = 10 > t = 11 > t = 12 > t = 13 > t = 14 > empty places: quiescent state
ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > >
SLIDE 6 Example: signal with speed 1
Q = { , > }
3 4 5 6 7 t = 10 > t = 11 > t = 12 > t = 13 > t = 14 > empty places: quiescent state
ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > >
a signal s : {10, 11, 12, 13, 14} → R
SLIDE 7 Example: signal with speed 1
Q = { , > }
3 4 5 6 7 t = 10 > t = 11 > t = 12 > t = 13 > t = 14 > empty places: quiescent state
ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > >
a signal s : {10, 11, 12, 13, 14} → R speed: 1 cell / 1 step = 1
SLIDE 8
Example: signal gets reflected
Q = { , > , | , < }
t = 0 > | t = 1 > | t = 2 > | t = 3 < | t = 4 < | t = 5 < |
SLIDE 9 Example: signal gets reflected
Q = { , > , | , < }
t = 0 > | t = 1 > | t = 2 > | t = 3 < | t = 4 < | t = 5 < | ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > > > | < < | < < <
SLIDE 10 Example: signal gets reflected
Q = { , > , | , < }
t = 0 > | t = 1 > | t = 2 > | t = 3 < | t = 4 < | t = 5 < | ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > > > | < < | < < <
SLIDE 11
Example: another type of reflection
Q = { , > , | , <| , < }
t = 0 > | t = 1 > | t = 2 > | t = 3 > | t = 4 <| t = 5 < | t = 6 < |
SLIDE 12 Example: another type of reflection
Q = { , > , | , <| , < }
t = 0 > | t = 1 > | t = 2 > | t = 3 > | t = 4 <| t = 5 < | t = 6 < | ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > > > | > > | <| <| | <| < < < <
SLIDE 13
Example: yet another type of reflection
Q = { , > , | , >| , <| , < }
t = 0 > | t = 1 > | t = 2 > | t = 3 > | t = 4 >| t = 5 <| t = 6 < | t = 7 < |
SLIDE 14
Definition
A signal is
◮ a function s : T → R
where
◮ T = {a, . . . , b} or ◮ T = {a, . . .}
is a (finite of infinite) set of points in time.
SLIDE 15
Example: signals with constant speed
t = 0 1> t = 1 2> t = 2 3> t = 3 4> t = 4 5> t = 5 1> t = 6 2> t = 7 3> t = 8 4> t = 9 5>
SLIDE 16 Example: signals with constant speed
t = 0 1> t = 1 2> t = 2 3> t = 3 4> t = 4 5> t = 5 1> t = 6 2> t = 7 3> t = 8 4> t = 9 5> ℓ(−1) ℓ(0) ℓ(1) f (ℓ) 1> 2> 2> 3> 3> 3> 4> 4> 5> 5> 5> 1>
. . . whatever is useful . . .
SLIDE 17 Example: signals with constant speed
t = 0 1> t = 1 2> t = 2 3> t = 3 4> t = 4 5> t = 5 1> t = 6 2> t = 7 3> t = 8 4> t = 9 5> ℓ(−1) ℓ(0) ℓ(1) f (ℓ) 1> 2> 2> 3> 3> 3> 4> 4> 5> 5> 5> 1>
. . . whatever is useful . . .
speed:
◮ above: 2/5 ◮ in general: average number of cells per time step
SLIDE 18
Which signal speeds are constructible?
SLIDE 19
Which signal speeds are constructible?
◮ depends on neighborhood N
SLIDE 20
Which signal speeds are constructible?
◮ depends on neighborhood N ◮ if N = {−1, 0, 1}
SLIDE 21 Which signal speeds are constructible?
◮ depends on neighborhood N ◮ if N = {−1, 0, 1}:
◮ any rational speed −1 ≤ r ≤ 1 ◮ negative r means move to the left
SLIDE 22 Which signal speeds are constructible?
◮ depends on neighborhood N ◮ if N = {−1, 0, 1}:
◮ any rational speed −1 ≤ r ≤ 1 ◮ negative r means move to the left ◮ no speed > 1
SLIDE 23 Which signal speeds are constructible?
◮ depends on neighborhood N ◮ if N = {−1, 0, 1}:
◮ any rational speed −1 ≤ r ≤ 1 ◮ negative r means move to the left ◮ no speed > 1 ◮ more difficult (Korec, 1993):
some signals with “irrational speed” are constructible
SLIDE 24 Algorithm: zigzag signals
in a continuous world it would look like this:
✆ ✝ ✆ ✞ ✆ ✟
SLIDE 25
vA = 1/2 t = 1 a t = 2 b t = 3 a t = 4 b t = 5 a t = 6 b t = 7 a t = 8 b t = 9 a t = 10 b t = 11 a t = 12 b t = 13 a t = 14 b t = 15 a t = 16 b t = 17 a t = 18 b t = 19 t = 20 t = 21 t = 22 t = 23
SLIDE 26
vA = 1/2 vB = 1/5 t = 1 1a t = 2 2b t = 3 3 a t = 4 4 b t = 5 5 a t = 6 1 b t = 7 2 a t = 8 3 b t = 9 4 a t = 10 5 b t = 11 1 a t = 12 2 b t = 13 3 a t = 14 4 b t = 15 5 a t = 16 1 b t = 17 2 a t = 18 3 b t = 19 4 t = 20 5 t = 21 1 t = 22 2 t = 23 3
SLIDE 27
vA = 1/2 vB = 1/5 vR = 1 vL = −1 t = 1 1a t = 2 2b t = 3 3> a t = 4 4 <b t = 5 5> a t = 6 1> b t = 7 2 > a t = 8 3 <b t = 9 4 < a t = 10 5> b t = 11 1> a t = 12 2 > b t = 13 3 > a t = 14 4 > b t = 15 5 > a t = 16 1 <b t = 17 2 < a t = 18 3 < b t = 19 4 < t = 20 5> t = 21 1> t = 22 2 > t = 23 3 >
SLIDE 28 Algorithm: discretized parabola
How can one construct this signal?
t = 0 | t = 1 | t = 2 | t = 3 | t = 4 | t = 5 | t = 6 | t = 7 | t = 8 | t = 9 | t = 10 | t = 11 | t = 12 | t = 13 | t = 14 | t = 15 | t = 16 | t = 17 | t = 18 | t = 19 | t = 20 | t = 21 | t = 22 | t = 23 | t = 24 | t = 25 |
SLIDE 29 Algorithm: discretized parabola
Hint:
t = 0 ( | t = 1 ( | t = 2 ( | t = 3 ( | t = 4 ( | t = 5 ( | t = 6 ( | t = 7 ( | t = 8 ( | t = 9 ( | t = 10 ( | t = 11 ( | t = 12 ( | t = 13 ( | t = 14 ( | t = 15 ( | t = 16 ( | t = 17 ( | t = 18 ( | t = 19 ( | t = 20 ( | t = 21 ( | t = 22 ( | t = 23 ( | t = 24 ( | t = 25 ( |
SLIDE 30 Algorithm: discretized parabola
1 2 3 4 5
t = 0 (<| t = 1 (>| t = 2 ( <| t = 3 (< | t = 4 (> | t = 5 ( >| t = 6 ( <| t = 7 ( < | t = 8 (< | t = 9 (> | t = 10 ( > | t = 11 ( >| t = 12 ( <| t = 13 ( < | t = 14 ( < | t = 15 (< | t = 16 (> | t = 17 ( > | t = 18 ( > | t = 19 ( >| t = 20 ( <| t = 21 ( < | t = 22 ( < | t = 23 ( < | t = 24 (< | t = 25 (> |
SLIDE 31
Simple Signals Markings
SLIDE 32 Algorithm: mark cell n/2
Task:
◮ in a segment of n cells
1 2 3 4 5 6 7 8 9 10 11 12 13
( )
◮ mark cell n/2
1 2 3 4 5 6 7 8 9 10 11 12 13
( * )
SLIDE 33 Algorithm: mark cell n/2
Task:
◮ in a segment of n cells
1 2 3 4 5 6 7 8 9 10 11 12 13
( )
◮ mark cell n/2
1 2 3 4 5 6 7 8 9 10 11 12 13
( * ) different possibilities; for example:
◮ 2 signals with speeds r < 1 and 1
starting at the left end
SLIDE 34 Algorithm: mark cell n/2
Task:
◮ in a segment of n cells
1 2 3 4 5 6 7 8 9 10 11 12 13
( )
◮ mark cell n/2
1 2 3 4 5 6 7 8 9 10 11 12 13
( * ) different possibilities; for example:
◮ 2 signals with speeds r < 1 and 1
starting at the left end
◮ reflect the faster signal at the right end ◮ signals meet in the middle
SLIDE 35 Algorithm: mark cell n/2
Task:
◮ in a segment of n cells
1 2 3 4 5 6 7 8 9 10 11 12 13
( )
◮ mark cell n/2
1 2 3 4 5 6 7 8 9 10 11 12 13
( * ) different possibilities; for example:
◮ 2 signals with speeds r < 1 and 1
starting at the left end
◮ reflect the faster signal at the right end ◮ signals meet in the middle if r = 1/3
SLIDE 36
Algorithm: marking cells with exponentially increasing distances
How could one achieve that?
SLIDE 37
1 2 4 8 t = 1 1a t = 2 2b t = 3 3> a t = 4 4 <b t = 5 5> a t = 6 1> b t = 7 2 > a t = 8 3 <b t = 9 4 < a t = 10 5> b t = 11 1> a t = 12 2 > b t = 13 3 > a t = 14 4 > b t = 15 5 > a t = 16 1 <b t = 17 2 < a t = 18 3 < b t = 19 4 < t = 20 5> t = 21 1> t = 22 2 > t = 23 3 >
SLIDE 38 zigzag signal: a computation
for points Pi = (xi, ti) in the space time diagram:
✆ ✝ ✆ ✞ ✆ ✟
t2vB = x1 + (t2 − t1)vL t2(vB − vL) = x1 − x1
vA vL
t2 = x1
vA−vL vA(vB−vL)
x2 = x1
vB(vA−vL) vA(vB−vL)
t3vA = x2 + (t3 − t2)vR t3(vA − vR) = x1
vB(vA−vL) vA(vB−vL) − x1 (vA−vL)vR vA(vB−vL)
t3 = x1
(vB−vR)(vA−vL) vA(vB−vL)(vA−vR)
x3 = x1
(vB−vR)(vA−vL) (vB−vL)(vA−vR)
SLIDE 39
zigzag signal: a computation
◮ x3 x1 = k is constant independent of x1. ◮ the quotient of subsequent distances
x5 − x3 x3 − x1 = kx3 − kx1 x3 − x1 = k is constant.
◮ distances are growing exponentially ◮ exercise: any rational k > 1 can be realized
SLIDE 40
Algorithm: mark quadratic points in time
use the parabola
SLIDE 41
t = 0 (<| t = 1 (>| t = 2 ( <| t = 3 (< | t = 4 (> | t = 5 ( >| t = 6 ( <| t = 7 ( < | t = 8 (< | t = 9 (> | t = 10 ( > | t = 11 ( >| t = 12 ( <| t = 13 ( < | t = 14 ( < | t = 15 (< | t = 16 (> | t = 17 ( > | t = 18 ( > | t = 19 ( >| t = 20 ( <| t = 21 ( < | t = 22 ( < | t = 23 ( < | t = 24 (< | t = 25 (> |
SLIDE 42
Algorithm: marking quadratic points in time
Why does it work?
SLIDE 43 Algorithm: marking quadratic points in time
Why does it work?
◮ proof by induction ◮ Claim: For all k ≥ 1:
◮ At time t = k2 the > signal leaves cell 1
SLIDE 44 Algorithm: marking quadratic points in time
Why does it work?
◮ proof by induction ◮ Claim: For all k ≥ 1:
◮ At time t = k2 the > signal leaves cell 1 ◮ and the right border | is in cell k
SLIDE 45 Algorithm: marking quadratic points in time
Why does it work?
◮ proof by induction ◮ Claim: For all k ≥ 1:
◮ At time t = k2 the > signal leaves cell 1 ◮ and the right border | is in cell k
◮ k = 1: by construction
SLIDE 46 Algorithm: marking quadratic points in time
Why does it work?
◮ proof by induction ◮ Claim: For all k ≥ 1:
◮ At time t = k2 the > signal leaves cell 1 ◮ and the right border | is in cell k
◮ k = 1: by construction ◮ k ❀ k + 1:
◮ induction hypothesis:
the claim holds for an arbitrary k
◮ induction step: ◮ after k − 1 steps the > reaches | ◮ in 1 step the >| moves one cell to the right
hence the | is in cell k + 1
◮ after k steps the < moves back to cell 1 ◮ in 1 step the < changes to >
SLIDE 47 Algorithm: marking quadratic points in time
Why does it work?
◮ proof by induction ◮ Claim: For all k ≥ 1:
◮ At time t = k2 the > signal leaves cell 1 ◮ and the right border | is in cell k
◮ k = 1: by construction ◮ k ❀ k + 1:
◮ induction hypothesis:
the claim holds for an arbitrary k
◮ induction step: ◮ after k − 1 steps the > reaches | ◮ in 1 step the >| moves one cell to the right
hence the | is in cell k + 1
◮ after k steps the < moves back to cell 1 ◮ in 1 step the < changes to > ◮ total time: k − 1 + 1 + k + 1 = 2k + 1
SLIDE 48 Algorithm: marking quadratic points in time
Why does it work?
◮ proof by induction ◮ Claim: For all k ≥ 1:
◮ At time t = k2 the > signal leaves cell 1 ◮ and the right border | is in cell k
◮ k = 1: by construction ◮ k ❀ k + 1:
◮ induction hypothesis:
the claim holds for an arbitrary k
◮ induction step: ◮ after k − 1 steps the > reaches | ◮ in 1 step the >| moves one cell to the right
hence the | is in cell k + 1
◮ after k steps the < moves back to cell 1 ◮ in 1 step the < changes to > ◮ total time: k − 1 + 1 + k + 1 = 2k + 1 ◮ hence next “departure” at t = k2 + 2k + 1 = (k + 1)2
SLIDE 49 Problem: marking cell √n
Task:
◮ in a segment of n cells
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
( )
◮ mark cell √n
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
( * )
SLIDE 50 Algorithm: marking cell √n
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(>| <) ( <| < ) (< | < ) (> | < ) ( >| < ) ( >| < ) ( < | < ) (< | < ) (> | < ) ( > | < ) ( >| < ) ( >| < ) ( * )
SLIDE 51 Algorithm: marking cell √n
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(>| <) ( <| < ) (< | < ) (> | < ) ( >| < ) ( >| < ) ( < | < ) (< | < ) (> | < ) ( > | < ) ( >| < ) ( >| < ) ( * )
Exercises:
◮ Prove that it works if the number of cells is a square n = k2. ◮ What happens if n is not a square number?
SLIDE 52 Summary
◮ signals with constant or decreasing speed ◮ can be used for markings of
◮ certain cells or/and ◮ certain points in time