Tag Archives: Difficulty 8

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.

Protected: Generalized Hex

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

Protected: Equilibrium Point

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

Protected: Permanent Evaluation

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

Protected: Cosine Product Integration

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

Protected: Periodic Solution Recurrence Relation

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

Protected: Number of Roots for a Product Polynomial

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

Protected: Root of Modulus 1

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

Protected: Non-Divisibility of a Product Polynomial

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