Definitions:
NP-Complete:
A decision problem D is
NP-complete if:
Instance:
A Graph G = (V,E) with |V| = 3q for a positive integer q.
Question:
Is there a partition of V into q disjoint sets v1, v2, ... , vq of three vertices each, such that, for each Vi = {Vi[1], Vi[2], Vi[3]}, the three edges:
{Vi[1], Vi[2]},
{Vi[1], Vi[3]},
{Vi[2], Vi[3]},
all belong to E ?
Intuition:
Clearly Partition into Triangles is in NP because we can first non-deterministically guess a partition of V and then check (in deterministic polynomial time) that each Vi fulfills the triangle condition.
Theorem:
Partition into Triangles is NP-Complete.
Approach:
Local Replacement:
Proof:
Proof:
Proof:
{ai[1], ai[2], xi}, {ai[4], ai[5], yi}
{ai[7], ai[8], zi}, {ai[3], ai[6], ai[9] }
from the vertices meeting Ei wherever ci = { xi , yi , zi } IS in the exact cover, and by taking:
{ai[3], ai[6], ai[9]}, {ai[3], ai[6], ai[9]}, {ai[3], ai[6], ai[9]}
from the vertices meeting Ei whenever ci IS NOT in the exact cover.
Proof:
Then {ai[4], ai[5], yi}{ai[7], ai[8], zi}, and {ai[3], ai[6], ai[9] }
must also be in the triangle partition.
Proof:
Proof: