Exercise

Reduce NAE-3SAT to multigraph Max-Cut

Build variable and clause multiedges so a cut of size n+2m encodes a not-all-equal assignment.

Assignment sources

Semester A 2026 assignmentsOfficial assignmentexercise4.pdfQ2Authoritative course artifact

Problem

Let NAE-3SAT be the language of 3CNF formulas that admit a truth assignment under which every clause has at least one true literal and at least one false literal. Let Max-Cut-Multi receive a multigraph GG and integer KK and ask whether some cut has at least KK crossing edges (counting multiplicity).

Given a 3CNF formula φ\varphi on nn variables and mm clauses (each clause uses three distinct variables), construct a multigraph GG and threshold K=n+2mK=n+2m such that φ∈NAE-3SAT\varphi\in\mathrm{NAE\text{-}3SAT} if and only if (G,K)(G,K) is a yes instance of Max-Cut-Multi. Prove both directions and polynomial size.

Hint 1

Vertices should represent literals xix_i and ¬xi\neg x_i.

Hint 2

Reward cutting each variable pair once, and cutting two of the three edges inside each clause triple.

Guided construction

NAE-3SAT → Max-Cut

Step 1 of 7
Source NAE-3CNF(x ∨ y ∨ z) ∧ (¬x ∨ y ∨ ¬z)
NAE-3SAT to multigraph Max-CutLiteral vertices with variable edges and clause triangles; a cut of size n+2m encodes an NAE assignment.Source NAE-3CNF
Variable edgeClause edge

Full solution

Create vertices {x1,¬x1,…,xn,¬xn}\{x_1,\neg x_1,\ldots,x_n,\neg x_n\}. Add one edge {xi,¬xi}\{x_i,\neg x_i\} for each variable (the variable edges). For each clause (ℓa∨ℓb∨ℓc)(\ell_a\lor\ell_b\lor\ell_c) add the three clause edges {ℓa,ℓb}\{\ell_a,\ell_b\}, {ℓb,ℓc}\{\ell_b,\ell_c\}, {ℓc,ℓa}\{\ell_c,\ell_a\}, allowing parallel edges when the same literal pair recurs. Output K=n+2mK=n+2m.

Any cut corresponds to a partition of literals. A consistent assignment places exactly one of xi,¬xix_i,\neg x_i on each side: then all nn variable edges are cut. If some pair lies on the same side, that variable edge contributes 00. Inside a clause triangle, the number of cut edges is 22 when the three literals are not monochromatic under the side-coloring, and at most 00 or (with parallel structure) otherwise at most 22 only in the NAE pattern; with simple triangles, a 33-way split is impossible on two sides, so the cut contributes 22 exactly on NAE patterns and 00 when all three literals lie on one side. Summing yields at most n+2mn+2m, with equality if and only if every variable pair is split and every clause is not-all-equal.

Conversely, from a cut of size n+2mn+2m recover the side of each positive literal as truth, after noting that each complementary pair must be separated (else the total cannot reach KK). Polynomial size is immediate: 2n2n vertices and n+3mn+3m edge endpoints to list.

Checkpoint

Consistency of complements is enforced by variable edges; NAE (not merely SAT) is enforced by scoring 22 per clause rather than 11.

Common mistakes

  • Using threshold n+3mn+3m or n+mn+m, which breaks the tight NAE characterization.
  • Forgetting multiedges when a literal pair appears in several clauses.
  • Allowing both xx and ¬x\neg x on the same side while still claiming size KK.

Provenance note

Independently written exposition of the reduction family appearing in Semester A 2026 exercise 4 (Q2). The narrative and proof text are original; the assignment is cited as provenance for the construction parameters, not as copied solution text.

Sources and verification

  • Semester A 2026 exercise 4, Q2
  • Course Max-Cut lecture notes
  • Catalog mapping: data/exercises.json; statements and solutions are independently written.