Graph Theory37 sections · 1633 units
Open in Course

Problem - Coin Game on DAG (Part 2)

(Losing position rule)

Vertices with no outgoing edges are losing positions. The player whose turn it is at such a vertex cannot move and loses. At a vertex with outgoing edges, check all neighbors. If any neighbor is a losing position, the current vertex is winning.

Move to that losing position and force your opponent to lose. If all neighbors are winning positions, the current vertex is losing. Every move you make gives your opponent a winning position.