-
Notifications
You must be signed in to change notification settings - Fork 3
[Rule] KSatisfiability to MaxCut #166
Description
Source: NAESatisfiability
Target: MaxCut
Motivation: Classic NP-completeness reduction connecting Boolean satisfiability to graph partitioning. The Not-All-Equal structure is the key: every satisfied NAE clause contributes exactly 2 triangle edges to the cut, while every unsatisfied clause (all literals equal) contributes 0. This clean characterization establishes MaxCut as NP-hard via NAE-3SAT.
Reference: Garey, Johnson & Stockmeyer, "Some simplified NP-complete graph problems," Theoretical Computer Science 1(3), 237–267 (1976). Also: Garey & Johnson, Computers and Intractability (1979), Section 3.2.5.
Reduction Algorithm
Given a NAE-3SAT instance with
Notation:
-
$n$ =num_vars,$m$ =num_clauses - For variable
$x_i$ , create two vertices:$v_i$ (positive literal) and$v_i'$ (negative literal) - Forcing weight
$M = 2m + 1$
Variable gadgets:
- For each variable
$x_i$ , create vertices$v_i$ and$v_i'$ . - Add edge
$(v_i, v_i')$ with weight$M$ .
Since
Clause gadgets:
3. For each clause
- Add a triangle of weight-1 edges:
$(\ell_a, \ell_b)$ ,$(\ell_b, \ell_c)$ ,$(\ell_a, \ell_c)$ .
Why NAE is essential:
For a NAE clause, the induced partition has 1 literal on one side and 2 on the other (or vice versa). A triangle with exactly
Cut threshold:
4. The instance is NAE-satisfiable if and only if the maximum weighted cut
- Satisfiable: every clause contributes exactly 2 → total =
$nM + 2m$ . - Unsatisfiable: every truth assignment has at least one clause with all literals equal (contributing 0) → total clause contribution
$\leq 2(m-1)$ → cut$\leq nM + 2m - 2 < nM + 2m$ .
Solution extraction: For variable
Size Overhead
| Target metric (code name) | Formula |
|---|---|
num_vertices |
2 * num_vars
|
num_edges |
num_vars + 3 * num_clauses
|
(Clause triangle edges connect literal-vertices of distinct variables within a clause; they are distinct from variable-gadget edges, which connect num_vars + 3 * num_clauses is therefore a worst-case upper bound on distinct edges.)
Validation Method
- Construct small NAE-3SAT instances where no clause contains both
$x_i$ and$\neg x_i$ (so no edge merging occurs), reduce to MaxCut, solve both with BruteForce. - Verify: satisfying assignment maps to cut
$= nM + 2m$ . - Verify: unsatisfiable instance has maximum cut
$< nM + 2m$ . - Test both satisfiable (e.g., a colorable graph encoded as NAE-3SAT) and unsatisfiable instances.
Example
Source: NAE-3SAT with
- Variables:
$x_1, x_2, x_3$ -
$C_1 = (x_1, x_2, x_3)$ (NAE: not all equal) -
$C_2 = (\neg x_1, \neg x_2, \neg x_3)$ (NAE: not all equal)
Reduction:
- Vertices:
$v_1, v_1', v_2, v_2', v_3, v_3'$ (6 =$2n$ ✓) - Variable-gadget edges:
$(v_1,v_1')$ w=5,$(v_2,v_2')$ w=5,$(v_3,v_3')$ w=5 -
$C_1$ triangle:$(v_1,v_2)$ w=1,$(v_2,v_3)$ w=1,$(v_1,v_3)$ w=1 -
$C_2$ triangle:$(v_1',v_2')$ w=1,$(v_2',v_3')$ w=1,$(v_1',v_3')$ w=1 - Total edges: 9 =
$n + 3m = 3 + 6$ ✓ (no merges — clause edges connect distinct-variable literal pairs)
Satisfying assignment:
- Partition:
$S={v_1, v_2', v_3'}$ ,$\bar S={v_1', v_2, v_3}$ - Variable-gadget cut: all 3 edges cross →
$3 \times 5 = 15$ -
$C_1$ triangle:$(v_1, v_2)$ crosses ($v_1\in S, v_2\in\bar S$ ),$(v_1,v_3)$ crosses ($v_1\in S, v_3\in\bar S$ ),$(v_2,v_3)$ does not ($v_2,v_3\in\bar S$ ) → 2 edges cut ✓ -
$C_2$ triangle:$(v_1',v_2')$ crosses ($v_1'\in\bar S, v_2'\in S$ ),$(v_1',v_3')$ crosses ($v_1'\in\bar S, v_3'\in S$ ),$(v_2',v_3')$ does not ($v_2',v_3'\in S$ ) → 2 edges cut ✓ - Total cut = 15 + 2 + 2 = 19
-
Threshold =
$nM + 2m = 3(5) + 2(2) = 19$ ✓
Unsatisfying assignment:
- Partition:
$S={v_1,v_2,v_3}$ ,$\bar S={v_1',v_2',v_3'}$ - Variable-gadget cut:
$15$ -
$C_1$ triangle: all of$v_1,v_2,v_3\in S$ → 0 edges cut -
$C_2$ triangle: all of$v_1',v_2',v_3'\in\bar S$ → 0 edges cut - Total cut = 15 < 19 = threshold ✓
Metadata
Metadata
Assignees
Labels
Type
Projects
Status