introductory lecture games computer scientists playzimmermann/slides/antrittsvorlesung.pdf · games...

139
Introductory Lecture Games Computer Scientists Play Martin Zimmermann July 19th, 2018 1/23

Upload: others

Post on 01-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Introductory Lecture

Games Computer Scientists Play

Martin Zimmermann

July 19th 2018

123

The Pumping Lemma

L sube Σlowast regular implies

existn isin N forallw isin L cap Σgen existx y z isin Σlowast xyz = w and|xy | le nand|y | gt 0andforalli isin N xy iz isin L

223

The Pumping Lemma

L sube Σlowast regular implies

existn isin N forallw isin L cap Σgen existx y z isin Σlowast xyz = w and|xy | le nand|y | gt 0andforalli isin N xy iz isin L

a

b

b

a

a

b

a

b

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n

w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 2: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

L sube Σlowast regular implies

existn isin N forallw isin L cap Σgen existx y z isin Σlowast xyz = w and|xy | le nand|y | gt 0andforalli isin N xy iz isin L

223

The Pumping Lemma

L sube Σlowast regular implies

existn isin N forallw isin L cap Σgen existx y z isin Σlowast xyz = w and|xy | le nand|y | gt 0andforalli isin N xy iz isin L

a

b

b

a

a

b

a

b

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n

w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 3: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

L sube Σlowast regular implies

existn isin N forallw isin L cap Σgen existx y z isin Σlowast xyz = w and|xy | le nand|y | gt 0andforalli isin N xy iz isin L

a

b

b

a

a

b

a

b

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n

w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 4: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n

w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 5: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n

w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 6: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n

w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 7: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 8: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x zy

223

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 9: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Pumping Lemma

foralln isin N existw isin L cap Σgen forallx y z isin Σlowast

(xyz = w and |xy | le n and |y | gt 0) rarrexisti isin N xy iz isin L

implies that L is not regular

ExampleL = anbn | n gt 0 = ab aabb aaabbb aaaabbbb

n w = aaaaa middot middot middot aaaaa bbbbb middot middot middot bbbbb

n n

x z

223

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 10: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 11: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 12: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking

IntuitionQuantifiers and logical connectives correspond to moves in a gamebetween a player trying to satisfy a formula and an opponenttrying to falsify it

Model CheckingGiven a structure A and a sentence ϕ of first-order logic decidewhether A satisfies ϕ

ExampleA = (N lt | 1) andϕ = forallxexisty(x lt y and forallz(not(z |y) or z = 1) or z = y)

323

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 13: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 14: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn))R

A

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 15: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions

not

(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 16: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Model Checking Games

A game between Verifier and Falsifier

Positions (ψβ) where ψ is a subformula of ϕ and β is apartial variable valuation

Moves for Verifier

(existxψβ) (ψβ[x 983041rarr a]) for all a of A

(ψ0 or ψ1β)

(ψ0β)

(ψ1β)

Moves for Falsifier dual

Terminal positions not(R(x1 xn)β) for relation symbol R Winning for Verifier if and only if (β(x1) β(xn)) isin RA

423

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 17: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 18: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 19: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 20: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 21: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 22: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 23: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 24: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

(forallxexistyψ empty)

(existyψ x 983041rarr 3)F

(x lt y and forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)V

(forallz(not(z |y) or z = 1 or z = y) x 983041rarr 3 y 983041rarr 7)F

(not(z |y) or z = 1 or z = y x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)F

(not(z |y) x 983041rarr 3 y 983041rarr 7 z 983041rarr 13)V

Winning for Verifier as 13 does not divide 7

523

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 25: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Example Continued

A = (N lt | 1) andϕ = forallxexisty (x lt y and forallz(not(z |y) or z = 1 or z = y))983167 983166983165 983168

ψ

TheoremThe following are equivalent

1 A satisfies ϕ

2 Verifier has a winning strategy for the game induced by Aand ϕ

523

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 26: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 27: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 28: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 29: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 30: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 31: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Word Automata Emptiness

a

b

b

a

a

b

a

b

For automata on finite words emptiness can be expressed as a(trivial) one-player reachability game find a path from the initialstate to some accepting state

623

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 32: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 33: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 34: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 35: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 36: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 37: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 38: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Tree Automata Emptiness

a

c

a

a e

a

a a

a a a c

aeaaa a

723

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 39: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 40: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 41: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 42: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 43: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 44: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 45: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

a

e

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 46: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 47: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 48: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Emptiness Game

One player picks transitions the other(implicitly) the structure of the input tree

TheoremAn automaton has a non-empty language if and only ifthe player constructing a run has a winning strategyfor the induced game

An analogous result holds for automata on infinite treesHowever the resulting game is an infinite-duration game

a

c

a

a e

a

c

ae

a

823

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 49: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 50: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 51: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 52: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

The proof works by bottom-up induction over the finite tree ofpositions

923

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 53: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Determinacy

All games considered thus far at most one player can have awinning strategy

A game is determined if one of the players has a winningstrategy for it

Theorem (Zermelo 1913)

Every finite-duration two-player zero-sum game of perfectinformation is determined

QuestionIs every infinite-duration two-player zero-sum game of perfectinformation determined

923

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 54: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Chomp

There is a (rectangular) chocolate bar with m times n pieces

A move consists of taking a piece and all others that are tothe right and above

Two players Player 0 and Player 1 move in alternationstarting with Player 0

The player who takes the bottom-left piece loses

1023

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 55: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 56: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 57: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 58: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 59: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 60: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 61: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 62: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 63: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Letrsquos Play

1123

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 64: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 65: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 66: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Strategy Stealing

Claim

Player 0 has a winning strategy for every bar (unless m = n = 1)

Assume Player 1 has a winning strategy

Look how this strategy reacts to Player 0 only taking thetop-right piece in the first move

Let Player 0 use this strategy from the beginning

This is winning for Player 0 which is a contradiction

As Chomp is determined this means Player 0 must have awinning strategy

Note

The proof is non-constructive

winning strategy only known for special cases n times n n times 22times n n times 1 and 1times n (try to find them)

1223

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 67: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Hamming Distance

In the following B = 0 1DefinitionFor x = x0x1x2 middot middot middot and y = y0y1y2 middot middot middot in Bω the Hammingdistance between x and y is defined as

hd(x y) = |n isin N | xn ∕= yn| isin N cup infin

Example

hd(0101101000 middot middot middot 1010100000 middot middot middot ) = 5

hd(1010101010 middot middot middot 0101010101 middot middot middot ) = infin

hd(1010101010 middot middot middot 1111111111 middot middot middot ) = infin

1323

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 68: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 69: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

Example

I have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 70: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 71: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 72: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Infinite XOR Functions

DefinitionA function f Bω rarr B is an infinite XOR function if hd(x y) = 1implies f (x) ∕= f (y) for all x y isin Bω

ExampleI have none we will come back to this later

TheoremThere exists an infinite XOR function

The proof requires the axion of choice

1423

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 73: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 74: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 75: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100

0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 76: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0

000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 77: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000

1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 78: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101

1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 79: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1

100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 80: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000

middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 81: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f (

1100 0 000000110000 1100101 1 100000 middot middot middot

)

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 82: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 83: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

The Game Gf

Fix some infinite XOR function f

We define a game Gf between Player 0 and Player 1 who picksequences of bits in alternation

Example

winner Player f ( 1100 0 000000110000 1100101 1 100000 middot middot middot )

Formally Gf is played in rounds n = 0 1 2

In round n first Player 0 picks w2n isin B+ then Player 1 picksw2n+1 isin B+

Play w0w1w2 is won by Player f (w0w1w2 middot middot middot )

1523

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 84: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

There are Undetermined Games

TheoremLet f be an infinite XOR function No player has a winningstrategy for Gf

1623

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 85: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 86: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof Idea

Strategy stealing

For every strategy τ of Player 1 we construct two counterstrategies σ and σprime that mimic τ

The only difference between σ and σprime is that one starts byplaying a 0 the other by playing a 1

The remainder of the plays resulting from playing σ and σprime

against τ are equal

Hence their Hamming distance is 1 and one of the plays iswon by Player 0

Thus τ is not a winning strategy

The argument showing that Player 0 has no winning strategy issimilar

1723

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 87: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 88: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 89: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 90: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 91: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 92: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 93: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 94: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 95: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 96: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 97: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 98: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 99: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 100: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 101: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let τ be a strategy for Player 1 in Gf We show that τ is notwinning by constructing counter strategies σ and σprime as above

τ

σ

σprime

τ

0

w1

1w1

w2

w2

w3

w3

w4

w4

w5

w5

w6

w6

Consider the resulting plays they differ only at their first positionHence Player 0 wins one of them Thus τ is not winning

1823

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 102: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 103: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 104: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 105: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 106: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 107: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 108: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 109: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 110: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 111: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 112: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 113: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 114: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 115: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 116: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Proof

Let σ be a strategy for Player 0 in Gf We show that σ is notwinning by constructing counter strategies τ and τ prime as above

τ

σ

σ

τ prime

w0

0

w1

w0

1w1

w2

w2

w3

w3

w4

w4

w5

w5

Consider the resulting plays they differ only at their first positionHence Player 1 wins one of them Thus σ is not winning

1923

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 117: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Churchrsquos Synthesis Problem

i1

in

o1

on

Church 1957 Given a specification on the inputoutput behaviorof a circuit (in some suitable logical language) decide whethersuch a circuit exists and if yes compute one

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 118: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Churchrsquos Synthesis Problem

i1

in

o1

on

Example

Interpret input ij = 1 as client j requesting a shared resource andoutput oj = 1 as the corresponding grant to client j

Typical properties1 Every request is eventually answered

2 At most one grant at a time (mutual exclusion)

3 No spurious grants

2023

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 119: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Churchrsquos Synthesis Problem

i1

in

o1

on

Solved by Buchi amp Landweber in 1969

Insight Problem can be expressed as two-player game of infiniteduration between the environment (producing inputs) and thecircuit (producing outputs)

2023

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 120: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 121: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 122: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

InputOutput

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 123: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 124: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 125: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 126: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 127: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 128: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 129: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 130: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 131: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 132: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1Output 0 0 1 1 1

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 133: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Input 0 0 0 1 1 middot middot middotOutput 0 0 1 1 1 middot middot middot

2123

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 134: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Back to the Example

Consider the one-client case

s

i

i

o

o

Winning plays for circuit player have to satisfy

1 if i is visited then o as well at a later position and

2 if o is visited then it has not been visited since the last visitof i

2123

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 135: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 136: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Buchi-Landweber in a Nutshell

s

i

i

o

o

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 137: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Buchi-Landweber in a Nutshell

00 11

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 138: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Buchi-Landweber in a Nutshell

00 11i1 o1

Circuit player has a (memoryless) winning strategy

which can be turned into an automaton with output

which can be turned into a circuit satisfying the specification

2223

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323

Page 139: Introductory Lecture Games Computer Scientists Playzimmermann/slides/Antrittsvorlesung.pdf · Games Computer Scientists Play Martin Zimmermann July 19th, 2018 ... Verifier has a

Even More Games

Logics

Ehrenfeucht Fraisse Games

Set theory

Banach Mazur GamesWadge Games

Complexity theory

Proof theory

Automata theory

Economics

2323