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.

Alternating Maximum Weighted Matching

This is a “private communication” problem I haven’t been able to solve or find an actual reduction for.  I think I have the start of a reduction, though, but I haven’t put in the time to work out the details.  Hopefully, I’m on the right track.

The problem: Alternating Maximum Weighted Matching.  This is problem GP8 in the appendix.

The description: Given a weighted graph G=(V,E), with positive weights, and a positive bound B, each player chooses an edge from E.  No two chosen edges can share an endpoint.  Player 1 wins if the weights of the edges chosen ever exceed B.  Does player 1 have a forced win?

Example: Here’s a graph:

If B=11, and it’s player 1’s turn, then they can’t remove the highest-cost edge (d,e) because every edge is incident on d or e, so player 2 would have no moves, and the game would end with cost 10.

If player 1 removes one of the 6-cost edges (let’s say (a,d)) we’re left with:

..and so player 2 will have to take one of the remaining 6-cost edges, bringing the total cost of edges removed to 12.

Reduction (sort of): So, like I said at the top, the reference in G&J is to a “private communication” by Dobkin and Ladner.  I couldn’t find the actual result published anywhere.  I actually emailed both Dobkin and Ladner to ask if they remembered what the reduction was, but their response (reasonably) was “It’s been 40 years, I have no idea”.

But, I thought about it for a little while, at least, and came up with what I thought are the beginnings of an idea.  I didn’t have the time (or, perhaps, the ability) to get all of the details right, but this feels like a start, at least:

We’re going to reduce from One in Three 3SAT.  Each variable will be represented as a pair of vertices xi and xia, connected by a weight 1 edge.  The negation of the variable (~xi and ~xia) will also be vertices and also connected by a weight 1 edge.  The vertices xi and ~xi will be connected by a “large” edge of weight 10.

From each clause, we build up a component of a graph that looks like this:

The weights of 10 and 1 might not be right, think of them as “large” and “small” weights.  Each of the xi variables corresponds to the actual variables in the formula, we only include the variables that correspond to the clause we’re looking at.

(One thing I did wrong was to assume that player 1 loses if the edge cost goes over B.  So in what follows, player 1 is trying to keep the score low.  We can fix this by making it player 2’s turn and swapping the roles)

The idea is that player 1 will choose either the x1-x1a edge or the ~x1-~x1a edge to “fix” the value of the first variable.  If the variable shows up in the clause (for example, they chose the x1-x1a edge in the diagram above), this will eliminate the edges (x1a,c1), (x1a, x2a), and (x1a, x3a) from being able to be chosen.

Then player 2 will want to choose an “expensive” edge.  He’ll choose the edge (x2a,x3a)

Then we’ll move on to the next variable.  It’s again player 1’s turn to decide on a setting of x2.

The idea is that each clause will have it’s “ci” vertex connect to that central “home” vertex by an expensive edge, so if after all of the variables have been given their values, there still is an edge to the home vertex, it will be chosen, and that amount will be the amount that sends the total cost over the bound.  (So right now, I’m thinking of the bound being something like 11*N +1 for a problem with N variables, at least until the extra things below get added).

What still needs to be done is the detail work (and probably extra edges and vertices) to ensure that players have to choose the edges in the order I specify (i.e., not doing so loses a player the game immediately).  It’s entirely possible that doing so will make this whole construction wrong.  But I like the idea behind it, at least

Difficulty: N/A.  I don’t want to call this a 10, even though it stumped me.  I think if my idea is right, it’s not that hard.

Alternating Hitting Set

I think this might be the last of the problems we do from the Schaefer paper we’ve used so much recently.

The problem: Alternating Hitting Set.  This is problem GP7 in the appendix.

The description: Given some universe set B, and a collection C of subsets of B.  Players take turns choosing an element from B.  Once enough elements are chosen to make all sets in C have at least one element chosen, the player who made that move loses.  Does player 1 have a forced win?

Example: Let B= {1,2,3}, and C = {{1,2,3}, {2,3}, {1,3}, {1,2}}.  Player 1 can win by choosing 1, which hits all sets in C except {2,3}.  Since player 2 has to pick either a 2 or 3, they will hit that set and lose.

Reduction: Schaefer remarks that this is just a special case of Variable Partition Truth Assignment. with sets instead of variables.  Here’s how that goes:

Suppose we have an instance of Variable Partition Truth Assignment, so a CNF formula with all positive variables.  We just create a set B with one element per variable, and the clauses become the sets in C.  Then picking an element of B is the same as setting a variable to true.  Hitting a set in C is the same as making the clause true.

Difficulty: 3.  Maybe this problem is close enough to Variable Partition Truth Assignment that it didn’t need its own article.  On the other hand, it’s nice to see an easy reduction for once.

 

Sift

Finally, we’re ready to go back to the problem in the appendix.

The problem: Sift.  This is problem GP6 in the appendix.

The description: Suppose we have some set X, with collections of subsets of X A and B.  The sets A and B have no elements in common.  Players take turns choosing elements from X until every subset in A (in which case player 2 wins) or every subset in B has a chosen element (in which case player 1 wins).

We do need to have a rule for what happens if an element is chosen that makes both players lose (because the element chosen intersects with the last subsets in both A and B).  In this case, the player who made the move loses.

Example: Suppose X was {1,2,3,4,5,6}.  A = {{1,2}, {3,4}, {5,6}} and B = {{1,2,3}, {4,5,6}}.  Then A could force a win by choosing element 3.  This intersects the second set in A, and the second set in B.  So the current “live” subsets are:

A = {{1,2}, {5,6}}

B = {{1,2,3}}

Player B needs to pick 5 or 6, or they immediately lose.  But once that happens, player A can choose 3, which means the set of elements chosen {3,4,5} (or {3,4,6}) intersects with every set in B, but not every set in A, so A wins.

Reduction: The Shaefer paper reduces from Avoidance Truth Assignment, which means we start with a CNF formula with no negated literals.  Let’s assume the formula has m clauses and n variables.  For each clause k define the set Sk to be the indices of the variables in clause k.   (So if clause 1 was: x∨ x4 ∨ x7, then S1 = {2,4,7}).  Let “Set 1” = all of the Sk sets of even length, and “Set 2” = all of the Sk sets of odd length.  If n is even, give player 1 “Set 1” and player 2 “Set 2”.  If n is odd, reverse the allocation.

Notice that “Set 1” is the set of all clauses with an even number of distinct variables in them, and “Set 2” is the set of all clauses with an odd number of distinct variables in them.  Recall from our discussion of the Avoidance Truth Assignment problem that the player whose turn it was could win that game if we had an even number of unplayed variables, and an odd number of unplayed variables in every clause  (or an odd number of unplayed variables, with an even number in every clause).  What our “Set 1” and “Set 2” constructions are doing is listing out those clauses and assigning them to each player.  Once one set runs out, then we have the winning case for one of the 2 players.  So this construction of Sift is equivalent to the original Avoidance problem.

Difficulty: 8.  I wish there was a good proof of this odd/even claim he makes.  I don’t 100% buy his intuitive argument.

Avoidance Truth Assignment

This is the second of the two proofs in Schaefer’s paper that will get us the Sift reduction.

The problem: Avoidance Truth Assignment.  (My name for it).  This problem does not appear in the G&J appendix.  It is named “Gavoid (POS CNF)” in Schaefer’s paper.

The description: Given a CNF formula with no negated literals (and not necessarily 3 literals per clause), players take turns choosing a variable to make true.  A player loses if after their play the formula becomes true, even if all unchosen variables are set to false.  Does player 1 have a forced win?

Example: Suppose the formula was (x1 ∨ x2) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3 ∨ x4).  Then player 1 could force a win by choosing x2, which makes clauses 1 and 3 true.  The player who chooses x3 will lose, so player 2 should pick one of x2 or x4.  But then player 1 chooses the other, leaving player 2 forced to pick x3, making the second clause (and the whole formula) true.

Reduction: Schaefer reduces from Pre-Partitioned Truth Assignment.  So we start with a logical formula given as a set of clauses, and the variables are partitioned into two sets, one for each player.  We’ll call player 1’s variables x1 .. xn and player 2’s variables y1 through yn.   We’ll assume (or modify the formula to make it happen) that each clause contains at least one x variable, and that every variable occurs both positively and negatively as a literal someplace in the formula.

Our new formula will have:

  • 4 copies of each variable (xi turns into xi, ~xi, xi‘, and ~xi
  • One clause (xi ∨ ~xi) for each x variable
  • One clause (yi ∨ ~yi ∨ yi‘) for each y variable
  • For each clause in the original formula: if it contains an unnegated variable xi (or yi), then our new clause will contain xi and xi‘.  (Or yi and yi‘).  If it contains a negated literal, we’ll use the 2 “negated” variables instead.  This clause will probably have more than 3 elements in it, but that’s ok.

Shaefer notes that if we hit a point in the game where we have:

  1. An even number of unplayed variables, and
  2. An odd number of unplayed distinct variables remaining in every clause.

or:

  1. An odd number of unplayed variables, and
  2. An even number of unplayed distinct variables remaining in every clause

..then the player who’s turn it is can win by picking some unsatisfied clause and picking any variable that does not satisfy it.  So the strategy for the first player is to create the first situation (by satisfying all clauses with an even number of variables), and the strategy for the second player is to create the second situation (by satisfying all clauses with an odd number of variables).  Since the first kind of clause we made (with the x variables) has an even number of variables, player 1 will want to satisfy those clauses as fast as possible.  Similarly, since the second kind of clause we made (with the y variables) has an odd number of variables, palyer 2 will want to satisfy those clauses as quickly as possible.  If this happens, we are exactly imitating the Pre-Partitioned Truth Assignment game.

The remainder of the reduction is a detailed proof explaining the above argument in detail (showing, for example, what happens when players do not play this way).

Difficulty: 8  Maybe they’re getting a little easier for me because I’ve been doing so much of them.  Or maybe because I’m still skipping all of the low-level details.

Pre-Partitioned Truth Assignment

The next game in the appendix is “Sift”, but the Schaefer paper we’ve been using has that reduction depend on two other problems, so we’ll do those first.   Schaefer calls this problem “G%free(CNF)”, I made up the name we’re using.

The problem: Pre-Partitioned Truth Assignment.  This problem is not in the appendix.

The description: Given a CNF formula A, where the variables in A are partitioned into two equal size sets, V1 and V2.   On player 1’s turn player 1 chooses a variable in V1 and chooses to make it true or false,  On player 2’s turn, player 2 chooses a variable in V2 and chooses to make it true or false.  Player 1 wins if the variable assignments made by both players make A true.  Does A have a forced win?

Example: Here’s the equation from last time: {(x1 ∨ x2 ∨ x3), (~x1 ∨~x2∨ ~x3), (~x4, x1, ~x2)}  Lets say that V1 = {x1, x2} and V2 = {x3. x4}.  Then player 1 can force a win by setting x2 to false on their first turn, making the second and third clauses true.  Since player 2 can only set x3 or x4 on their turn, they can’t stop player 1 from setting x1 to true on their next turn, making all clauses true.

Here’s another example where player 1 loses: {(x1  ∨ x3 ∨ x4), (~x1 ∨ x3 ∨ x4), (x2 ∨ ~x3 ∨ ~x4).  If we again have  V1 = {x1, x2} and V2 = {x3. x4}, then player 2 wins by setting both x3 and x4 to false because no matter what player 1 does, they have to set x1 somehow, which will make one of the first two clauses false.

Reduction: (This problem is Theorem 3.8 in Schaefer’s paper).  Just like in most of the reductions in the Schaefer paper, we start with an instance of QBF where we have variables x1 through xn (n is assumed to be even), and the formula alternates with “There exists” (starting with x1, on all of the odd-numbered variables up through xn-1) and “For all” (starting with x2, on all of the even-numbered variables up through xn) quantifiers on the variables, leading into a CNF formula A0.  We need to build up an instance of Pre-Partitioned Truth Assignment by creating a new formula A’ and the variable sets V1 and V2.  For each variable in the QBF formula xi, our formula has 3 variables: xi, yi, and zi.  V1 holds xi, yi, and zi+1 when i is odd, and V2 holds xi, yi, and zi-1 if  i is even.

The formula is pretty complicated but is built to force zi to be set by one player to the same value of either xi or yi by the other player (and so must be set after the corresponding xi or yi is chosen).  The optimal move will be to play zi immediately after the corresponding xi or yi, forcing the choice back on the other player.  So that player will play the other of xi or yi (rather than open up some other variable’s x or y, only to be responded with by the corresponding z).   Then it will be the other player’s turn to choose the next xi+1 or yi+1.

The values of xi correspond to the literals in the original QBF formula, so assuming players play “correctly”, player 1 takes the role of the “there exists” player in the QBF formula, and player 2 takes the role of the “for all” player in the formula.  And if there is a way to set the x variables in the new formula to make it satisfiable, then there is a way to make the original QBF formula satisfiable.

Difficulty: 9.  For this problem, even Schaefer admits the proof is hard to follow, so he spends a page explaining what the goal of the construction is before diving into the proof.  I do like the reappearance of the “triples” of moves where a meaningful decision by a player is followed by 2 forced moves, making the next meaningful decision be placed on the other player.

Variable Partition Truth Assignment

We’re going to dive into a couple of logic games for the next couple of posts before we come out with I think of as more “game-like” games.

The problem: Variable Partition Truth Assignment.  This is problem GP5 in the appendix.

The description: Given a set U of variables, and a set C of clauses over U, players play a game where they alternate choosing variables from U.  The variables Player 1 chooses will be set true, and the variables Player 2 chooses will be set to false.  Player 1 wins if all clauses in C are satisfied.  Can player 1 force a win?

Example: Here is a small example: The clauses will be: {(x1 ∨ x2 ∨ x3), (~x1 ∨~x2∨ ~x3), (~x4, x1, ~x2)}

Player 1 can force a win by choosing x1, which will be set to true.  This satisfies both clauses 1 and 3.  Player 2 does not want to choose x2 or x3 (since any variable player 2 chooses will be set to false, making clause 2 true), so they’ll choose x4.  Then player 1 picks either of x2 or x3 (clause 2 is still not satisfied, because the variable must be set to true by player 1), then player 2 must set the other one to false, satisfying clause 2.

Reduction: The paper by Schaefer that we’ve been going through calls this “GPOS (POS CNF)” and focuses on the subcase where we’re given a formula where all of the variables are positive.  If even that case is NP-Complete, then the generalized case where we allow negated literals is also NP-Complete.  The reduction in the paper is from Sequential Truth Assignment, specifically the case where the problem has 3 variables per clause.  So we’re given an input that is a set of 2n variables, which we can view as alternating between ∃ and ∀, and a set of m clauses with at most 3 literals per clause.  We’re going to build a new formula A’ out of many pieces.  The variables are all positive, but some of the variable names will correspond to negated literals.  We’ll have 2n “x” variables, 2n “~x” variables, and 2n “u” variables.  He then builds up a pretty crazy formula.  The point of the formula is to force a 6-move sequence between the players:

  • On move 6k+1 (so the first move of “round” k), player 1 chooses either x2n-2k or ~x2n-2k to become true.
  • The next move, player 2 chooses the other of that pair to become false.
  • The next move, player 1 chooses u2n-2k to become true
  • On moves 6k+4 through 6k+6, we repeat the same sequence, but this time, player 2 can choose whether to make x2n-2k-1 or ~x2n-2k-1 false.  Then we end with player 2 choosing u2n-2k-1 to become false.

Notice how each set of 3 moves corresponds to one truth assignment of one variable in the Sequential Truth Assignment game (which alternates between player 1 and player 2 choosing the assignment).  Also, notice how player 1 choosing a variable xi corresponds to setting it true in the Sequential Truth Assignment game, and player 1 choosing a ~xi variable to be set to true corresponds to making the corresponding Sequential Truth Assignment variable false. (The opposite assignments occur when player 2 chooses)

The hard part of the proof (and of the formula) involves all of the various ways the other player can force a win if the sequence above is not followed.

Difficulty: 9.  The formula in the paper is very hard to follow, which is why I didn’t go into it here- I think the important part is how it all works out.  Since I couldn’t think of a way to explain it without going on for pages, I figured just explaining the idea was a better strategy.

Generalized Kayles

I hadn’t heard of this game before encountering this problem.  It sort of feels a lot like Nim to me.

The problem: Generalized Kayles.  This is problem GP3 in the appendix.

The description: Given a graph G=(V,E). Players take turns removing vertices and all vertices adjacent to it from the graph.  The first player to have no vertices left loses.

Example: Here’s a graph:

Suppose player 1 chooses vertex c.  Then we also remove s,b, d, and t.  All that is left are vertices a and e.  Whichever vertex player 2 chooses, player 1 can choose the other one, and win.

Reduction: This one is again by Schaefer, and again uses the same problem which is either Sequential Truth Assignment or QBF, depending on how you look at it.

Just like last time, we’re given a formula: (∃ x1) (∀ x2) (∃ x3) … (∃ xn) (A1 ∧ A2 ∧ … Am), where each Ai is a disjunction of literals.  We’ll further assume n is odd (so the last quantifier is ∃).  The graph is built as follows:

  • Each clause k in the formula gets a vertex x0,k.  These vertices are all connected to each other.
  • Each variable xi in the formula gets two vertices: xi and ~xi, that have an edge between them. We also get y vertices: yi,j for all j 0 <= j < i
  • We add an edge between xi and x0,k if xi appears as a literal in clause k.  Similarly, we add an edge between ~xi and x0,k if ~xi appears as a literal in clause k.
  • Each yi,j vertex connects to all xk vertices where k <= i.  Each yi,j vertex also connects to all ya,b vertices where a < i and b < a.

Here’s a picture from the paper of what we get:

One main point that comes out of this construction is that players need to take their first n moves playing the x (or ~x) vertices in order.  If you go out of order, the opponent can play a y vertex and remove everything.  If you play a y vertex, the opponent can play an x vertex (or an x0 vertex) and remove everything.

If the original formula was satisfiable, player 1 (who is the ∃ player) starts by choosing either x1 or ~x1.  No matter which of x2 or ~x2 is chosen by the opponent (the ∀ player), player3 will have a way to set x3 to keep the formula satisfiable.  This process continues for all variables.  Once player 1 plays the last variable (xn or ~xn), all vertices have been removed from the graph- most importantly, all of the x0 vertices have been removed, because there is an edge from each one to each variable whose setting would satisfy the clause.  Thus, player 2 has no place to play, and player 1 wins.

If the formula is not satisfiable, then after taking turns choosing xi or ~xi for all i, there is still some x0 vertex in the graph (corresponding to a clause not satisfied by the variable choices made).  Player 2 can select that vertex, removing all x0 vertices from the graph, and will win.

Difficulty: 7.  I can see what the “jobs” of each vertex are: The xi  set the truth values of a variable, the x0 ensure that each clause is satisfied by a variable setting, and the y vertices are there to force players to choose the xi vertices in order.  I don’t think I could have come up with this though.

 

Generalized Geography

It’s spring break here- I was expecting to take the week off, but got this post done anyway.  This might mean I skip next week though.

The problem: Generalized Geography.  This is problem GP2 in the appendix.

The description: Given a directed graph G=(V,A) and a starting vertex vo.  Players alternate choosing edges that leave the current vertex (starting with v0.  The next current vertex is the one at the end of the edge leaving from vo.  You can’t choose an edge that is already chosen.  The first player to be unable to choose an edge loses.  Does Player 1 have a forced win?

Example: This is the “geography” game kids play in the car, where you have to think of a place that has as its first letter the last letter of the previous choice.  As a graph problem, vertices correspond to letters, and edges to locations:

Note that the vertices can have self-loops, and (at least in the actual game) could have multiple edges between pairs of vertices.  There is no requirement to have any edges leave a vertex either- I remember instituting the “Phoenix rule”  on car trips because nobody could think of a place that started with X.

Anyway, if we start at E, player 1 has a forced win- they have to take “Egypt” to T, and then player 2 has to take “Texas” to S, and if player 1 chooses “Singapore” we’re in vertex E, it’s player 2’s turn, and they have no place left to pick.  (The actual game has many more edges, of course)

Reduction:  Schaefer says he’s building off of the Sequential Truth Assignment problem from last time, but his instance looks more like an instance of QBF. (I think this is a result of his claim that they’re basically the same problem).  So we’re given a formula: (∃ x1) (∀ x2) (∃ x3) … (∃ xn) (A1 ∧ A2 ∧ … Am), where each Ai is a disjunction of literals.  We’ll further assume n is odd (so the last quantifier is ∃)

We then go on to build a graph.  Each positive and negative literal gets a vertex.  Each variable x1 gets 4 vertices in the graph:

  • xi corresponding to a positive literal
  • ~xi corresponding to a negative literal
  • 2 vertices u and v that control the “entrance” and “exit” for the setting of one of the 2 literal values.

We have a vertex for each clause (yi), and an additional vertex un+1 so the last vi has someplace to go.

Each set of these 4 vertices are set up in a diamond, with edges from ui to both xi and ~xi, and then from both of those to vi. vi then connects to ui+1, making a chain of diamonds. The final un+1 connects to each y vertex, and each y vertex connects to the literals that are in its clause.

Here’s the example picture from the paper:

Player 1 starts on vertex u1. The player chooses whether to make variable x1 positive or negative by going to that vertex (simulating a “there exists”), and player 2 has no choice but to move on to the v1 vertex, and player 1 has no choice to move to the next u2 (simulating a “for all”). This alternating process continues until we hit vertex un+1.  Since there are an odd number of variables, it is now player 2’s turn.

If the setting of the variables has not satisfied some clause, player 2 can move to the y vertex of that unsatisfied clause.  Then player 1 has to go to one of the 3 literals that appear in that clause.  Since the clause was not satisfied, all of these variables have not been chosen, so the edge from that literal to the v vertex is available for player 2 to pick.  But after that, the vertex from the v vertex to the next u vertex has already been chosen, so player 1 loses.

If the setting of the variables has satisfied every clause, then player 2 has to pick a move to a y vertex that has a literal chosen by a player to satisfy it. When player 1 moves to that vertex, the only edge exiting that vertex has already been chosen, so player 2 loses.

Difficulty: 7. I think this is very slick and elegant, but I don’t see a student getting there without lots of help.

Sequential Truth Assignment

A whole bunch of the proofs in this section are done in the same paper and mainly use this problem.  So we’ll go out of order here- but really this is a restatement of the QBF problem from a couple of weeks ago.

The problem: Sequential Truth Assignment.  This is problem GP4 in the appendix.

The description: Given a set of variables and a collection of clauses (like a Satisfiability instance), players take turns giving truth assignments to sequential variables.  Player 1 wins if and only if all clauses are satisfied.  Does player 1 have a forced win?

Example: (x1 ∨ x2 ∨ x3) ∧ (~x1 ∨ ~x2 ∨ ~x3) ∧ (x1 ∨ ~x2 ∨ x3).

Player 1 can win by choosing x1 = true, which satisfies both the first and third clauses.  Then layer 2 has to set x2, so should set it to true (otherwise clause 2 is automatically satisfied). but player 1 then set x3 to false satisfying the second clause.

Reduction: The paper by Shaefer that has many of the reductions we’ll be doing in this section refers to the paper by Stockmeyer and Meyer that showed how QBF was NP-Complete (or worse- you might want to check out the comments of the QBF problem for a discussion) defined a formula Bk to be a formula on k sets of variables, with sets alternating between “For All” and “There Exists”.  Schaefer points out that if you allow players to assign values to these sets of variables (instead of one at a time, like our problem describes), then player 1 is the “There Exists” player and player 2 is the “For All” player, and you have basically the same problem.

To get to our “one variable at a time” version of the problem, we need to build a problem instance with one variable per set.   We can start with an instance of 3SAT and since the variables are set sequentially, we set up the quantifiers to be ∃ x1 ∀ x2 ∃ x3, and so on.

Difficulty: 5. I think it depends on how hard you see the intermediate step of going from QBF to the alternating of setting groups of variables.  Knowing you have to break the reduction into 2 steps is a bit hard as well.