Challenge Problem in Algorithms and Data Structures

Analyzing a Game Tree

Revised November 22, 2005.

The purpose of these problems is to provide a challenge to the top students, meaning those who master the regular material of the course and would like to learn more.
Do not try to work these problem to improve a poor grade ... if you are doing badly in the course, concentrate on the regular material. Given a game graph G, let value(x) be defined as follows:
  1. If x is a node, and if red has a strategy which guarantees that, starting from x, he will win at least V, then value(x) is greater than or equal to V.
  2. If x is a node, and if black has a strategy which guarantees that, starting from x, red will win at most V, then value(x) is less than or equal to V.

Here is the assignment:

Ideally, your algorithm runs in O(n) time, but that may not be possible. (I am not reavealing the answer.)
If G is acyclic, there is a simple O(n) time bottom-up dynamic programming algorithm to solve G.
If there are cycles, the problem is harder.
Note that your algorithm could, theoretically, be used to find a perfect strategy for either player for Chess. The problem with this plan is practical: in the case of Chess, the number of nodes of G far exceeds the number of atoms in the known universe, multiplied by the number of nanoseconds in the (currently estimated) lifetime of the universe; which means that if you could turn every atom in the known universe into a gigaflop computer, you still couldn't traverse G in the estimated lifetime of the universe.

Warning!

While showing that website to a student during my office hours, we discovered that the computation of value in the Tic-tac-toe game tree made by Yosen Lin is incorrect. Yosen hopes to fix the page this weekend (December 2-4, 2005).