Local replacement and

Partition into Triangles

Overview

  • Theory of NP-Completeness
  • Problem
  • Theorem
  • Proof

Theory of NP-Completeness

Definitions:

  • P - deterministic polynomial-time decision problems
  • NP - non-deterministic turing machine problems that can be verified in polynomial-time.
  • NP-Hardat least as hard as the hardest problems in NP.

Theory of NP-Completeness

NP-Complete:

  • A decision problem D is
    NP-complete if:

    • D is in NP, and
    • Every problem in NP is reducible to D in polynomial time

Problem

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 ?

 

Theorem

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.

Proof

Approach:

 

  • We transform Exact Cover by 3-Sets to Partition into Triangles
  • Polynomial time transformation using local replacement.

Local Replacement:

  • Pick some aspect of the know NP-Complete problem instance to make up a collection of basic units.
  • We obtain the corresponding instance of the target problem by replacing each basic unit in a uniform way with a different structure.
  • ​The key point is that each replacement constituted only local modification of structure.

Proof

  • Let the set X with |X| = 3q and the collection C of 3 element subsets of X be an arbitrary instance of Exact Cover by 3 Sets.
  • We shall construct a graph G=(V,E), with |V|=3q', such that the desired partition exists for G if and only if C contains exact cover. 

Proof:

Proof

  • The basic units of the Exact Cover by 3 Sets instance are the 3-element subsets in C.

 

  • The local replacement substitutes for each such subset ci = { x, y, z∈ C the collection Ei of 18 edges shown in the figure below:

Proof:

Proof

  • The only vertices that appear in edges belonging to more than a single Ei are those that are in the set X.
  • |V|  =  |X| + 9 |C|  =  3q + 9 |C|   so that q' = q + 3 |C| and is therefore an instance of Partition into Triangles.

Proof:

Proof

  • If  c1, c2, ... , cq are the 3 element subsets from C in any EXACT COVER for X, then the corresponding partition  V = V1 U V2 U ... U Vq' is given by taking

 

{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 = { x, y, z} 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:

Proof

  • Let us say that it was  {ai[1], ai[2], xi}
  • 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

  • Therefore each x appears in exactly one chosen ci

Proof:

  • This also implies that we choose exactly q ci elements of C.
  • We have shown that G can be partitioned into
    q' = q + |C| triangles if and only if  C contains an exact cover of q sets for X.

Partition into Triangles

By Jonathon Hope

Partition into Triangles

  • 2,467