Five Lectures on CA 1. Signals and Markings Thomas Worsch - - PowerPoint PPT Presentation

five lectures on ca 1 signals and markings
SMART_READER_LITE
LIVE PREVIEW

Five Lectures on CA 1. Signals and Markings Thomas Worsch - - PowerPoint PPT Presentation

Five Lectures on CA 1. Signals and Markings Thomas Worsch Department of Informatics Karlsruhe Institute of Technology http://liinwww.ira.uka.de/~thw/vl-hiroshima/ at Hiroshima University, January 2012 Outline Simple Signals Markings Simple


slide-1
SLIDE 1

Five Lectures on CA

  • 1. Signals and Markings

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

Simple Signals Markings

slide-3
SLIDE 3

Simple Signals Markings

slide-4
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
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 (ℓ) > > >

  • therwise f (ℓ) = ℓ(0)
slide-6
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 (ℓ) > > >

  • therwise f (ℓ) = ℓ(0)

a signal s : {10, 11, 12, 13, 14} → R

slide-7
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 (ℓ) > > >

  • therwise f (ℓ) = ℓ(0)

a signal s : {10, 11, 12, 13, 14} → R speed: 1 cell / 1 step = 1

slide-8
SLIDE 8

Example: signal gets reflected

Q = { , > , | , < }

t = 0 > | t = 1 > | t = 2 > | t = 3 < | t = 4 < | t = 5 < |

slide-9
SLIDE 9

Example: signal gets reflected

Q = { , > , | , < }

t = 0 > | t = 1 > | t = 2 > | t = 3 < | t = 4 < | t = 5 < | ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > > > | < < | < < <

  • therwise f (ℓ) = ℓ(0)
slide-10
SLIDE 10

Example: signal gets reflected

Q = { , > , | , < }

t = 0 > | t = 1 > | t = 2 > | t = 3 < | t = 4 < | t = 5 < | ℓ(−1) ℓ(0) ℓ(1) f (ℓ) > > > > | < < | < < <

  • therwise f (ℓ) = ℓ(0)
slide-11
SLIDE 11

Example: another type of reflection

Q = { , > , | , <| , < }

t = 0 > | t = 1 > | t = 2 > | t = 3 > | t = 4 <| t = 5 < | t = 6 < |

slide-12
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 (ℓ) > > > > | > > | <| <| | <| < < < <

  • therwise f (ℓ) = ℓ(0)
slide-13
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
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
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
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>

  • therwise

. . . whatever is useful . . .

slide-17
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>

  • therwise

. . . whatever is useful . . .

speed:

◮ above: 2/5 ◮ in general: average number of cells per time step

slide-18
SLIDE 18

Which signal speeds are constructible?

slide-19
SLIDE 19

Which signal speeds are constructible?

◮ depends on neighborhood N

slide-20
SLIDE 20

Which signal speeds are constructible?

◮ depends on neighborhood N ◮ if N = {−1, 0, 1}

slide-21
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
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
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
SLIDE 24

Algorithm: zigzag signals

in a continuous world it would look like this:

✆ ✝ ✆ ✞ ✆ ✟
slide-25
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
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
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
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
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
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
SLIDE 31

Simple Signals Markings

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

Algorithm: marking cells with exponentially increasing distances

How could one achieve that?

slide-37
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
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
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
SLIDE 40

Algorithm: mark quadratic points in time

use the parabola

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

Algorithm: marking quadratic points in time

Why does it work?

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

Summary

◮ signals with constant or decreasing speed ◮ can be used for markings of

◮ certain cells or/and ◮ certain points in time