the computational complexity of games and puzzles · the computational complexity of games and...

163
The Computational Complexity of Games and Puzzles Valia Mitsou City University of New York

Upload: phamnhu

Post on 31-Aug-2018

239 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Computational Complexityof Games and Puzzles

Valia Mitsou City University

of New York

Page 2: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Games and Puzzles …

Page 3: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

… with Theoretical Applications

● Generalization of wolf-goat- cabbage puzzle is similar to Vertex Cover.

● Generalizations of SET game are similar to well known graph-theoretic problems.

● Generalization of UNO game is similar to Hamiltonicity.

Page 4: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Computational Complexity

We assume a background in Complexity Theory:➢ P vs NP➢ Beyond NP (PSPACE)➢ Algorithms vs Hardness➢ Approximation

Page 5: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Parameterized Complexity Primer

➢Parameterized Complexity: Except from input n, we consider an additional variable k which is called the parameter.

➢Parameterized Complexity differentiates between algorithms that run in time nf(k) and those that run in time g(k)·nc.

➢The 1st class is called XP and the 2nd is called FPT.

Page 6: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Parameterized Complexity Primer

➢FPT algorithms are usually much faster than those that run in time nf(k).

➢W-hard: Problems in XP considered not to admit FPT algorithms.

➢There is a reduction program similar to the theory of NP-Completeness for proving W-hardness of parameterized problems.

Page 7: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Outline

➢ The wolf-goat-cabbage puzzle➢ The game of SET➢ The game of UNO➢ The game of Scrabble

Page 8: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Wolf-Goat-Cabbage puzzle

Joint work with Michael Lampis

Page 9: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover
Page 10: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover
Page 11: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover
Page 12: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

≤ man + 1

Page 13: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

How can they all cross the river safely?

Page 14: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

“Previous Work”

• “Propositiones ad acuendos iuvenes”, Alcuin of York, 8th century A.D.

• We propose a generalization of Alcuin’s puzzle.

Page 15: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Our generalization

Page 16: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Our generalization

• We seek to transport n items, given their incompatibility graph.

• Objective: Minimize boat size.• We call this the Ferry Cover Problem

Page 17: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover
Page 18: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover
Page 19: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≥ OPTVC (G)

Page 20: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≥ OPTVC (G)

Page 21: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≥ OPTVC (G)

Page 22: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 23: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 24: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 25: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 26: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 27: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 28: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 29: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 30: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 31: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 32: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 33: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

OPTFC (G) ≤ OPTVC (G) + 1

Page 34: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Ferry Cover Problem

LM 2007:

OPTVC (G) ≤ OPTFC (G) ≤ OPTVC (G) + 1

Page 35: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Hardness and Approximation

LM 2007:• Ferry Cover is NP-hard and APX-hard (like

Vertex Cover).• A ρ-approximation algorithm for Vertex

Cover yields a (ρ + 1/OPTFC)-approximation algorithm for Ferry Cover.

Page 36: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Small and Large Boat Graphs

Graphs are divided into two categories:• Small-boat, if OPTFC (G) = OPTVC (G)

• Large-boat, if OPTFC (G) = OPTVC (G) + 1

Page 37: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Small and Large Boat Graphs

LM 2007: Stars with >2 leaves are big-boat, all other trees are small-boat.

CHW 2008: Categorization of Bipartite, Chordal, and Planar graphs.

CHW 2008: Deciding if a general graph is small-boat is NP-hard.

Page 38: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Trip Constrained Ferry Cover

• Variation of Ferry Cover: we are also given a trip constraint.

• We seek to minimize the size of the boat s.t. there is a solution within this constraint.

Page 39: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

FC1 (3 trips max allowed)

LM 2007:

• FC1 is APX-hard.

• 2-approximation (trivial).• 4/3-approximation for bipartite graphs.• 1.56-approximation for planar graphs.

Page 40: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Further Work

• Can we have an efficient non-trivial approximation of FC1 in the general case?

• Are there any graph families for which Vertex Cover is easy but Ferry Cover is hard?

• Is it in NP to determine whether a graph is small boat?

Page 41: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of

Joint work with Michael Lampis

Page 42: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Each card has 4 attributes:

– Symbol

– Shading

– Color

– Number

Page 43: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Each attribute can take one of 3 values:

– Symbol● Oval● Diamond● Squiggle

Page 44: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Each attribute can take one of 3 values:

– Color● Red● Green● Purple

Page 45: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Each attribute can take one of 3 values:

– Shading● Blank● Stripped● Solid

Page 46: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Each attribute can take one of 3 values:

– Number● One● Two● Three

Page 47: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

There are 34 = 81 different cards in total (one for each combination of values).

Page 48: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Valid set: 3 cards with values for each attribute being either all the same or all different.

✔ All have same color;

✔ all have same symbol;

✔ all have same number;

✔ all have different shadings.

Page 49: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

Valid set: 3 cards with values for each attribute being either all the same or all different.

✔ All have different colors;

✔ all have different symbols;

✔ all have different number;

✔ all have different shadings.

Page 50: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of Set - Rules

● Deal 12 cards;

● Find a valid set.

Page 51: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Naive way to find a set

● Search among all possible triples.

Page 52: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalization: k-value 1SET

● Input: m cards, n attributes, k values

● Question: Does there exist a valid set of k cards with all values the same or all values different?

● In the original game m=12, n=4 and k=3.

Page 53: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Hypergraph formulation

Cards = Hyper-edges

Attributes = Dimensions# of Values = size of Parts

n a t t r i b u t e s

In SET, hyperedges are allowed to overlap as long as they all overlap on the same value.

k

values

Page 54: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Connection with n-Dim. Matchingn d i m e n s i o n s

Perfect n-Dimensional Matching:Given a hypergraph H(V,E), pick k hyperedgessuch that all vertices are covered exactly once.

k

size

Page 55: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Complexity Results for k-value 1SET

● For k unbounded:

– n = 2 → P1 (find a star or a bipartite matching)

– n ≥ 3 → NP-Complete1

1. Chaudhuri et al: On the complexity of the game of set (manuscript 2003).

Page 56: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Complexity Results for k-value 1SET

● For n unbounded:

– k parameter → XP

k-value 1SET parameterized by k is W-hard

perfect n-DM parameterized by k is W-hard

(n-DM with unbounded number of possible values parameterized by both n and k is FPT)2

2. Fellows et al: Faster Fixed-Parameter Tractable Algorithms for Matching and Packing Problems (Algorithmica 2008).

Page 57: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Reduction

From k-Multicolored Clique

● Input: k-partite graph, each part of size n

● Question: Does there exist a clique of size k?

● Parameter: k

Page 58: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Reduction

From k-Multicolored Clique

● Input: k-partite graph, each part of size n

● Question: Does there exist a clique of size k?

● Parameter: k

k-Multicolored Clique is W-hard

Page 59: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Construction

The constructed multigraph:

● n·k(k-1) dimensions, in groups of size n

● k+ possible different values

k

21 2 3

Page 60: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Construction

The constructed multigraph:

● For each vertex we construct a v-hyperedge.

Example shows construction for 3rd vertex from part 1.

Page 61: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Construction

The constructed multigraph:

● For each edge we construct an e-hyperedge.

Example shows edge connecting 1st vertex of part i with 2nd vertex of part j.

Page 62: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Correctness

● For each edge eij between parts i and j, the 3 hyperedges corresponding to i, j and ij cover the respective values entirely.

Page 63: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Example

Page 64: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Corollary for k-1SET

● Constructed hyperedges cannot all overlap, unless they correspond to the same parts.

● If there exists a SET, it is also a perfect matching (and vice versa).

k-1SET parameterized by k is W-hard

Page 65: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multi-round variations

● Naive algorithm works for complete enumeration of all co-existing valid sets -without card removal.

Page 66: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multi-round variations

● However, finding the max number of disjoint valid sets -with card removal- is not easy (even for k=3).

Page 67: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multi-round variations

● However, finding the max number of disjoint valid sets -with card removal- is not easy (even for k=3).

Page 68: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multi-round variations

● Opposite goal: find the min number of valid sets that destroys all existing sets.

Page 69: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multi-round variations as hypergraph problems

Construct a 3-uniform hypergraph: vertices ↔ cards, hyperedges ↔ valid sets.

Page 70: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multi-round variations as hypergraph problems

Construct a 3-uniform hypergraph: vertices ↔ cards, hyperedges ↔ valid sets.

● max 3-value rSET: restriction of 3-Set Packing to SET hypergraphs).

● min 3-value rSET: restriction of Edge Dominating Set to SET hypergraphs).

Both restrictions remain NP-hard.min-3-rSET parameterized by r is FPTAlgorithm works for Edge Dominating Set on general 3-uniform hypergraphs.

Page 71: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A 2-player 3-value rSET Game

RULES:

● Deal m cards;

● Players take turns picking a valid set, removing selected cards;

● Game continues until there is no valid set;

● The last player to pick a valid set wins;

Page 72: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A 2-player 3-value rSET Game

RULES:

● Deal m cards;

● Players take turns picking a valid set, removing selected cards;

● Game continues until there is no valid set;

● The last player to pick a valid set wins;

Player 1 Player 2

Page 73: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A 2-player 3-value rSET Game

RULES:

● Deal m cards;

● Players take turns picking a valid set, removing selected cards;

● Game continues until there is no valid set;

● The last player to pick a valid set wins;

Player 1 Player 2

Page 74: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A 2-player 3-value rSET Game

RULES:

● Deal m cards;

● Players take turns picking a valid set, removing selected cards;

● Game continues until there is no valid set;

● The last player to pick a valid set wins;

Player 1 Player 2

Player 1 wins!

Page 75: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A similar 2 player game

ARC KAYLES: Played on a graph.● Players take turns picking edges from the graph.

● Each time an edge is picked, all neighboring edges are removed.

● The winner is the last player to pick an edge.

1

2

35

62

4

5

6

7

Which player has a winning strategy in this graph?

Page 76: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A similar 2 player game

ARC KAYLES: Played on a graph.● Players take turns picking edges from the graph.

● Each time an edge is picked, all neighboring edges are removed.

● The winner is the last player to pick an edge.

1

2

35

62

4

5

6

7P1

Page 77: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A similar 2 player game

ARC KAYLES: Played on a graph.● Players take turns picking edges from the graph.

● Each time an edge is picked, all neighboring edges are removed.

● The winner is the last player to pick an edge.

1

2

35

62

4

5

6

7P2

Page 78: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A similar 2 player game

ARC KAYLES: Played on a graph.● Players take turns picking edges from the graph.

● Each time an edge is picked, all neighboring edges are removed.

● The winner is the last player to pick an edge.

1

2

35

62

4

5

6

7P1Player 1 wins!

Page 79: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

2 player SET as ARC-KAYLES

2-player 3-value rSET is a restriction of ARC-KAYLES played in 3-uniform SET hypergraphs.

Unfortunately:

● Complexity of ARC-KAYLES on 3-uniform general hypergraphs is unknown.

● Complexity of ARC-KAYLES on graphs is unknown.

Page 80: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Facts

● Similar 2 player game NODE-KAYLES is PSPACE-C3 and AW[*]-hard when parameterized by the # of rounds r4.

● Complexity of ARC-KAYLES on general hypergraph with hyperedges of unbounded size is PSPACE-C5.

3. Schaefer: On the complexity of some two-person perfect-information games (JCSS 1978).

4. Abrahamson et al: Fixed parameter tractability and completeness IV: On completeness for W[P] and PSPACE analogues (Ann. Pure Appl. Logic 1995).

5. Daniel Grier: Deciding the Winner of an Arbitrary Finite Poset Game Is PSPACE-Complete. (ICALP (1) 2013).

Page 81: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Results

2p-3-rSET is at least as hard as ARC-KAYLES.

2p-3-rSET with parameter r (can player 1 win in at most r rounds?) is FPT.

Algorithm works on more general 3-uniform h-graphs, where each pair of vertices has unique 3rd that they all belong in the same hyperedge.

Page 82: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Conclusions – Open Problems

CONCLUSIONS:● We studied the complexity of one- and multi- round variations of

game of SET.● We established connections of the game with Multi-Dimensional

Matching, Set Packing, Edge Dominating Set, and Arc Kayles.

OPEN PROBLEMS:● Complexity of 2p 3-rSET?● Proving the hardness of ARC-KAYLES settles the complexity of

the above problem (interesting open question on its own accord). ● Parameterized complexity of ARC-KAYLES in general 3-uniform

hypergraphs parameterized by r?

Page 83: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The Game of

Joint work with Michael Lampis, Kaz Makino, and Yushi Uno

Page 84: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

UNO - Rules

Deck of cards each with 2 attributes (colors, numbers) + special cards; p ≥ 2 players;

● Players are dealt 7 cards. ● They take turns discarding cards.● Next discarded card should match the previous discarded card either in color or in number.

● If a player doesn't have a matching card, she can draw one card from a draw pile.

● First player to get rid of all her cards wins.

Page 85: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Combinatorial Model

Unbounded - Perfect information - No chance

● Card attributes: c colors, b numbers (no special cards);

● p ≥ 1 players;● Players are dealt mi cards each;● Everyone's cards are open to everyone;● If a player doesn't have a matching card, she loses the

game (no draw pile);

Page 86: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Combinatorial Model

Goal:

● Solitaire version: Get rid of all cards in hand.

● Multi-player version: First player who can't discard a card loses.

Page 87: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Graph formulation

An UNO instance can be formulated as a p-partite graph:– Cards are vertices;

– Two vertices are joined iff one can be discarded after the other;

Solitaire version ↔ Hamiltonian Path

Multiplayer version ↔ Generalized Geography

Page 88: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Hamiltonicity

Page 89: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Hamiltonicity

Page 90: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Page 91: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 92: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 93: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 94: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 95: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 96: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 97: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 98: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 99: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 100: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 101: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO as Edge-Hamiltonicity

g

b

r

y

2

3

4

5

Colors Numbers

Edge-Hamiltonian Path:

“Ordering of the edges such that consecutive edges share an common attribute.”

Page 102: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO – Results

● Bertossi 1981: The edge-Hamiltonian path problem is NP-complete => Solitaire UNO is NP-complete.

● DDHUUU 2014: Solitaire UNO with 2 attributes is in XP (parameterized by the number of colors c).

● LMMU 2014: Solitaire UNO with r attributes is FPT (parameterized by the number of colors c); when r = 2, it even admits a cubic kernel.

Page 103: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Kernelization algorithms

Given an instance of the problem, we construct (in polynomial time) an equivalent new instance with size that depends only on the parameter.

Page 104: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

Given an instance of UNO with c colors and b numbers, we construct (in polynomial time) an equivalent new instance where:– For each color, there will be at most 4c2 numbers of

that color.

– Thus, there will be at most 4c3 numbers.

Page 105: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

From an EHP SOL, we can construct an EHP SOL' where each color-group appears at most c times.

SOL: 1 5 5 3 … 2 8 8 7

Page 106: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

From an EHP SOL, we can construct an EHP SOL' where each color-group appears at most c times.

SOL':1 5 8 2 … 3 5 8 7

Page 107: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

From an EHP SOL, we can construct an EHP SOL' where each color-group appears at most c times.

SOL': … … …

At most c

At most c-1

Page 108: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

Goal (reminder): Construct an equivalent instance where for each color, there will be at most 4c2 numbers of that color.

Page 109: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers> 4c2

colors

Page 110: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers> 4c2

S

Sm

allove

rlap

N(S)g ≤ 4c

colors

Page 111: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers> 4c2

S

Sm

allove

rlap

N(S)

7

colors

Page 112: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers> 4c2

S

Sm

allove

rlap

N(S)

7

colors

Graph that contains 7 has an EHP SOL

Graph that doesn't contain 7 has an EHP SOL'.

Page 113: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers≥ 4c2

S

Sm

allove

rlap

N(S)

7

SOL':

At most c

colors

Page 114: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers≥ 4c2

S

Sm

allove

rlap

N(S)

7

SOL': 7

At most c

colors

Page 115: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers> 4c2

S

Sm

allove

rlap

N(S)

7

SOL: … 7 …

colors

Page 116: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

7

SOL: … 7 7 7 …

colors

Page 117: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

SOL: … 7 7 7 …

colors

Page 118: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

7

SOL: … 4 7 9 …

colors

Page 119: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

SOL: … 4 7 9 …

colors

Page 120: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

7

SOL: … 4 7 7 …

colors

Page 121: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

> 4c7

SOL: … 4 7 7 …

y

colors

Page 122: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

> 4c7

SOL: … 4 7 7 …

y

At most c

At most c

colors

Page 123: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

> 4c7

SOL: … 4 7 7 …

y

At most 2c

At most 2c

colors

Page 124: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

72

SOL: … 4 7 7 … 2 2

y

colors

Page 125: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Blue numbers

S

Sm

allove

rlap

N(S)

7

SOL: … 4 2 7 2 7 …

y

colors

Page 126: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

bBlue numbersS

Sm

allove

rlap

N(S)

Ø

colors

Page 127: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Sm

allove

rlap

… Blue

numbers≤ 4c2t

pg

colors

Page 128: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Solitaire UNO with 2 attributes admits a cubic kernel

b

Sm

allove

rlap

t

pg

→ At most 4c3 numbers in total.

colors

Blue numbers≤ 4c2

Page 129: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO - graph formulation

An UNO instance can be formulated as a p-partite graph:– Cards are vertices;

– Two vertices are joined iff one can be discarded after the other.

Multiplayer UNO is like playing Generalized Geography on the UNO graph.

Page 130: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography

Rules:● (Di-)Graph G(V,E), starting vertex v.

● Players take turns moving a token from vertex to vertex.

– Vertex version: Vertices cannot be visited twice;

– Edge version: Edges cannot be followed twice;

● Last player to make a move wins.

New York → Kyoto → Osaka → Athens → Sapporo

Page 131: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

Page 132: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

P1

Page 133: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

P2

Page 134: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

P1

Page 135: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

P2

Page 136: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

P1

Page 137: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Example

Player 1 wins !

Page 138: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Generalized Geography - Results

● Directed Case: PSPACE-Complete (even on Bipartite or Planar Graphs).

● Undirected Case– Vertex GG: Polynomially solvable;

– Edge GG: PSPACE-Compelte (in P when restricted to bipartite graphs).

Page 139: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO

● DDHUUU 2014: 2-player UNO is in P (by a reduction to Undirected Vertex Generalized Geography in bipartite graphs).

● M 2014: p-player UNO for p≥3 is PSPACE-complete (by a reduction from Directed Edge Generalized Geography in bipartite graphs).

Page 140: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Proof Sketch:

Directed Edge Geo on bipartite graphs ≤ Directed p-player Edge Geo on p-partite graphs ≤ p-player UNO

Page 141: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Directed p-player Edge Geo on p-partite graphs:

● p players play on their respective part (i → i+1);

● Can player 1 avoid losing no matter what the other players do?

Page 142: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Proof Sketch:

Directed Geo on bipartite graphs ≤ Directed p-player Geo on p-partite graphs

Page 143: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Proof Sketch:

Directed p-player GEO on p-partite graphs ≤ p-player UNO

● For each directed edge (x,y) belonging to player i in GEO we give (in UNO):

– player i the cards (x, xy) and (y, xy);

– to all other players j the card (j, xy). ● If v V∈ 1 is the starting node in GEO, set the starting

UNO card to be (v, e) for some edge e V∈ 1 × V2.

Page 144: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Proof Sketch:

Directed p-player GEO on p-partite graphs ≤ p-player UNO

● Since v V∈ 1 and e V∈ 1 × V2, then player 1 should pick a card (v, vu), u V∈ 2 to start the UNO game.

● This move corresponds to picking edge (v,u) in GEO.

Page 145: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Proof Sketch:

Directed p-player GEO on p-partite graphs ≤ p-player UNO

● When player i plays edge (x,y) in GEO, this will force a whole round in UNO that will finish again in player i:

– No other player (but players i-1, i) can have a card with its first attribute being x.

– Player i+1 will have to play card (i+1, xy) …

Page 146: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Multiplayer UNO is PSPACE-complete

Proof Sketch:

Directed p-player GEO on p-partite graphs ≤ p-player UNO

● When player i plays edge (x,y) in GEO, this will force a whole round in UNO that will finish again in player i.

● When the round is complete, player i+1 is free to choose the next card (that corresponds to picking the next edge in GEO).

Page 147: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Summary

We continued the work from DDHUUU 20014:● We showed that solitaire UNO parameterized

by the number of colors is FPT.– This is true even for unbounded attributes.

● We showed that multiplayer UNO for 3 or more players is PSPACE-complete.

Page 148: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Future Work

● For the multiplayer version:– Is the problem FPT if size of one attribute is a

parameter?

– Is the problem FPT if we consider a short version (up to k rounds with k being a parameter)?

– Define a more realistic model of UNO (the winner in the original game might be the loser in the current model).

Page 149: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

The game of

Joint work with Michael Lampis and Karolina Soltys

Page 150: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

A famous game...

● Word game played on a grid● Over 150 million sets sold in 121 countries

in 29 languages.

Page 151: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Scrabble Components - Rules

● 2-4 players● Board● Bag● Letters● Rack● Turn

Page 152: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Difficulty to make a turn - Intuition

Two main task:

Page 153: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Difficulty to make a turn - Intuition

Two main task:● Form a word

Page 154: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Difficulty to make a turn - Intuition

Two main task:● Form a word● Place it on the board

Page 155: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Difficulty to make a turn - Intuition

Two main task:● Form a word● Place it on the board

Page 156: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Difficulty to make a turn - Intuition

Two main task:● Form a word● Place it on the board

Both tasks contribute independently to the hardness of the problem.

Page 157: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Our Model

● Generalized version (unbounded board)● Deterministic, full-information● Made-up language● No special squares on the board● All tiles worth the same amount of points

Page 158: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Our Results

● Deterministic generalized version of Scrabble is PSPACE-Complete

● Hardness comes from two different aspects of the game:

– Formation

– Placement

● Game is hard even for constant-size alphabet, word, rack.

● 1-player version is NP-Complete

Page 159: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Future Work

● Find the minimum alphabet size for which the problem becomes hard;

● Prove that Scrabble is PSPACE-Complete for the English dictionary;

● Study the randomized version of the game.

Page 160: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Conclusions

● We studied four games and puzzles and showed hardness and algorithmic results.

● We established that three of them have interesting connections with well-know combinatorial problems.

● Our results progressed the state of the art for some of these problems (Multi-dimensional Matching, Edge-Dominating Set, Edge-hamiltonian Path).

Page 161: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Future QuestionsConcrete problems:

● Study the complexity of different games (complexity of Connect 4?)

● Study other games connected to problems (complexity of Flow?)

Page 162: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover

Future QuestionsMore general questions:

● Define multiplayer models in a more realistic way so that players can be selfish.

● Allow chance and imperfect information.

Page 163: The Computational Complexity of Games and Puzzles · The Computational Complexity of Games and Puzzles ... The Ferry Cover Problem LM 2007: ... Vertex Cover is easy but Ferry Cover