no slide titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 hj constraint logic, classes...
TRANSCRIPT
![Page 1: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/1.jpg)
Game Complexity
IPA Advanced Course on Algorithmics and Complexity
Eindhoven, 25 Jan 2019
Walter Kosters
Hendrik Jan Hoogeboom
LIACS, Universiteit Leiden
![Page 2: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/2.jpg)
schedule
10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30 lunch 14:00-14:45 HJ Tip-Over is NP-complete 15:00-16:00 W Combinatorial Game Theory
![Page 3: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/3.jpg)
‘game theory’ fields
combinatorial game theory algorithms mathematical theory economic game theory von Neumann, Nash strategy, optimization expected profit computational complexity models of computation: games turing machine
![Page 4: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/4.jpg)
reference
Games, Puzzles, & Computation
Robert A. Hearn Erik D. Demaine
(2009, AKPeters)
E. Demaine and R.A. Hearn. Constraint Logic: A Uniform Framework for Modeling Computation as Games. In: Proceedings of the 23rd Annual IEEE
Conference on Computational Complexity, June 2008.
R.A. Hearn. Games, Puzzles, and Computation PhD thesis, MIT, 2006.
![Page 5: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/5.jpg)
introduction
games & complexity classes
![Page 6: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/6.jpg)
domino computing Computing with Planar Toppling Domino Arrangements
William M. Stevens
challenge: (no) timing & (no) bridges
Unconventional Computation, 10th International Conference UC 2011, Turku, Finland, June 6-10, 2011
![Page 7: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/7.jpg)
what is a game?
• simulation (0p) game of life • puzzles (1p) rush hour • board games (2p) ‘generalized’ chess • teams
characteristics - bounded state - moves, repetition - players, goal
study the complexity of
![Page 8: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/8.jpg)
Complexity of Games & Puzzles [Demaine, Hearn & many others]
0 players (simulation)
1 player (puzzle)
2 players (game)
team, imperfect info
NP
PSPACE EXPTIME
P
Undecidable
NEXPTIME PSPACE
PSPACE
Rengo Kriegspiel?
bridge?
![Page 9: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/9.jpg)
Constraint Logic [Hearn & Demaine 2009]
0 players (simulation)
1 player (puzzle)
2 players (game)
team, imperfect info
PSPACE EXPTIME
P
Undecidable
NEXPTIME
PSPACE
NP
PSPACE
![Page 10: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/10.jpg)
Decision Problem can you reverse this edge?
![Page 11: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/11.jpg)
constraint logic constraint graphs directed ‘oriented’ edge weight 1,2 inflow constraints legal configuration game/computation on constraint graphs move: legal edge reversal goal: reverse specific edge
2 1
≥2
1
NCL - nondet constraint logic instance: constraint graph G, edge e question: sequence which reverses e BOUNDED NCL … reverses each edge at most once
(details to follow)
≥1
![Page 12: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/12.jpg)
NP & TipOver
part I constraint logic ‘graph games’ Chapter 5.1 Bounded NCL
part II games in particular
Chapter 9.1 TipOver
NP
3SAT
![Page 13: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/13.jpg)
PSPACE & Plank Puzzle
part I constraint logic ‘graph games’
NCL
part II games in particular
plank puzzle
(river crossing)
PSPACE
QBF
![Page 14: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/14.jpg)
‘formal’ definition
constraint logic – a graph game
![Page 15: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/15.jpg)
issues goal: generic ‘graph game’ ∙ several instantiations for specific complexity classes / game types ∙ reduction to games & puzzles Hearn & Demaine ‘constraint logic’ coloured edges / connectors bounded vs. unbounded (natural direction of computation) planarity
1 2
2
1
![Page 16: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/16.jpg)
basic constraint logic
≥2
edge connectors
incoming value 2 1
constraint graph oriented/directed edges + connectors vertex constraint inflow value ≥ 2 game: legal move edge reversal satisfying constraint goal reversal given edge
examples
![Page 17: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/17.jpg)
‘special’ vertex constraints?
X
goal X
X
X
≥2
≥1
colour conversion dangling edges edge terminators
≥0
![Page 18: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/18.jpg)
normal form vertices
incoming value 2 1
OR AND FANOUT CHOICE
bounded NCL (reverse only once)
NCL
OR AND
![Page 19: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/19.jpg)
implementing gates
AND
OR
2
1
≥2
1
2
≥2
2 2
p.17
intuitive meaning of vertices
![Page 20: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/20.jpg)
implementing gates
FANOUT
CHOICE
2
1
≥2
1
p.17
intuitive meaning of vertices
1 1
1
≥2
![Page 21: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/21.jpg)
basic observation
(w∨x∨y) ∧ (w∨¬x∨z) ∧ (x∨¬y∨z)
“emulate” a logical formula as graph game goal: flip a given edge iff formula satisfiable
OR AND FANOUT CHOICE
components
![Page 22: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/22.jpg)
formula constraint graph
OR
AND
FANOUT
CHOICE
free edges
output = goal
(x∨¬y∨z)
(w∨x∨y) (w∨¬x∨z)
¬x w
x ¬y y z
x’ing edges
(w∨x∨y)∧(w∨¬x∨z)∧(x∨¬y∨z)
variable setting
w∨x
![Page 23: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/23.jpg)
questions
∙ ‘can’ : not obliged to reverse edges upwards ie, we do not always set variable ∙ can we reverse the ‘wrong way’? ∙ do we need restriction to reverse edge once?
AND
FANOUT
?
![Page 24: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/24.jpg)
basic complexity classes
game complexity classes vs.
TM resources: space & time
Cook/Levin NP completeness SAT
Savitch PSPACE = NPSPACE
![Page 25: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/25.jpg)
computation tree
√ √
determinism nondeterminism alternation
![Page 26: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/26.jpg)
computation tree
∨
∧
√ √
√
∧
√
√
determinism nondeterminism alternation
existential and universal states
![Page 27: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/27.jpg)
Savitch
NSPACE( s(n) ) ⊆ SPACE( s2(n) )
reach(ini,fin,1) = step(ini,fin) reach(ini,fin,2k) foreach configuration mid test reach(ini,mid,k) ∧ reach(mid,fin,k)
stack depth s(n) of configs, each size s(n)
can we reach a halting configuration? at most exponentially many steps s(n)|Σ|s(n)
solve recursively “re-use space”
NPSPACE = PSPACE
NSPACE( s(n) ) ⊆ ATIME( s2(n) ) “parallel in time”
![Page 28: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/28.jpg)
dimensions
P ⊆ NP ⊆ PSPACE ⊆ EXPTIME ⊆ NEXPTIME ⊆ EXPSPACE
AL AP APSPACE AEXPTIME
NPSPACE NEXPSPACE
A.K. Chandra, D.C. Kozen, and L.J. Stockmeyer. 'Alternation', Journal of the ACM, Volume 28, Issue 1, pp. 114–133, 1981.
existential and universal states computation = tree
space time space time determinism L P PSPACE EXPTIME nondeterminism NL NP NPSPACE NEXPTIME alternation AL AP APSPACE AEXPTIME
log. polynomial exp.
![Page 29: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/29.jpg)
game categories
unbounded SPACE
PSPACE PSPACE NPSPACE
EXPTIME APTIME
undecid
bounded TIME
P NP PSPACE AP
NEXPTIME
# zero simulation determ.
one puzzle
nondeterm.
two game
alternat.
team imperfect informat.
game categories and their natural complexities
Rush Hour River Crossing
TipOver
NL ⊆ P ⊆ NP ⊆ PSPACE ⊆ EXPTIME ⊆ NEXPTIME
![Page 30: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/30.jpg)
game categories
unbounded SPACE
PSPACE PSPACE NPSPACE
EXPTIME APSPACE
undecid
bounded TIME
P NP PSPACE AP
NEXPTIME
# zero simulation determ.
one puzzle
nondeterm.
two game
alternat.
team imperfect informat.
game categories and their natural complexities
Rush Hour River Crossing
TipOver
(polynomial) TM
resources
NL ⊆ P ⊆ NP ⊆ PSPACE ⊆ EXPTIME ⊆ NEXPTIME = NPSPACE = AP
![Page 31: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/31.jpg)
3SAT
(w∨x∨y) ∧ (w∨¬x∨z) ∧ (x∨¬y∨z) ∧ …
clause
literal (negated) variable
3 conjunctive normalform
3SAT given: given formula φ in 3CNF question: is φ satisfiable? (can we find a variable assignment making formula true)
Cook/Levin 3SAT is NP-complete
![Page 32: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/32.jpg)
conclusion (B-NCL)
BOUNDED NCL - nondet constraint logic instance: constraint graph G, edge e question: sequence which reverses each edge at most once, ending with e
OR AND FANOUT CHOICE
- reduction from 3SAT into Bounded NCL - Bounded NCL is in NP thm. Bounded NCL is NP-complete
however: topling domino’s cannot cross
![Page 33: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/33.jpg)
formula games – complete problems NL 2SAT (x1∨x3) ∧ (¬x5∨¬x3) ∧ (x5∨x1) P HORN-SAT (¬x3∨¬x2∨¬x5∨x1) i.e. ( x3∧x2∧x5 → x1 ) NP SAT satisfiablity ∃x1 ∃x3 ∃x5 (x1∨x3∨¬x5) ∧ (¬x1∨¬x3) ∧ (x5∨x1) (N)PSPACE QBF aka QSAT ∃x1 ∀x3 ∃x5 (x1∨x3∨¬x5) ∧ (¬x1∨¬x3) ∧ (x5∨x1)
![Page 34: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/34.jpg)
quantification
![Page 35: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/35.jpg)
![Page 36: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/36.jpg)
conclusion (NCL)
NCL - nondet constraint logic instance: constraint graph G, edge e question: sequence which reverses e
OR AND
thm. NCL is PSPACE-complete
initial orientation arrows not specified
![Page 37: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/37.jpg)
next: concrete games
bounded: NP unbounded: PSPACE
![Page 38: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/38.jpg)
![Page 39: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/39.jpg)
TipOver is NP-Complete
![Page 40: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/40.jpg)
NP & TipOver
part II games in particular
Chapter 9.1 TipOver
part I constraint logic ‘graph games’ Chapter 5.1 Bounded NCL
NP
3SAT
![Page 41: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/41.jpg)
conclusion
BOUNDED NCL - nondet constraint logic instance: constraint graph G, edge e question: sequence which reverses each edge at most once, ending with e
OR AND FANOUT CHOICE
- reduction from 3SAT into Bounded NCL - Bounded NCL is in NP Bounded NCL is NP-complete
however: topling domino’s and crates cannot cross
![Page 42: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/42.jpg)
formula constraint graph
OR
AND
FANOUT
CHOICE
free edges
output = goal
(x∨¬y∨z)
(w∨x∨y) (w∨¬x∨z)
¬x w
x ¬y y z
x’ing edges
(w∨x∨y)∧(w∨¬x∨z)∧(x∨¬y∨z)
variable setting
w∨x
![Page 43: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/43.jpg)
planar crossover gadget
formal proof Lemma 5.10
necessary behaviour either of them or both!
half-crossover ncl type
![Page 44: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/44.jpg)
bounded NCL half-crossover
half-crossover bounded ncl type
vert. hori.
both
OR CHOICE
to be replaced restricted behaviour
race condition
![Page 45: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/45.jpg)
conclusion (planer BNCL)
BOUNDED NCL - nondet constraint logic instance: constraint graph G, edge e question: sequence which reverses each edge at most once, ending with e
OR AND FANOUT CHOICE
Bounded NCL is NP-complete, even for planar graphs, with restricted vertices
![Page 46: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/46.jpg)
conclusion (planar NCL)
NCL - nondet constraint logic instance: constraint graph G, edge e question: sequence which reverses e
OR AND
NCL is PSPACE-complete, even for planar graphs, with restricted vertices
![Page 47: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/47.jpg)
application: TipOver
2
3
4
goal
24 initial position
http://www.puzzles.com/products/tipover/PlayOnLine.htm
![Page 48: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/48.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
9 12
15
23 24
30
33 36
2
3
4
goal
![Page 49: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/49.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
9 12
15
23 24
30
33 36
2
3
4
goal
![Page 50: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/50.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
9 12
15
24
30
33 36
2
3
4
goal
![Page 51: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/51.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
9 12
15
30
33 36
2
3
4
goal
![Page 52: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/52.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
9 12
15
33 36
2
3
4
goal
![Page 53: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/53.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
12
15
33 36
2
3
4
goal
![Page 54: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/54.jpg)
solution advanced
23D, 24L, 30U, 9R, 15U, 2D
2
12
33 36
2
3
4
goal
![Page 55: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/55.jpg)
AND
“one way”
FANOUT
CHOICE
OR
2
![Page 56: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/56.jpg)
gadgets: “one way”, OR
OR
C
B A
invariant: • can be reached ⇔ can be inverted • all visited positions remain connected
![Page 57: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/57.jpg)
gadgets: AND
C
B A
AND
remains connected
2
1
3
![Page 58: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/58.jpg)
gadgets: CHOICE, FANOUT
FANOUT
C B
A
use one-way gadgets at B and C (control information flow)
CHOICE
C B
A
reconnect
choice
![Page 59: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/59.jpg)
conclusion
thm. TipOver is NP-complete
OR AND FANOUT CHOICE
Bounded NCL is NP-complete, even for planar graphs, with above restricted vertices
![Page 60: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/60.jpg)
NP complete bounded games
Jan van Rijn: Playing Games: The complexity of Klondike, Mahjong, Nonograms
and Animal Chess (Master Thesis, 2013, Leiden)
![Page 61: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/61.jpg)
Tetris is NP complete
1
2
3
4
“Given an initial game board and a sequence of pieces, can the board be cleared?”
Breukelaar, Demaine, Hohenberger, Hoogeboom, Kosters, Liben-Nowell. Tetris is Hard, Even to Approximate. Selected Papers from the Ninth Int.
Computing and Combinatorics Conf. (COCOON 2003). Int. J. of Computational Geometry and Applications 14 (2004) 41-68.
![Page 62: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/62.jpg)
Tetris is NP complete
1
2
3
4
“Given an initial game board and a sequence of pieces, can the board be cleared?”
![Page 63: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/63.jpg)
Tetris is NP complete
1
2
3
4
“Given an initial game board and a sequence of pieces, can the board be cleared?”
yes!
![Page 64: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/64.jpg)
Tetris is NP complete
reduction from 3-partitioning problem (can we divide set of numbers into triples?)
begin
a=3
end
OPEN: directly with Bounded NCL ? find OR, AND, FANOUT, CHOICE
![Page 65: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/65.jpg)
Wrap Up
![Page 66: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/66.jpg)
conclusion
conclusion: nice uniform family of graph games, suitable for the various game classes not in this presentation: deterministic classes are hard to prove complete: timing constraints bounded det. ncl has no known planar normal form 2pers. games need two types of edges (apart from colours), for each of the players for teams one needs hidden info, otherwise equivalent to 2p games
![Page 67: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/67.jpg)
conclusion
roots can be found in the literature (see Geography) take care: game of life (what is the ‘goal’?) is PSPACE, it also is undecidable (on infinite grid) example of P-complete: the domino topling simulation
![Page 68: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/68.jpg)
geography
[Schäfer, J.CSS, 1978]
THM. Geography is PSPACE-complete two players on directed graph alternately pick next vertex, without repetition application to GO [Lichtenstein&Sipser, J.ACM, 1980]
Papadimitriou, Computational Complexity
![Page 69: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/69.jpg)
latch / protected OR
we are not (really) interested in the internal states only in the external connections:
input-output behaviour synchronization, silent actions & simulation
![Page 70: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/70.jpg)
latch behaviour
internally different
![Page 71: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/71.jpg)
![Page 72: No Slide Titlehoogeboomhj/praatjes/... · schedule 10:00-11:00 HJ Constraint Logic, classes 11:15-12:15 W Gadgets, planarity, exercises Rush Hour, Plank puzzle PSPACE-complete 12:30-13:30](https://reader033.vdocument.in/reader033/viewer/2022042802/5f3fe724d8ab1352ea6133f1/html5/thumbnails/72.jpg)
Game Complexity
IPA Advanced Course on Algorithmics and Complexity
Eindhoven, 25 Jan 2019
Walter Kosters
Hendrik Jan Hoogeboom
LIACS, Universiteit Leiden