Tag Archives: Difficulty 7

NxN Go

Similar to the last problem from the appendix in that we’re taking an actual game and extending it.

The problem: NxN Go.  This is problem GP10 in the appendix.

The description: Given an integer N, and a position (consisting of black piece locations, white piece locations, and black piece locations) on an NxN go board, and the name of the current player’s turn, does white have a forced win on the game?

Example: Instead of a true example, what I think is most relevant here is a little discussion of the rules and basic strategy of Go.  In Go, players take turns playing stones on a grid, with the goal of surrounding spaces on the board with pieces of your color:

(all pictures are taken from the tutorial at https://www.pandanet.co.jp/English/learning_go/learning_go_2.html):

In this case, white has surrounded 9 spaces (stones are placed at intersections, including the edges of the board).

If a stone of the other color can be surrounded on all 4 sides by a stone of your color, the stone is captured, scoring you a point at the end of the game:

In this case, the black play at “1” captures the white piece (and likely gains black an additional point for having surrounded territory at the end of the game)

More than one piece can be surrounded at a time, but not all configurations of stones can be surrounded.  Most notably, a configuration with two “eyes” (or empty holes)  cannot be captured, for example:

Here, the white play at “1” creates two eyes.  There is no way for black to surround all of the white pieces since they would have to play in both empty holes, and as soon as black plays in one of the holes, the black piece is surrounded and immediately captured.

So, the main goal of Go (and the proof) revolves around creating “safe” structures that contain two eyes and using them to capture as much territory as possible.

Reduction: The paper by Lichtenstein and Sipser reduce from Planar Geography.  The idea is to have a set of safe territory for White, and another threatened set of stones large enough that if it can be made safe, White will win, but if it can be captured, Black will win.  Here’s the picture from the paper:

Black pieces surround white all the way around, so the only escape would be for white to extend the “pipe” on the left around to the safe white spaces (or some other group of two eyes, which will keep the large group alive).  Then we encode the vertices and edges in the graph as sets of stones, where each “choice” of going through an edge is reflected by a choice of where stones are placed.

There are many types of subgraphs and corresponding board positions in the paper, here’s just one of them:

(Graph position)

(Board position)

Here’s the general structure of the arguments that show how the play “has” to go through this vertex.  Suppose we are coming from the top, and white wants to go left.

  • If White doesn’t play at 1, 2, or 3 first, Black will play at 2.  White will now have to play at 1 to keep the middle vertical strip (which connects back to the big threatened set of pieces) alive.  But then Black plays at 3 and takes them all anyway.
  • Even if White plays at 3, Black wins by playing at 1, then White moves to 2, then Black plays at 5
  • If White does play at 1 or 2, (let’s say 1, because that will take us left), Black has to respond at the other point (so, 2 for us).  If they don’t, White plays at 2, and 3 black stones below the 1 and 2 are captured, and White will be able to connect to the two eye group below.
  • After Black plays at 2, white needs to go to 3 to build a line of white stones coming in from the top, and going out to the left.  Black plays at 4 to stop white from connecting to the group of 2 eyes on the left.

As a result, the “edge” going through this vertex and coming out to the left has been chosen.

Difficulty: 7. I think this is easier to see than the NxN checkers reduction, but still takes a lot of cases and structures to realize.

Annihilation

I’m going to be out of town for a few weeks, so the next few posts might be delayed from my already slower schedule.

The problem: Annihilation.  This is problem GP9 in the appendix.

The description: G&J’s description is a little obscure, so we’ll go with the one in the paper by Fraenkel and Yesha that has the reduction.

Given a directed graph G=(V, E), and r subsets of E, E1 through Er.  The subsets may not be disjoint, but each edge of E is in at least one subset.

We’re also given r different types of tokens, placed on vertices of the graph.  Each token type corresponds to one of the r subsets of E.  A player moves by taking a token (of type i) and choosing an edge (u,v) in set Ei, where u is the current position of the token.  The token is moved to vertex v in the graph.  If 2 tokens ever meet on the same vertex, both are “annihilated” and removed from the game.  A player loses if they cannot make a move.  Does player 1 have a forced win?  (Though note that the Fraenkel and Yesha paper actually proves whether player 2 has a forced win)

Example: Here is a simple example that will hopefully be useful in the reduction that follows:

In this graph, the red edges are in E1 and the blue edges are in E2.  The red vertices currently hold a type 1 token, and the blue vertex holds a type 2 token.

If player 1 makes any move except moving the token on g to the vertex h, player 2 will be able to move a red and a blue token onto the same space, annihilating both.  Then there will be just 2 moves left in the game (the 2 remaining red pieces moving along their edges), the first moved by player 1, the second moved by player 2, then player 1 will have no move and will lose.

If player 1 moves from g->h, then there are 4 more moves in the game (the h->i edge, and the three red edges).  Thus, player 1 will get the last move and will win.

Reduction: Fraenkel and Yesha use Minimum Cover.  I’ll note again here that he reduction will show that the Cover instance is true if and only if player two has a forced win.

So we’re given a collection of sets Si where i goes from 1 to m, and an integer K.  We’re going to build a directed acyclic bipartite graph R= (V, E):

  • The graph has vertices xi and yi for i from 1 to K.
  • The graph has one vertex for each set Si and one vertex for each element ei in the union of the sets.
  • The graph also has two “special” vertices a and b.
  • “Type 1” edges go from all xi to its corresponding yi, and from each yi to all Si vertices.
  • “Type 2” edges go from a to all ei vertices, from all ei vertices to all set vertices that contain that element, between all e and x vertices, and from all x and S vertices to b.
  • Type 1 pieces start on all x vertices.  There is 1 type 2 piece, and it’s on a.

Here is the example used in the paper for the covering problem {{e1,e2}, {e2,e3}, {e3,e4}, {e1,e3,e5}, {e6}} and K=4:

An arrow going to a circled group of vertices represents a group of edges going to all vertices in the group.

Notice that without annihilation, the path a type 1 piece takes is from some x vertex to its y vertex, and from there to some S vertex (2 moves), and the path of the type 2 piece is 3 moves (either a->some e-> some x ->b or a->some e->some S ->b), so there is an odd number of moves, and thus player 1 wins if no annihilations happen.  Player 2 wins if a type 1 and type 2 piece collide someplace (on an x or S vertex).

This is because if 2 pieces of different types collide, we remove an odd number of moves from the game:

  • If they collide on an x vertex, we remove the 2 moves the type 1 piece can make, and the move the type 2 piece could make from x->b
  • If they collide on an S vertex, we remove the one move the type 2 piece makes from S->b

On player 1’s move, they will have to move all pieces off of the x vertices before moving the type 2 token off of the a vertex.  Otherwise, after player 1 moves a->e, player 2 can move e->x (to some x that hasn’t left its starting space yet).

So,  player 1 starts by moving some xi->yi.  Player 2 will move the piece from yi to the next set in the cover.  Recall that there are k different x and y vertices.  So what will happen is that the k vertices that comprise the cover will have tokens on them.

Once all of the type 1 pieces are some S vertex, player 1 will have to move the type 2 piece from a to some e vertex.  If there is a cover, no matter what e vertex player 1 chooses, player 2 will be able to move the token to an S vertex that contains that e element.  If there is no cover, player 1 will be able to choose an e vertex that has no e->S (or e->x) move that causes an annihilation, and player 1 will win.

Difficulty: 7.  This is a very cool reduction, and you can see from the picture how it works.  It’s fun to see how all of the edges and sets work out.

Protected: Generalized Kayles

This content is password protected. To view it please enter your password below:

Protected: Generalized Geography

This content is password protected. To view it please enter your password below:

Protected: Simultaneous Divisibility of Linear Polynomials

This content is password protected. To view it please enter your password below:

Protected: Simultaneous Incongruences

This content is password protected. To view it please enter your password below:

Protected: Integer Knapsack

This content is password protected. To view it please enter your password below:

Protected: Resource Constrained Scheduling

This content is password protected. To view it please enter your password below:

Protected: Single Execution Time Scheduling With Variable Number of Processors

This content is password protected. To view it please enter your password below:

Protected: Sequencing With Deadlines and Setup Times

This content is password protected. To view it please enter your password below: