Reduction: 3SAT → 3D Matching

Consider the following set of four triples, each represented by a triangular node joining a boy, girl, and pet:

The two boys b0,b1b_0, b_1 and the two girls g0,g1g_0, g_1 are not involved in any other triples. The any matching must contain either the two triples (b0,g1,p0),(b1,g0,p2)(b_0, g_1, p_0), (b_1, g_0, p_2) or the two triples (b0,g0,p1),(b1,g1,p3)(b_0, g_0, p_1), (b_1, g_1, p_3). Therefore the “gadget” has two possible states.

So therefore if we want to transform an instance of 3SAT to one of 3D MATCHING, we start by creating a copy of the gadget for each variable xx. Call the resulting nodes px1,bx0,gx1p_{x_1}, b_{x_0}, g_{x_1} and so on, the intended interpretation is boy bx0b_{x0} is matched with girl gx1g_{x1} if x=truex = true, and with girl gx0g_{x0} if x=falsex = false

Then we create triples that mimic clauses, for each clause (say c=(xyˉz)c = (x \vee \bar{y} \vee z), introduce a new boy bcb_c and a new girl gcg_c, they will be involved in three triples, one for each literal in the clause, and the pets in three triples must reflect the three ways where the clause can be satisfied

  1. x=truex = true
    1. Have triple (bc,gc,px1)(b_c, g_c, p_{x1})
    1. If px1p_{x1} is taken, then the possible assignment of the gadget representing xx is only TRUE
    1. If xx is false, then px1,px3p_{x1}, p_{x3} is taken, and gcg_c and bcb_c cannot be accommodated with this triplet
  1. y=falsey = false
  1. z=truez = true

We need to make sure that every occurrence of a literal in a clause cc there is a different pet to match with bcb_c and gcg_c.

By an earlier reduction we can assume that no literal appears more than twice, so each variable gadget has enough pets, two for negated occurrences and two for unnegated.

Complete?

One last problem remained: