• Keine Ergebnisse gefunden

The diamond lemma and its applications

N/A
N/A
Protected

Academic year: 2022

Aktie "The diamond lemma and its applications"

Copied!
246
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

The diamond lemma and its applications

Darij Grinberg

3 May 2018 // 20 May 2018 slides:

http://www.cip.ifi.lmu.de/~grinberg/algebra/

diamond-talk.pdf references:

Eriksson, Strong convergence and the polygon property of 1-player games.

MathOverflow answer #289320 (with list of references).

Bremner/Dotsenko, Algebraic Operads: An Algorithmic Companion.

1 / 54

(2)

1. Bubblesort

1.

Bubblesort

References:

Galashin/Grinberg/Liu, arXiv:1509.03803v2 ancillary file, Section 4.2.

(3)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Yes, it will terminate

since the number of inversions decreases at each move.

3 / 54

(4)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Yes, it will terminate

since the number of inversions decreases at each move.

(5)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Example: (we underline the two entries we are about to swap) 6,2,1

Alternatively, from the same starting position: 6,2,1

→ 6,1,2

→ 1,6,2

→(1,2,6). Looks good so far; what about other tuples?

Yes, it will terminate

since the number of inversions decreases at each move.

3 / 54

(6)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Example: (we underline the two entries we are about to swap) 6,2,1

→ 2,6,1

Alternatively, from the same starting position: 6,2,1

→ 6,1,2

→ 1,6,2

→(1,2,6). Looks good so far; what about other tuples?

Yes, it will terminate

since the number of inversions decreases at each move.

(7)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Example: (we underline the two entries we are about to swap) 6,2,1

→ 2,6,1

→ 2,1,6

Alternatively, from the same starting position: 6,2,1

→ 6,1,2

→ 1,6,2

→(1,2,6). Looks good so far; what about other tuples?

Yes, it will terminate

since the number of inversions decreases at each move.

3 / 54

(8)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Example: (we underline the two entries we are about to swap) 6,2,1

→ 2,6,1

→ 2,1,6

→(1,2,6). Alternatively, from the same starting position:

6,2,1

→ 6,1,2

→ 1,6,2

→(1,2,6).

Looks good so far; what about other tuples? Yes, it will terminate

since the number of inversions decreases at each move.

(9)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Example: (we underline the two entries we are about to swap) 6,2,1

→ 2,6,1

→ 2,1,6

→(1,2,6). Alternatively, from the same starting position:

6,2,1

→ 6,1,2

→ 1,6,2

→(1,2,6). Looks good so far; what about other tuples?

Yes, it will terminate

since the number of inversions decreases at each move.

3 / 54

(10)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Example: (we underline the two entries we are about to swap) 6,2,1

→ 2,6,1

→ 2,1,6

→(1,2,6). Alternatively, from the same starting position:

6,2,1

→ 6,1,2

→ 1,6,2

→(1,2,6). Looks good so far; what about other tuples?

Yes, it will terminate

since the number of inversions decreases at each move.

(11)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Yes, it will terminate

since the number of inversions decreases at each move.

3 / 54

(12)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Yes, it will terminate

since the number of inversions decreases at each move.

No, the final result doesn’t depend on the choice of moves, since ann-tuple has only one weakly increasing

permutation.

(13)

Bubblesort, the game

Consider the following 1-player game:

Start with a list (a1,a2, . . . ,an) ofn numbers.

Allowed move: Pick anyi ∈ {1,2, . . . ,n−1} such that ai >ai+1, and swapai with ai+1.

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

Yes, it will terminate

since the number of inversions decreases at each move.

No, the final result doesn’t depend on the choice of moves, since ann-tuple has only one weakly increasing

permutation.

This is a non-deterministic version of bubblesort (the simplest sorting algorithm ever).

3 / 54

(14)

Bubblesort, the game: partial order

Now what if a1,a2, . . . ,an aren’t numbers, but are elements of a poset instead?

Example:

δ

β γ

α Start with the list (δ, γ, β, α).

δ, γ, β, α

→ γ, δ, β, α

→ γ, δ, α, β

→ γ, α, δ, β

→ α, γ, δ, β

→(α, γ, β, δ).

We’ve got a linear extension of our poset, but is it still independent of the moves?

(15)

Bubblesort, the game: partial order

Now what if a1,a2, . . . ,an aren’t numbers, but are elements of a poset instead?

Example:

δ

β γ

α Start with the list (δ, γ, β, α).

δ, γ, β, α

→ γ, δ, β, α

→ γ, δ, α, β

→ γ, α, δ, β

→ α, γ, δ, β

→(α, γ, β, δ).

We’ve got a linear extension of our poset, but is it still independent of the moves?

4 / 54

(16)

Bubblesort, the game: partial order

Now what if a1,a2, . . . ,an aren’t numbers, but are elements of a poset instead?

Example:

δ

β γ

α Start with the list (δ, γ, β, α).

δ, γ, β, α

→ γ, δ, β, α

→ γ, δ, α, β

→ γ, α, δ, β

→ α, γ, δ, β

→(α, γ, β, δ).

We’ve got a linear extension of our poset, but is it still independent of the moves?

(17)

2. Chip-firing with a sink

2.

Chip-firing with a sink

References:

Holroyd/Levine/M´esz´aros/Peres/Propp/Wilson,Chip-Firing and Rotor-Routing on Directed Graphs.

Corry/Perkinson,Divisors and Sandpiles.

Bj¨orner/Lov´asz, Chip-firing games on directed graphs.

Spring 2017 Math 5707 homework set 5.

more links.

5 / 54

(18)

Chip-firing with a sink

Start with a digraph (= directed graph).

α //

β

ε

@@//γ //δ

^^

The chip-firing game is played as follows: Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

(19)

Chip-firing with a sink

Start with a digraph (= directed graph).

α //

β

ε

@@//γ //δ

^^

Choose a vertex s that isglobally reachable (i.e., for each vertex v, there is a path fromv to s). Call it thesink.

(Marked inblue above.)

The chip-firing game is played as follows: Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

6 / 54

(20)

Chip-firing with a sink

Start with a digraph (= directed graph).

3 //

2

2

@@//1 //2

^^

Choose a vertex s that isglobally reachable (i.e., for each vertex v, there is a path fromv to s). Call it thesink.

(Marked inblue above.)

A chip configurationis a choice of nonnegative integer for each vertex. We consider a number i at vertexv to mean “i chips lying at v”.

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from

(21)

Chip-firing with a sink

Start with a digraph (= directed graph).

Choose a vertex s that isglobally reachable (i.e., for each vertex v, there is a path fromv to s). Call it thesink.

(Marked inblue above.)

A chip configurationis a choice of nonnegative integer for each vertex. We consider a number i at vertexv to mean “i chips lying at v”.

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

6 / 54

(22)

Chip-firing with a sink

Start with a digraph (= directed graph).

3 //

2

2

@@//1 //2

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

(23)

Chip-firing with a sink

Start with a digraph (= directed graph).

3 //

2

2

@@//1 //2

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

6 / 54

(24)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

3

3

@@//1 //2

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

(25)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

2

3

@@//2 //2

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

6 / 54

(26)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

2

3

@@//1 //3

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

(27)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

2

3

@@//0 //4

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

6 / 54

(28)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

3

1

@@//1 //4

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

(29)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

2

1

@@//2 //4

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

6 / 54

(30)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

2

1

@@//1 //5

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

(31)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

1

1

@@//2 //5

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

6 / 54

(32)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

0

1

@@//3 //5

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

(33)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

0

1

@@//2 //6

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

6 / 54

(34)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

0

1

@@//1 //7

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

(35)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

0

1

@@//0 //8

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired). Note: Thesinkcannot be fired!

6 / 54

(36)

Chip-firing with a sink

Start with a digraph (= directed graph).

1 //

0

1

@@//0 //8

^^

The chip-firing game is played as follows:

Start with a chip configuration.

Allowed move: Choose a vertex v 6=s that has at least as many chips as it has outgoing arcs,

and “fire” it (i.e., for each arcv →a w, send a chip from v tow).

Example: See image above (we underline the vertex about to be fired).

Questions: Will the game always terminate?

And will the final result depend on the choice of moves?

(37)

3. The finite diamond lemma

3.

The finite diamond lemma

References:

Eriksson, Strong convergence and the polygon property of 1-player games.

MathOverflow answer #289320 (with list of references).

7 / 54

(38)

Defining 1-player games

Let us generalize these examples.

A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite); positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write: u −→v if we can get to v from u in one move

(i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

(39)

Defining 1-player games A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite);

positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write: u −→v if we can get to v from u in one move

(i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

8 / 54

(40)

Defining 1-player games A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite);

positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write: u −→v if we can get to v from u in one move

(i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

(41)

Defining 1-player games A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite);

positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write:

u −→v if we can get to v from u in one move (i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

8 / 54

(42)

Defining 1-player games A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite);

positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write:

u −→v if we can get to v from u in one move (i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

(43)

Defining 1-player games A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite);

positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write:

u −→v if we can get to v from u in one move (i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

8 / 54

(44)

Defining 1-player games A 1-player game consists of:

a set of positions;

a set of moves, each of which goes from one position to another.

In more familiar terms:

game = digraph (possibly infinite);

positions = vertices;

moves = arcs.

A position is said to be terminal if no moves are possible from this position (i.e., it is a vertex with outdegree 0).

Ifu andv are two positions (= vertices), then we write:

u −→v if we can get to v from u in one move (i.e., there is an arcu →v);

u −→ v if we can get to v from u in several moves (i.e., there is a walku →v).

Note: u −→ u, since “several moves” includes “0 moves”.

(45)

Monovariance, confluence A 1-player game is said to be:

monovariant if there is a maph from the set of all positions toNsuch that

h(u)>h(v) wheneveru −→v.

This means that there is a nonnegative-integer

monovariant that decreases with each move. (Thus, the game always terminates.)

confluent if for each position u, there is a unique terminal position v such that u −→ v.

This means that the terminal position does not depend on the choice of moves.

So, we can answer our questions from the previous sections if we can show that our games are monovariant and confluent. Note: Monovariance is not a necessary condition; we will loosen it later.

9 / 54

(46)

Monovariance, confluence A 1-player game is said to be:

monovariant if there is a maph from the set of all positions toNsuch that

h(u)>h(v) wheneveru −→v.

This means that there is a nonnegative-integer

monovariant that decreases with each move. (Thus, the game always terminates.)

confluent if for each position u, there is a unique terminal position v such that u−→ v.

This means that the terminal position does not depend on the choice of moves.

So, we can answer our questions from the previous sections if we can show that our games are monovariant and confluent. Note: Monovariance is not a necessary condition; we will loosen it later.

(47)

Monovariance, confluence A 1-player game is said to be:

monovariant if there is a maph from the set of all positions toNsuch that

h(u)>h(v) wheneveru −→v.

This means that there is a nonnegative-integer

monovariant that decreases with each move. (Thus, the game always terminates.)

confluent if for each position u, there is a unique terminal position v such that u−→ v.

This means that the terminal position does not depend on the choice of moves.

So, we can answer our questions from the previous sections if we can show that our games are monovariant and confluent. Note: Monovariance is not a necessary condition; we will loosen it later.

9 / 54

(48)

Monovariance, confluence A 1-player game is said to be:

monovariant if there is a maph from the set of all positions toNsuch that

h(u)>h(v) wheneveru −→v.

This means that there is a nonnegative-integer

monovariant that decreases with each move. (Thus, the game always terminates.)

confluent if for each position u, there is a unique terminal position v such that u−→ v.

This means that the terminal position does not depend on the choice of moves.

So, we can answer our questions from the previous sections if we can show that our games are monovariant and confluent.

Note: Monovariance is not a necessary condition; we will loosen it later.

(49)

Monovariance, confluence A 1-player game is said to be:

monovariant if there is a maph from the set of all positions toNsuch that

h(u)>h(v) wheneveru −→v.

This means that there is a nonnegative-integer

monovariant that decreases with each move. (Thus, the game always terminates.)

confluent if for each position u, there is a unique terminal position v such that u−→ v.

This means that the terminal position does not depend on the choice of moves.

So, we can answer our questions from the previous sections if we can show that our games are monovariant and confluent.

Note: Monovariance is not a necessary condition; we will loosen it later.

9 / 54

(50)

Monovariance, confluence A 1-player game is said to be:

monovariant if there is a maph from the set of all positions toNsuch that

h(u)>h(v) wheneveru −→v.

This means that there is a nonnegative-integer

monovariant that decreases with each move. (Thus, the game always terminates.)

confluent if for each position u, there is a unique terminal position v such that u−→ v.

This means that the terminal position does not depend on the choice of moves.

So, we can answer our questions from the previous sections if we can show that our games are monovariant and confluent.

Note: Monovariance is not a necessary condition; we will loosen it later.

(51)

Local confluence

A 1-player game is said to be:

locally confluent if for any positions u,v andw with u −→v and u−→w,

there exists a positiont such that v −→ t and w −→ t.

This means that if a positionu allows two possible moves u−→v andu −→w, then there are a sequence of moves from v and a sequence of moves from w that lead to the same outcome.

I.e., roughly speaking: There are no “watershed decisions” that lead into irreconcileable branches.

10 / 54

(52)

Local confluence

A 1-player game is said to be:

locally confluent if for any positions u,v andw with u −→v and u−→w,

there exists a positiont such that v −→ t and w −→ t.

Visually:

u

~~

v w

This means that if a positionu allows two possible moves u−→v andu −→w, then there are a sequence of moves from v and a sequence of moves from w that lead to the same outcome.

I.e., roughly speaking: There are no “watershed decisions” that lead into irreconcileable branches.

(53)

Local confluence

A 1-player game is said to be:

locally confluent if for any positions u,v andw with u −→v and u−→w,

there exists a positiont such that v −→ t and w −→ t.

Visually:

u

~~

v

w

t

.

(Hence, local confluence is also called the “diamond condition”.) This means that if a positionu allows two possible movesu −→v andu −→w, then there are a sequence of moves from v and a sequence of moves from w that lead to the same outcome.

I.e., roughly speaking: There are no “watershed decisions” that lead into irreconcileable branches.

10 / 54

(54)

Local confluence

A 1-player game is said to be:

locally confluent if for any positions u,v andw with u −→v and u−→w,

there exists a positiont such that v −→ t and w −→ t.

This means that if a positionu allows two possible moves u−→v andu −→w, then there are a sequence of moves from v and a sequence of moves from w that lead to the same outcome.

I.e., roughly speaking: There are no “watershed decisions” that lead into irreconcileable branches.

(55)

Local confluence

A 1-player game is said to be:

locally confluent if for any positions u,v andw with u −→v and u−→w,

there exists a positiont such that v −→ t and w −→ t.

This means that if a positionu allows two possible moves u−→v andu −→w, then there are a sequence of moves from v and a sequence of moves from w that lead to the same outcome.

I.e., roughly speaking: There are no “watershed decisions” that lead into irreconcileable branches.

10 / 54

(56)

Newman’s diamond lemma, finite case

Theorem (Newman’s lemma, aka diamond lemma, in the finite case).

If a 1-player game is monovariant and locally confluent, then it is confluent.

In other words, in a monovariant 1-player game, confluence can be checked locally:

If the result depends on the choice of moves, then we can pinpoint one specific choicethat acts as a watershed.

(57)

Newman’s diamond lemma, finite case

Theorem (Newman’s lemma, aka diamond lemma, in the finite case).

If a 1-player game is monovariant and locally confluent, then it is confluent.

In other words, in a monovariant 1-player game, confluence can be checked locally:

If the result depends on the choice of moves, then we can pinpoint one specific choicethat acts as a watershed.

11 / 54

(58)

A Rosetta stone

The diamond lemma is used in many places, and different cultures use different languages.

Attempt at a dictionary:

our terminology digraphs computer science 1-player game digraph abstract rewriting system (ARS)

position vertex object

move arc reduction step

play sequence walk reduction sequence

terminal position sink normal form

Here, “sink” means “vertex with outdegree 0”; this has nothing to do with the “sink” in chip-firing.

This is related to finite-state machines, but our moves aren’t determined by input.

(59)

A Rosetta stone

The diamond lemma is used in many places, and different cultures use different languages.

Attempt at a dictionary:

our terminology digraphs computer science 1-player game digraph abstract rewriting system (ARS)

position vertex object

move arc reduction step

play sequence walk reduction sequence

terminal position sink normal form

Here, “sink” means “vertex with outdegree 0”; this has nothing to do with the “sink” in chip-firing.

This is related to finite-state machines, but our moves aren’t determined by input.

12 / 54

(60)

Application: bubblesort, 1

Recall the bubblesort game on a poset:

Positions: lists (a1,a2, . . . ,an) of n elements of a poset P.

Moves: Pick anyi ∈ {1,2, . . . ,n−1}such that ai >ai+1, and swapai with ai+1.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

(61)

Application: bubblesort, 1

Recall the bubblesort game on a poset:

Positions: lists (a1,a2, . . . ,an) of n elements of a poset P.

Moves: Pick anyi ∈ {1,2, . . . ,n−1}such that ai >ai+1, and swapai with ai+1.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

13 / 54

(62)

Application: bubblesort, 1

Recall the bubblesort game on a poset:

Positions: lists (a1,a2, . . . ,an) of n elements of a poset P.

Moves: Pick anyi ∈ {1,2, . . . ,n−1}such that ai >ai+1, and swapai with ai+1.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

(63)

Application: bubblesort, 1

Recall the bubblesort game on a poset:

Positions: lists (a1,a2, . . . ,an) of n elements of a poset P.

Moves: Pick anyi ∈ {1,2, . . . ,n−1}such that ai >ai+1, and swapai with ai+1.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

Monovariance: Let

h(a1,a2, . . . ,an) = (number of inversions of (a1,a2, . . . ,an))

= (number of pairs (i,j) withi <j andai >aj). Easy to see:

h(u)>h(v) wheneveru −→v.

13 / 54

(64)

Application: bubblesort, 1

Recall the bubblesort game on a poset:

Positions: lists (a1,a2, . . . ,an) of n elements of a poset P.

Moves: Pick anyi ∈ {1,2, . . . ,n−1}such that ai >ai+1, and swapai with ai+1.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

Local confluence: Ifu −→v andu−→w, then v is obtained from u by swapping ai with ai+1; w is obtained from u by swapping aj with aj+1. Want to find t such that v −→ t andw −→ t.

WLOG assume j ≥i (else swap v and w).

(65)

Application: bubblesort, 1

Recall the bubblesort game on a poset:

Positions: lists (a1,a2, . . . ,an) of n elements of a poset P.

Moves: Pick anyi ∈ {1,2, . . . ,n−1}such that ai >ai+1, and swapai with ai+1.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

Local confluence: Ifu −→v andu−→w, then v is obtained from u by swapping ai with ai+1; w is obtained from u by swapping aj with aj+1. Want to find t such that v −→ t andw −→ t.

WLOG assume j ≥i (else swap v and w).

Case 1: j =i. Then,v −→ t andw −→ t for t =v =w.

13 / 54

(66)

Application: bubblesort, 2

Proof (continued). Local confluence:

Case 2: j =i+ 1. Then, ai >ai+1>ai+2 and u =

. . . ,ai,ai+1,ai+2, . . .

−→(. . . ,ai+1,ai,ai+2, . . .) =v and u =

. . . ,ai,ai+1,ai+2, . . .

−→(. . . ,ai,ai+2,ai+1, . . .) =w.

(67)

Application: bubblesort, 2

Proof (continued). Local confluence:

Case 2: j =i+ 1. Then, x >y >z and u= . . . ,x,y,z, . . .

−→(. . . ,y,x,z, . . .) =v and u= . . . ,x,y,z, . . .

−→(. . . ,x,z,y, . . .) =w. (We have renamedai,ai+1,ai+2 as x,y,z.)

14 / 54

(68)

Application: bubblesort, 2

Proof (continued). Local confluence:

Case 2: j =i+ 1. Then, x >y >z and u = x,y,z

−→(y,x,z) =v and u = x,y,z

−→(x,z,y) =w. (We have omitted all other entries.)

(69)

Application: bubblesort, 2

Proof (continued). Local confluence:

Case 2: j =i+ 1. Then, x >y >z and u = x,y,z

−→(y,x,z) =v and u = x,y,z

−→(x,z,y) =w.

“Reconcile” v andw as follows:

u = (x,y,z)

vv ((

v = (y,x,z)

w = (x,z,y)

(y,z,x)

((

(z,x,y)

vv

t = (z,y,x)

14 / 54

(70)

Application: bubblesort, 2

Proof (continued). Local confluence:

Case 2: j =i+ 1. Then, x >y >z and u = x,y,z

−→(y,x,z) =v and u = x,y,z

−→(x,z,y) =w.

“Reconcile” v andw as follows:

u = (x,y,z)

vv ((

v = (y,x,z)

##

w = (x,z,y)

{{

t = (z,y,x)

(71)

Application: bubblesort, 3

Proof (continued). Local confluence:

Case 3: j >i+ 1. Then, ai >ai+1 andaj >aj+1 and u =

. . . ,ai,ai+1, . . . ,aj,aj+1, . . .

−→(. . . ,ai+1,ai, . . . ,aj,aj+1, . . .) =v and u =

. . . ,ai,ai+1, . . . ,aj,aj+1, . . .

−→(. . . ,ai,ai+1, . . . ,aj+1,aj, . . .) =w.

15 / 54

(72)

Application: bubblesort, 3

Proof (continued). Local confluence:

Case 3: j >i+ 1. Then, p >q andx>y and u = . . . ,p,q, . . . ,x,y, . . .

−→(. . . ,q,p, . . . ,x,y, . . .) =v and u = . . . ,p,q, . . . ,x,y, . . .

−→(. . . ,p,q, . . . ,y,x, . . .) =w. (We have renamedai,ai+1,aj,aj+1 asp,q,x,y.)

(73)

Application: bubblesort, 3

Proof (continued). Local confluence:

Case 3: j >i+ 1. Then, p >q andx>y and u = p,q,x,y

−→(q,p,x,y) =v and u = p,q,x,y

−→(p,q,y,x) =w. (We have omitted all other entries.)

15 / 54

(74)

Application: bubblesort, 3

Proof (continued). Local confluence:

Case 3: j >i+ 1. Then, p >q andx>y and u = p,q,x,y

−→(q,p,x,y) =v and u = p,q,x,y

−→(p,q,y,x) =w. (We have omitted all other entries.)

“Reconcile” v andw as follows:

u = (p,q,x,y)

uu ))

v = (q,p,x,y)

))

w = (p,q,y,x)

uu

t = (q,p,y,x)

(75)

Application: bubblesort, 4

Proof (continued). We have now checked both monovariance and local confluence.

Hence, by the diamond lemma, the game is confluent, qed.

This is a folklore fact; for a writeup, see Section 4.2 of Galashin/Grinberg/Liu, arXiv:1509.03803v2 ancillary file.

16 / 54

(76)

Application: bubblesort, 4

Proof (continued). We have now checked both monovariance and local confluence.

Hence, by the diamond lemma, the game is confluent, qed.

This is a folklore fact; for a writeup, see Section 4.2 of Galashin/Grinberg/Liu, arXiv:1509.03803v2 ancillary file.

(77)

Application: chip-firing

Recall the chip-firing game on a digraph D with vertex setV: 3 //

2

2

@@//1 //2

^^

−→

1 //

3

3

@@//1 //2

^^

Positions: chip configurations, i.e., maps f :V →N.

Moves: “Firing” a vertexv 6=s that has at least as many chips as it has outgoing arcs.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

17 / 54

(78)

Application: chip-firing

Recall the chip-firing game on a digraph D with vertex setV: 3 //

2

2

@@//1 //2

^^

−→

1 //

3

3

@@//1 //2

^^

Positions: chip configurations, i.e., maps f :V →N.

Moves: “Firing” a vertexv 6=s that has at least as many chips as it has outgoing arcs.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

(79)

Application: chip-firing

Recall the chip-firing game on a digraph D with vertex setV: 3 //

2

2

@@//1 //2

^^

−→

1 //

3

3

@@//1 //2

^^

Positions: chip configurations, i.e., maps f :V →N.

Moves: “Firing” a vertexv 6=s that has at least as many chips as it has outgoing arcs.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

17 / 54

(80)

Application: chip-firing

Recall the chip-firing game on a digraph D with vertex setV: 3 //

2

2

@@//1 //2

^^

−→

1 //

3

3

@@//1 //2

^^

Positions: chip configurations, i.e., maps f :V →N.

Moves: “Firing” a vertexv 6=s that has at least as many chips as it has outgoing arcs.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

Monovariance: Let t = P

v∈V

f (v) and h(f) =X

v∈V

f (v)·

(t+ 1)|V|−(t+ 1)|V|−d(v,s) ,

(81)

Application: chip-firing

Recall the chip-firing game on a digraph D with vertex setV: 3 //

2

2

@@//1 //2

^^

−→

1 //

3

3

@@//1 //2

^^

Positions: chip configurations, i.e., maps f :V →N.

Moves: “Firing” a vertexv 6=s that has at least as many chips as it has outgoing arcs.

Proposition. The game always terminates, and the outcome does not depend on the choice of moves.

Proof: By the diamond lemma, it suffices to prove monovariance and local confluence.

Local confluence: Easy: If two vertices can both be fired at the same time, then they can be fired in either order, and the outcome is the same.

17 / 54

(82)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Leth(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call itx; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v. Hence, h(v)<h(u) =n, so that v exists.

(83)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Leth(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call itx; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v. Hence, h(v)<h(u) =n, so that v exists.

18 / 54

(84)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Let h(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call itx; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v. Hence, h(v)<h(u) =n, so that v exists.

(85)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Let h(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call it x; thus,x −→ x.

WLOG u is not terminal (otherwise,S(u) is obvious). Thus there is a v such thatu −→v.

Hence, h(v)<h(u) =n, so that v exists.

18 / 54

(86)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Let h(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call it x; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v. Hence, h(v)<h(u) =n, so that v exists.

(87)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Let h(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call it x; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v.

Hence, h(v)<h(u) =n, so that v exists.

18 / 54

(88)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Let h(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call it x; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v.

Hence, h(v)<h(u) =n, so that v exists.

(89)

Newman’s diamond lemma, finite case: proof, 1

Theorem (diamond lemma, in the finite case).

If a 1-player game is monovariant andlocally confluent, then it is confluent.

Proof. Let our game be monovariant (with function h) and locally confluent.

We need to show that for each positionu, there is aunique terminal position reachable fromu.

(I say that v isreachable from u ifu −→ v.) We call this statement S(u).

We prove S(u) by strong induction onh(u).

Induction step: Let h(u) =n. Assume thatS(x) holds for all positions x with h(x)<n.

Thus, for each position x with h(x)<n, there is a unique terminal position reachable fromx. Call it x; thus,x −→ x. WLOG u is not terminal (otherwise,S(u) is obvious).

Thus there is a v such thatu −→v.

Hence, h(v)<h(u) =n, so that v exists.

18 / 54

(90)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v.

(91)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v.

Thus, there exists some terminal position reachable fromu (namely,v). Remains to prove its uniqueness.

u

}}v

t t

v t

19 / 54

(92)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v.

Thus, there exists some terminal position reachable fromu (namely,v). Remains to prove its uniqueness.

Let q be any other terminal position reachable fromu. We want to proveq =v.

u

}}

v

t

v t q

(93)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v. u

}}

v

t

v t q

Sinceq is terminal butu is not, we have u−→w −→ q for some positionw.

19 / 54

(94)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v. u

}} !!

v

w

t

v t q

Local confluence shows that there is a t satisfying v −→ t andw −→ t.

(95)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v. u

}} !!

v

!!

w

~~t

v t q

h(t)≤h(v)<h(u) =n; thus,t is well-defined.

19 / 54

(96)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v. u

}} !!

v

!!

w

~~t

v t q

h(v)<h(u) =n, so S(v) holds.

Thus, there is a unique terminal position reachable from v.

Since both v and t fit the bill, we thus obtain v =t.

(97)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v. u

}} !!

v

!!

w

~~t

v t q

h(w)<h(u) =n, so S(w) holds.

Thus, there is a unique terminal position reachable from w. Since both q andt fit the bill, we thus obtain q=t.

19 / 54

(98)

Newman’s diamond lemma, finite case: proof, 2

Proof (continued). We must prove S(u). So far we know:

u is a position withh(u) =n.

v is a position withu−→v.

v is a terminal position withu −→v −→ v. u

}} !!

v

!!

w

~~t

v t q

Thus,q =t =v, qed.

Referenzen

ÄHNLICHE DOKUMENTE

At the very outset, in fact before you choose your carpet, you must decide on the colour scheme for each room. It is quite possible to get a carpet which will go well with any of

If the computer has a standard DVI or DFP -compliant digital video card or video output port, use an optional digital video cable or DVI analog cable to connect the monitor port

button on the projector's control panel or the [Computer] button on the remote control to select the Computer port as the input

•••• Press the button on the projector's control panel or the [Enter] button on the remote control, and select the video signal format from the menu that appears..

The point of this is that when the light penetrates the layer of acrylic glass the light refraction on the surface of the photopaper is completely different from the effect when

This approach no longer situated works of art in rooms representing historical epochs, but instead isolated the individual work Thomas Thiemeyer: Work, specimen, witness:

Return of the exercise sheet: 24.Oct.2019 during the exercise

Return of the exercise sheet: 14.Nov.2019 during the exercise