Linear Programming (Optimization)

6. The Most Difficult NP Problems: The Class NPC
 Polynomial transformation:
Given 𝑋𝑖 = 𝐷𝑖 , 𝐹𝑖 , 𝑖 = 1,2
βˆƒ function 𝑔: 𝐷1 β†’ 𝐷2 such that 𝑔(𝑑) ∈ 𝐹2 iff 𝑑 ∈ 𝐹1 .
If the function 𝑔 is computable in time that is polynomial in the length of the
encoding of 𝑑, then 𝑋1 is said to be polynomially transformable to 𝑋2.
(notation: 𝑋1 ∝ 𝑋2 , 𝐿1 ∝ 𝐿2 ( in language term))
 Note that 𝑋1 ∝ 𝑋2 means that 𝑋2 is no easier than 𝑋1 in terms of polynomial
time solvability. If we can solve 𝑋2 in polynomial time (find β€˜yes’, β€˜no’
answer using deterministic algorithm), then we can answer whether any given
instance of 𝑋1 is β€˜yes’ or β€˜no’ in polynomial time. But, the converse may not
hold.
Integer Programming 2015
1
 Polynomial reduction:
𝑋1 is polynomially reducible to 𝑋2 if βˆƒ algorithm for 𝑋1 that uses algorithm
for 𝑋2 as a subroutine and runs in polynomial time assuming each call to the
subroutine takes unit time.
( recall Opt and Feas for 0-1 IP problem)
( transformation is a special case of reduction)
 Polynomial transformation also called Karp reduction, ο‚΅ (GJ).
Polynomial reduction called Turing reduction, 𝑇 (GJ).
 Prop: If 𝑋1 is polynomially transformable (reducible) to 𝑋2, and 𝑋2 ∈ 𝑃, then
𝑋1 ∈ 𝑃.
 Def: 𝑋1 is a special case of 𝑋2 if 𝐷1 βŠ‚ 𝐷2 and 𝐹1 = 𝐷1 ∩ 𝐹2 .
( Use identity transformation 𝑔 𝑑 = 𝑑.)
Integer Programming 2015
2
 Def: 𝑋 ∈ 𝑁𝑃 is said to be 𝑁𝑃 βˆ’complete if all problems in 𝑁𝑃 can be
polynomially reduced (transformed) to 𝑋.
The set of 𝑁𝑃 βˆ’complete problems is denoted by 𝑁𝑃𝐢.
 𝑁𝑃 βˆ’complete problem is the hardest problem in 𝑁𝑃 since the existence of
a polynomial time algorithm for any 𝑁𝑃 βˆ’complete problem implies that all
the problems in 𝑁𝑃 can be solved in polynomial time.
 Prop 6.3: If 𝑋 is 𝑁𝑃 βˆ’complete, then 𝑃 = 𝑁𝑃 iff 𝑋 ∈ 𝑃.
( 𝑃 ∩ 𝑁𝑃𝐢 β‰  βˆ… ⟹ 𝑃 = 𝑁𝑃 )
Pf) 𝑋 ∈ 𝑁𝑃 and 𝑃 = 𝑁𝑃 ⟹ 𝑋 ∈ 𝑃.
𝑋 ∈ 𝑃 ∩ 𝑁𝑃𝐢 ⟹ βˆƒ poly time alg. for any problem in 𝑁𝑃.
Hence 𝑁𝑃 βŠ† 𝑃. Also 𝑃 βŠ† 𝑁𝑃. So 𝑃 = 𝑁𝑃. ο‚Š
 Prop 6.4: If 𝑋1 is 𝑁𝑃 βˆ’complete, 𝑋1 ∝ 𝑋2 and 𝑋2 ∈ 𝑁𝑃, then 𝑋2 is
𝑁𝑃 βˆ’complete.
( Be careful about the direction of the transformation.)
Integer Programming 2015
3
 Is 𝑁𝑃𝐢 β‰  βˆ…?
 First 𝑁𝑃 βˆ’complete problem found:
Satisfiability problem (Cook, 1971)
Given a set π‘ˆ of Boolean variables and a collection 𝐢 of clauses over π‘ˆ, is
there a satisfying truth assignment for 𝐢?
𝑛
𝑖
( Is there a truth assignment to βˆ§π‘–βˆˆπΆ {βˆ¨π‘—=1
𝑒𝑗 π‘œπ‘Ÿ 𝑒𝑗 }? )
(  : and, οƒš : or )
ex) Given (𝑒1 ∨ 𝑒3 ) ∧ (𝑒1 ∨ 𝑒2 ∨ 𝑒3 ) ∧ (𝑒2 ∨ 𝑒3 ),
a truth assignment is 𝑒1 = true, 𝑒2 = false, 𝑒3 = false
 Thm 6.5: (Cook) The satisfiability problem (SAT) is 𝑁𝑃 βˆ’complete.
Pf) polynomial transformation of any NDTM into the satisfiability problem.
(GJ, pp.38-44)
Integer Programming 2015
4
 Prop 6.6: 0-1 IP feasibility problem is 𝑁𝑃 βˆ’complete.
Pf) clearly in 𝑁𝑃.
Let each clause be 𝐢𝑖 = (𝐢𝑖+ , πΆπ‘–βˆ’ ). Then (SAT) is satisfiable iff
{π‘₯ ∈ 𝐡𝑛 :
π‘—βˆˆπΆπ‘–+ π‘₯𝑗
+
π‘—βˆˆπΆπ‘–βˆ’
1 βˆ’ π‘₯𝑗 β‰₯ 1, 𝑖 ∈ 𝐢 is feasible.
We have a function that transforms any instance of (SAT) to an in stance of 01 IP feasibility. ο‚Š
 Note that we transform an arbitrary instance of (SAT) to a (specific) instance
of 0-1 IP feasibilty, which depends on the given instance of (SAT). The
rationale is that if there exists an efficient algorithm to solve any instance of 01 IP feasibility, we can apply the algorithm to the transformed instance to
solve any arbitrary instance of (SAT). So it is unlikely that such efficient
algorithm for 0-1 IP feasibility exists since the existence of such algorithm
implies that we can solve (SAT) easily and solve all problems in 𝑁𝑃 easily.
Integer Programming 2015
5
 Boundary between 𝑃 and 𝑁𝑃𝐢:
π‘₯ ∈ 𝐡𝑛 : 𝐴π‘₯ ≀ 1, 𝑐π‘₯ β‰₯ 𝑧 β‰  βˆ…? 𝐴: π‘š × π‘› 0-1 matrix.
οƒ˜two 1’s in each column of 𝐴 (node-edge incidence matrix) :
matching problem ∈ 𝑃
οƒ˜Three 1’s in each column ∈ 𝑁𝑃𝐢
οƒ˜One 1 in each row ∈ 𝑃
οƒ˜Two 1’s in each row (edge-node incidence matrix) :
node packing problem ∈ 𝑁𝑃𝐢
 Be careful about the distinction between the feasibility problem itself and the
0-1 IP formulation.
Integer Programming 2015
6
 Unweighted node packing problem (independent set, stable set):
Given a graph 𝐺 = 𝑉, 𝐸 , βˆƒ π‘ˆ βŠ† 𝑉 such that π‘ˆ β‰₯ π‘˜ and π‘ˆ is a node
packing?
 Prop 6.7: The lower bound feasibility problem for unweighted node
packing is 𝑁𝑃 βˆ’complete.
Pf) in 𝑁𝑃. transform from (SAT)
𝐢𝑖+
ex)
1
2
3
4
{1, 2} {3}
{2, 3} {4}
{4} {1, 2}
{3}
βˆ…
ο€£ clauses = π‘š, ο€£ vars = 𝑛
set π‘˜ = π‘š
{1, 3} = β€˜true’, {2, 4} = β€˜false’
Integer Programming 2015
(1, 1)
πΆπ‘–βˆ’
(5, 3)
(2, 1)
(7, 1)
(6, 3)
(3, 4)
(3, 2)
(4, 3)
(8, 2)
(2, 2)
7
 Then the given instance of (SAT) has truth assignment iff βˆƒ node packing of
size π‘˜.
 Note that π‘˜ is set depending on the given instance of (SAT). It is not an
arbitrary number.
 If we want to claim that IP feasibility formulation of node packing lower
bound feasibility is 𝑁𝑃 βˆ’complete, we need to transform the node packing to
the IP formulation.
Integer Programming 2015
8
 Clique: Given 𝐺 = 𝑉, 𝐸 , π‘ˆ βŠ† 𝑉 is called a clique if 𝑣, 𝑀 ∈ π‘ˆ ⟹ (𝑣, 𝑀) ∈
𝐸. (complete subgraph of G)
 Clique problem: Given 𝐺 = (𝑉, 𝐸) and positive integer π‘˜, βˆƒ a clique of size
β‰₯ π‘˜?
 Prop: Clique problem is 𝑁𝑃 βˆ’complete
Pf) in 𝑁𝑃. Independent set (node packing) ∝ clique
Given an instance of node packing 𝐺, π‘˜ , construct 𝐺 𝑐 = 𝑉, 𝐸 , 𝐸 =
{ 𝑖, 𝑗 : (𝑖, 𝑗) βˆ‰ 𝐸, 𝑖, 𝑗 ∈ 𝑉}. Set π‘˜ = π‘˜.
Then π‘ˆ βŠ† 𝑉 is an independent set for 𝐺 iff π‘ˆ is a clique for 𝐺 𝑐 .
Hence 𝐺 has an independent set of size π‘˜ iff 𝐺 𝑐 has a clique of size π‘˜. ο‚Š
Integer Programming 2015
9
 Vertex cover: Given 𝐺 = 𝑉, 𝐸 , π‘ˆ βŠ† 𝑉 is called a vertex cover if all
edges in 𝐺 are incident to at least one vertex in π‘ˆ.
 Vertex cover problem: Given 𝐺 = 𝑉, 𝐸 , βˆƒ a vertex cover of size ≀ π‘˜?
(𝑁𝑃 βˆ’complete)
Pf) in 𝑁𝑃. clique ∝ vertex cover
Given an arbitrary instance of clique 𝐺, 𝑙 , construct an instance of
vertex cover. Construct 𝐺 𝑐 and set π‘˜ = 𝑉 βˆ’ 𝑙.
Then π‘ˆ βŠ† 𝑉 is a clique of size π‘˜ in 𝐺 ⟺ 𝑉 βˆ– π‘ˆ is a vertex cover of
size 𝑛 βˆ’ π‘˜ in 𝐺 𝑐 .
(⟹) nodes in π‘ˆ not connected by edges in 𝐺 𝑐 .
⟹ edges in 𝐺 𝑐 incident to at least one node in 𝑉 βˆ– π‘ˆ.
⟹ 𝑉 βˆ– π‘ˆ vertex cover in 𝐺 𝑐 .
(⟸) every edge in 𝐺 𝑐 is incident to at least one node in 𝑉 βˆ– π‘ˆ
⟹ no edge in 𝐺 𝑐 connects nodes in π‘ˆ.
⟹ π‘ˆ clique in 𝐺.
ο‚Š
Integer Programming 2015
10
 Relation between node packing (independent set), clique, vertex cover:
𝐺 = 𝑉, 𝐸 , π‘ˆ βŠ† 𝑉
οƒ˜π‘ˆ is a vertex cover for 𝐺.
οƒ˜π‘‰ βˆ– π‘ˆ is a node packing for 𝐺.
οƒ˜π‘‰ βˆ– π‘ˆ is a clique in 𝐺 𝑐 .
Integer Programming 2015
11
Six Basic NP-complete Problems (GJ)
 3-Satisfiability (3SAT)
Instance: Collection 𝐢 = {𝑐1 , 𝑐2 , … , π‘π‘š } of clauses on a finite set π‘ˆ of
variables such that 𝑐𝑖 = 3 for 1 ≀ 𝑖 ≀ π‘š.
Question : Is there a truth assignment for π‘ˆ that satisfies all the clauses in 𝐢?
 3 βˆ’Dimensional Matching (3DM)
Instance : A set 𝑀 βŠ† π‘Š × π‘‹ × π‘Œ, where π‘Š, 𝑋, and π‘Œ are disjoint sets having
the same number π‘ž of elements.
Question : Does 𝑀 contain a matching, that is, a subset 𝑀′ βŠ† 𝑀 such that
𝑀′ = π‘ž and no two elements of 𝑀′ agree in any coordinate ?
(generalization of marriage problem.)
Integer Programming 2015
12
 Vertex Cover
 Clique
 Hamiltonian Circuit:
Instance : A graph 𝐺 = (𝑉, 𝐸)
Question : Does 𝐺 contain a Hamiltonian circuit, that is, an ordering <
𝑣1 , 𝑣2 , … , 𝑣𝑛 > of the vertices of 𝐺, where 𝑛 = 𝑉 , such that {𝑣𝑛 , 𝑣1 } ∈ 𝐸
and {𝑣𝑖 , 𝑣𝑖+1 } ∈ 𝐸 for all 𝑖, 1 ≀ 𝑖 < 𝑛?
 Partition:
Instance : A finite set 𝐴 and a β€œsize” 𝑠(π‘Ž) ∈ 𝑍 + for each π‘Ž ∈ 𝐴.
Question : Is there a subset 𝐴′ βŠ† 𝐴 such that
π‘Žβˆˆπ΄β€² 𝑠(π‘Ž) = π‘Žβˆˆπ΄βˆ’π΄β€² 𝑠(π‘Ž) ?
Integer Programming 2015
13
Proving NP-completeness
 Set partitioning feasibility problem :
Given an π‘š × π‘› 0 βˆ’ 1 matrix 𝐴, is π‘₯ ∈ 𝐡𝑛 : 𝐴π‘₯ = 1 β‰  βˆ…?
 Prop 6. 8: Set partitioning feasibility problem is 𝑁𝑃 βˆ’complete.
Pf) In 𝑁𝑃. Lower bound feasibility problem for unweighted node packing ∝
Set partitioning feasibility problem
Given an instance of node packing 𝐺, π‘˜ , let 𝐴 be ( 𝐸 + π‘˜) × ( 𝐸 + π‘˜ 𝑉 )
matrix defined as follows.
I E
οƒͺ0
οƒͺ
Aο€½οƒͺ 0
οƒͺ
οƒͺ
οƒͺ 0
AG
1

0
AG
1

AG
0
1



0
0
0
1 
0


1

οƒΉ
οƒΊ
οƒΊ
οƒΊ
οƒΊ
οƒΊ
1
= [𝐡0 , 𝐡1 , 𝐡2 , … , π΅π‘˜ ]
( 𝐴𝐺 is edge-node incidence matrix of 𝐺.)
Integer Programming 2015
14
𝐴π‘₯ = 1 feasible ⟹ pick π‘˜ distinct columns of 𝐴𝐺 β€²s ⟹ node packing
of size π‘˜. Similarly, for converse.
Hence π‘˜ node packing of 𝐺 ⟺ set partitioning feasible with π‘˜ columns
(variables) = 1
ο‚Š
 Prop 6. 9: The set partitioning feasibility problem in which matrix 𝐴 has,
at most, three 1’s per column is 𝑁𝑃 βˆ’complete.
Integer Programming 2015
15
 Ex. of Prop 6.8 )
2
𝑒1
𝑒3
𝑒4
1
3
𝑒5
𝑒2
4
1
1
οƒͺ 1
1
οƒͺ
1
0
οƒͺ
𝐴= οƒͺ
1
0
οƒͺ
οƒͺ
1 0
οƒͺ
οƒͺ0 0 0 0 0 1
οƒͺ0 0 0 0 0
Integer Programming 2015
1 0 0 1 1 0 0οƒΉ
0 0 1 1 0 0 1οƒΊ
οƒΊ
1 1 0 0 1 1 0οƒΊ
1 0 1 0 1 0 1οƒΊοƒΊ
0 1 1 0 0 1 1οƒΊ
οƒΊ
1 1 1
οƒΊ
1 1 1 1
16
 Subset sum problem:
Given an integer 𝑛, integral 𝑛 βˆ’vector π‘Ž1 , … , π‘Žπ‘› , and integer 𝑏, is
π‘₯ ∈ 𝐡𝑛 : π‘—βˆˆπ‘ π‘Žπ‘— π‘₯𝑗 = 𝑏 β‰  βˆ…?
 Prop 6.10: The subset sum problem is 𝑁𝑃 βˆ’complete.
Pf) in 𝑁𝑃. Set partitioning feasibility problem ∝ subset sum.
Given an π‘š × π‘› 0-1 matrix 𝐴, construct an instance of subset sum as
follows.
1
( n  1)
( n  1)
2

( n  1) m ο€­1
1
οƒͺ0
οƒͺ
οƒͺ1
οƒͺ
οƒͺ
οƒͺ1
0οƒΉ
1οƒΉ
οƒͺ1οƒΊ
1
1οƒΊ
οƒΊ
οƒͺοƒΊ
0  0οƒΊ x ο€½ οƒͺ1οƒΊ
οƒͺ οƒΊ

 οƒΊοƒΊ
οƒͺοƒΊ
οƒͺ1
0
1
1
a1 a2  an
Integer Programming 2015
b
a j ο€½ οƒ₯imο€½1 (n  1)i ο€­1 aij , for j ο€½ 1,..., n
bο€½
i ο€­1
οƒ₯imο€½1 (n  1)
ο€½
( n 1) m ο€­1
n
( 𝑗 βˆ’th column of 𝐴 is representation of
π‘Žπ‘— using (𝑛 + 1) symbols.)
17
 0-1 knapsack lower bound feasibility problem:
Given an integer 𝑛, integral 𝑛 βˆ’vectors (π‘Ž1 , … π‘Žπ‘› ) and 𝑐1 , … , 𝑐𝑛 , and
integers 𝑏 and 𝑧, is
π‘₯ ∈ 𝐡𝑛 :
π‘—βˆˆπ‘ π‘Žπ‘— π‘₯𝑗
≀ 𝑏,
π‘—βˆˆπ‘ 𝑐𝑗 π‘₯𝑗
β‰₯ 𝑧 β‰  βˆ…? (𝑁𝑃 βˆ’complete)
Pf) in 𝑁𝑃.
Subset sum problem can be reformulated as
{π‘₯ ∈ 𝐡𝑛 :
π‘—βˆˆπ‘ π‘Žπ‘— π‘₯𝑗
≀ 𝑏,
π‘—βˆˆπ‘ π‘Žπ‘— π‘₯𝑗
β‰₯ 𝑏}.
Hence it is a special case of 0-1 knapsack lower bound feasibility. Since
special case is 𝑁𝑃 βˆ’complete, more general case is 𝑁𝑃 βˆ’complete. ( recall
the definition of special case. It is identity transformation ( or any obvious
one-to-one correspondence between the instances.)
(special case also called β€œrestriction” and one of the easiest and widely used
proving techniques.)
 Note that 0-1 knapsack is not a special case of integer knapsack.
Integer Programming 2015
18
More examples of Restriction
 Variants of Hamiltonian Circuit :
οƒ˜Hamiltonian Path: Same as HC except that we drop the requirement that the first
and the last vertices in the sequence be joined by an edge.
οƒ˜Hamiltonian Path between Two Points: same as HP except that two points 𝑒, 𝑣 are
given as input and the question is whether 𝐺 contains a HP beginning with 𝑒 and
ending with 𝑣.
 All three problems 𝑁𝑃 βˆ’complete
 For directed graph?
transform each undirected problem to a directed problem by replacing each
edge of 𝐺 by two parallel arcs of opposite direction. Undirected version is a
special case of directed version.
Integer Programming 2015
19
 Bounded Degree Spanning Tree :
Instance : A graph 𝐺 = (𝑉, 𝐸) and a positive integer π‘˜ ≀ 𝑉 βˆ’ 1.
Question : Is there a spanning tree for 𝐺 in which no vertex has degree
exceeding π‘˜, that is, a subset 𝐸′ βŠ† 𝐸 such that 𝐸 β€² = 𝑉 βˆ’ 1, the graph 𝐺 β€² =
(𝑉, 𝐸 β€² ) is connected, and no vertex in 𝑉 is included in more than π‘˜ edges from
Eβ€²?
Restrict to Hamiltonian Path by allowing only instances in which π‘˜ = 2. HP
is a special case of BDST with π‘˜ = 2.
Integer Programming 2015
20
 Multiprocessor Scheduling:
Instance : A finite set 𝐴 of β€˜tasks’, a β€˜length’ 𝑙(π‘Ž) ∈ 𝑍 + for each π‘Ž ∈ 𝐴, a
number π‘š ∈ 𝑍 + of β€˜processors’, and a β€˜deadline’ 𝐷 ∈ 𝑍 + .
Question : Is there a partition 𝐴 = 𝐴1 βˆͺ 𝐴2 βˆͺ β‹― βˆͺ π΄π‘š of 𝐴 into π‘š disjoint sets
such that
max
π‘Žβˆˆπ΄π‘– 𝑙
π‘Ž : 1 ≀ 𝑖 ≀ π‘š ≀ 𝐷?
Restrict to partition by allowing only instances in which π‘š = 2 and 𝐷 =
1
2
π‘Žβˆˆπ΄ 𝑙(π‘Ž).
Integer Programming 2015
21
 Longest Path:
Instance : Graph 𝐺 = 𝑉, 𝐸 , positive integer π‘˜ ≀ |𝑉|
Question : Does 𝐺 contain a simple path (that is, a path encountering no vertex
more that once) with π‘˜ or more edges ?
Restrict to Hamiltonian Path, i.e. set π‘˜ = 𝑉 βˆ’ 1
 Set Packing:
Instance : Collection 𝐢 of finite sets, positive integer π‘˜ ≀ |𝐢|
Question : Does 𝐢 contain π‘˜ disjoint sets ?
Restrict to Exact Cover by 3 βˆ’Sets, i.e. restrict 𝑐 = 3, for all 𝑐 ∈ 𝐢 and π‘˜ =
π‘ž.
Integer Programming 2015
22
 Exact Cover by 3 βˆ’Sets (X3C): (𝑁𝑃 βˆ’complete)
Instance : A finite set 𝑋 with 𝑋 = 3π‘ž and a collection 𝐢 of 3-element subsets
of 𝑋.
Question : Does 𝐢 contain an exact cover for 𝑋, that is, a subcollection of 𝐢′ βŠ†
𝐢 such that every element of 𝑋 occurs in exactly one member of 𝐢 β€² ?
Note that 3DM is a restricted version of X3C, hence X3C is 𝑁𝑃 βˆ’complete.
Compare to NW p115, 117 in representing the problems.
Integer Programming 2015
23
 Proving Traveling Salesman Problem is 𝑁𝑃 βˆ’complete.
Instance : Set 𝐢 of π‘š cities, distance 𝑑(𝑐𝑖 , 𝑐𝑗 ) ∈ 𝑍 + for each pair of cities
𝑐𝑖 , 𝑐𝑗 ∈ 𝐢, a positive integer 𝐡.
Question : Is there a tour of 𝐢 having length 𝐡 or less, i.e., a permutation <
π‘πœ‹(1) , π‘πœ‹(2) , … , π‘πœ‹ π‘š > of 𝐢 such that
π‘šβˆ’1
𝐼=1 𝑑
π‘πœ‹ 𝑖 , π‘πœ‹
𝑖+1
+ 𝑑 π‘πœ‹
π‘š
, π‘πœ‹
1
≀ 𝐡?
Pf) In 𝑁𝑃. HC ∝ TSP
Given 𝐺 = 𝑉, 𝐸 , construct an instance of TSP as follows.
Let 𝑐𝑖 = 𝑣𝑖 , 𝑣𝑖 ∈ 𝑉. Let 𝑑 𝑐𝑖 , 𝑐𝑗 = 1 if (𝑣𝑖 , 𝑣𝑗 ) ∈ 𝐸 and = 2 if (𝑣𝑖 , 𝑣𝑗 ) βˆ‰ 𝐸.
Set 𝐡 = |𝑉|.
Then 𝐺 has a HC iff TSP has a tour with length ≀ 𝐡.
ο‚Š
Integer Programming 2015
24
 If 𝑃 β‰  𝑁𝑃, then 𝑁𝑃𝐢 βˆͺ 𝑃 β‰  𝑁𝑃. ( i.e. there are problems of intermediate
difficulty.)
𝑁𝑃 βˆ– (𝑃 βˆͺ 𝑁𝑃𝐢) is called 𝑁𝑃𝐼 (Intermediate)
 Note
οƒ˜Members in 𝑁𝑃𝐼 not equivalent in terms of polynomial transformation.
( infinite number of equivalent classes.)
οƒ˜Only artificial examples known. Have been looking for natural problems in
𝑁𝑃𝐼.
οƒ˜Composite number, LP regarded as candidates in 𝑁𝑃𝐼.
οƒ˜Composite Number : Given positive integer π‘˜, are there integers π‘š, 𝑛 > 1
such that π‘˜ = π‘šπ‘›?
Integer Programming 2015
25
οƒ˜Note that composite number is in 𝑁𝑃 and its complementary problem (Primes)
is to check the primality of a given prime number. There exists a short proof
to check primality. Hence Composite Number is in 𝑁𝑃 ∩ πΆπ‘œπ‘π‘ƒ. So it is
unlikely that composite number is 𝑁𝑃 βˆ’complete by Prop 6.12.
Composite number was proven to be in 𝑃 in 2002.
NPC
NP
NPI
P
Integer Programming 2015
26
NP
CoNP
NPC
P
 Prop 6. 12: If 𝑁𝑃𝐢 ∩ πΆπ‘œπ‘π‘ƒ β‰  βˆ…, then 𝑁𝑃 = πΆπ‘œπ‘π‘ƒ (It is unlikely that
any problem in 𝑁𝑃 ∩ πΆπ‘œπ‘π‘ƒ is 𝑁𝑃 βˆ’complete)
Pf) If 𝑋 ∈ 𝑁𝑃 ⟹ there exists polynomial transformation 𝑔 such that
𝑋 ∝ π‘Œ for π‘Œ ∈ 𝑁𝑃𝐢 ∩ πΆπ‘œπ‘π‘ƒ
Since π‘Œ ∈ πΆπ‘œπ‘π‘ƒ, π‘Œ ∈ 𝑁𝑃. For an instance in 𝑋, 𝑔 maintains β€˜yes’ β€˜no’
answer after the transformation.
If a β€˜no’ instance in 𝑋 is given, we can apply 𝑔 to it, and obtain an
instance in π‘Œ which has β€˜no’ answer. Since π‘Œ ∈ 𝑁𝑃, we can verify the
β€˜no’ by polynomial time NDTM.
So β€˜no’ instance in 𝑋 can be verified ⟹ 𝑋 ∈ πΆπ‘œπ‘π‘ƒ ⟹ 𝑁𝑃 βŠ† πΆπ‘œπ‘π‘ƒ
Similarly, for the other direction.
ο‚Š
Integer Programming 2015
27
Status of Open Problems in GJ
 Source : Pulleyblank, MPS 2000 tutorial
 1. Graph Isomorphism
2. Subgraph homeomorphism for a fixed graph
3. Graph genus
4. Chordal graph completion
5. Chromatic index
6. Spanning tree parity
7. Partial Order Dimension
8. Precedence constrained 3-processor schedu
9. Linear Programming
10. Total Unimodularity
11. Composite number
12. Minimum length triangulation
Integer Programming 2015
open
𝑃
𝑁𝑃 βˆ’complete
𝑁𝑃 βˆ’complete
𝑁𝑃 βˆ’complete
𝑃
𝑁𝑃 βˆ’complete
open
𝑃
𝑃
open (𝑃)
open
28
NP-complete in the strong sense (strongly NPcomplete)
 Refer GJ. p90  Recall that βˆƒ 𝑂(𝑛𝑏) algorithm for 0-1 knapsack problem (also subset sum).
Though 0-1 knapsack feasibility is 𝑁𝑃 βˆ’complete, 𝑂(𝑛𝑏) is less formidable
than 𝑂(2𝑛 ). If 𝑏 is small (polynomial of 𝑛 ), the algorithm runs in
polynomial time for the restricted case.
called pseudo-polynomial time algorithm.
 Q) βˆƒ pseudo-polynomial time algorithms for other 𝑁𝑃 βˆ’complete problems
involving numbers like 𝑏?
e.g.) TSP feasibility, Multiprocessor scheduling.
 Problems like clique, vertex cover do not have pseudo-polynomial time
algorithms.
 Some problems involving numbers do not have even pseudo-polynomial
time algorithms.
Integer Programming 2015
29
 For each instance 𝐼 ∈ 𝐷Π of decision problem Π, define the functions
Length[𝐼]: length of encoding of 𝐼.
Max[𝐼]: magnitude of largest number in 𝐼. (not the size of encoding)
 Def: An algorithm for Π is called a pseudo-polynomial time algorithm
for Ξ  if its time complexity function is bounded above by a polynomial
function of Length[𝐼] and Max[𝐼].
(In NW, polynomial running time in unary encoding )
 Def: A problem Π is called a number problem if there exists no
polynomial 𝑝 such that Max[𝐼] ≀ 𝑝(Length[𝐼]) for all 𝐼 ∈ 𝐷Π
e.g) knapsack, partition
Integer Programming 2015
30
 Let Π𝑝 be subproblem of Ξ  restricted to instances such that Max[𝐼] ≀
𝑝(Length[𝐼]) .
Then if βˆƒ pseudo-polynomial time algorithm for Ξ  ⟹ Π𝑝 solvable in
polynomial time.
 Def: A decision problem Ξ  is 𝑁𝑃 βˆ’complete in the strong sense
(strongly 𝑁𝑃 βˆ’complete) if Ξ  is in 𝑁𝑃 and there exists a polynomial
function 𝑝 for which Π𝑝 is 𝑁𝑃 βˆ’complete.
It is the problem class for which there might not exist even pseudopolynomial time algorithms.
If a problem is not a number problem and 𝑁𝑃 βˆ’complete, then it is
automatically strongly 𝑁𝑃 βˆ’complete.
 NW: Feasibility problem 𝑋 is called strongly 𝑁𝑃 βˆ’complete if the
existence of a pseudo-polynomial time algorithm for it implies 𝑃 = 𝑁𝑃.
Integer Programming 2015
31
 Ex)
0-1 IP feasibility with coefficients 0, +1, -1
satisfiability, size of numbers in r.h.s. also small)
(transformation from
TSP: HC ∝ TSP. Edge weights 1 or 2 𝐡 = |𝑉|.
Hence, all instances with this transformation satisfy Max[I]≀ 𝑝(Length[𝐼])
and 𝑁𝑃 βˆ’complete. So TSP is strongly 𝑁𝑃 βˆ’complete (Length[𝐼] =
𝑉 + log 𝑉 + log 𝑑(𝑖, 𝑗))
3-Partition:
Instance: A finite set 𝐴 of 3π‘š elements, a bound 𝐡 ∈ 𝑍 + , and a β€˜size’
𝐡
𝐡
𝑠(π‘Ž) ∈ 𝑍 + for each π‘Ž ∈ 𝐴, such that 𝑠(π‘Ž) satisfies < 𝑠 π‘Ž < and such
4
2
that π‘Žβˆˆπ΄ 𝑠(π‘Ž) = π‘šπ΅.
Question : Can 𝐴 be partitioned into π‘š disjoint sets 𝑆1 , 𝑆2 , … , π‘†π‘š such
that, for 1 ≀ 𝑖 ≀ π‘š, π‘Žβˆˆπ‘†π‘– 𝑠(π‘Ž) = 𝐡?
Integer Programming 2015
32
Multiprocessor Scheduling
Sequencing within intervals:
Instance: A finite set 𝑇 of β€˜tasks’ and, for each 𝑑 ∈ 𝑇, an integer β€˜release time’
π‘Ÿ(𝑑) β‰₯ 0, a β€˜deadline’ 𝑑 𝑑 ∈ 𝑍 + , and a β€˜length’ 𝑙 𝑑 ∈ 𝑍 + .
Question: Does there exist a feasible schedule for 𝑇, that is, a function 𝜎: 𝑇 β†’
𝑍 + such that, for each 𝑑 ∈ 𝑇, 𝜎 𝑑 β‰₯ π‘Ÿ 𝑑 , 𝜎 𝑑 + 𝑙 𝑑 ≀ 𝑑 𝑑 , and, if 𝑑 β€² ∈
𝑇 βˆ’ 𝑑 , then either 𝜎 𝑑 β€² + 𝑙(𝑑 β€² ) ≀ 𝜎(𝑑) or 𝜎 𝑑 β€² β‰₯ 𝜎 𝑑 + 𝑙 𝑑 ?
Integer Programming 2015
33
 Proving strong 𝑁𝑃 βˆ’completeness by considering restricted problem may
be tedious.
Use pseudo-polynomial transformation from a strongly
𝑁𝑃 βˆ’complete problem.
 Def: A pseudo-polynomial transformation from Ξ  to Ξ β€² is a function 𝑓 :
𝐷Π β†’ 𝐷Π′ such that
οƒ˜ For all 𝐼 ∈ 𝐷Π , 𝐼 ∈ π‘ŒΞ  if and only if 𝑓 𝐼 ∈ π‘ŒΞ β€² ,
οƒ˜ 𝑓 can be computed in time polynomial in the two variables Max[𝐼] and
Length[𝐼],
οƒ˜ βˆƒ a polynomial π‘ž1 such that, for all 𝐼 ∈ 𝐷Π ,
π‘ž1 (Length’[𝑓(𝐼)]) β‰₯ Length[𝐼]
( size of transformed length does not shrink too much.)
οƒ˜ βˆƒ a two variable polynomial π‘ž2 such that, for all 𝐼 ∈ 𝐷Π ,
Max’[𝑓(𝐼)] ≀ π‘ž2 (Max[𝐼], Length[𝐼])
( magnitude of the largest number does not blow up exponentially)
Integer Programming 2015
34
 Lemma: If Ξ  is 𝑁𝑃 βˆ’complete in the strong sense, Ξ  β€² ∈ 𝑁𝑃, and there
exists a pseudo-polynomial transformation from Ξ  to Ξ  β€² , then Ξ β€² is
𝑁𝑃 βˆ’complete in the strong sense.
 Note that the transformation from set partitioning feasibility (which is
strongly 𝑁𝑃 βˆ’ complete) to subset sum is not a pseudo-polynomial
transformation.
Max’[ 𝑓(𝐼) ] ( 𝑏 = 𝑛 + 1 π‘š βˆ’ 1 /𝑛) is not bounded by any poly
function of Length[𝐼] ( π‘šπ‘› ).
Hence the existence of pseudo-polynomial time algorithm for subset sum
cannot be ruled out.
Also, if 𝑋 is 𝑁𝑃 βˆ’complete and 𝑋 ∝ π‘Œ, and if there exists a pseudopolynomial time algorithm for π‘Œ, it does not necessarily imply the
existence of a pseudo-polynomial time algorithm for 𝑋.
Integer Programming 2015
35
NP-hard Problems
 GJ Chapter 5
 Search problem Π:
Given an instance 𝐼 ∈ 𝐷Π , return string 𝑠, such that 𝑠 ∈ 𝑆Π [𝐼] or decide
no such string 𝑠 exists. (𝑆Π [𝐼] : solutions of 𝐼)
( Decision problem may be regarded as a special case of search problem
by defining 𝑆Π 𝐼 = {β€˜yes’} if 𝐼 ∈ π‘ŒΞ  and 𝑆Π 𝐼 = βˆ… if 𝐼 βˆ‰ π‘ŒΞ  )
 Def: A polynomial time Turing reduction (or simply Turing reduction)
from a search problem Ξ  to a search problem Ξ β€² is an algorithm 𝐴 that
solves Ξ  by using a hypothetical subroutine 𝑆 for solving Ξ β€² such that, if
𝑆 were a polynomial time algorithm for Ξ β€², then 𝐴 would be a polynomial
time algorithm for Ξ  (the subroutine may be used many times and Ξ 
and Ξ β€² need not be feasibility problems)
Integer Programming 2015
36
 Def: A search problem Ξ  is 𝑁𝑃 βˆ’hard if there exists an 𝑁𝑃 βˆ’complete
problem Ξ β€² such that Ξ β€² ∝ 𝑇 Ξ  (Turing reducible)
(Ξ  is at least as hard as 𝑁𝑃 βˆ’complete problem Ξ β€² and Ξ  is search problem
(optimization problem))
 Recall (0-1 IP FEAS) ∝ 𝑇 (0-1 IP OPT)
 Def: A search problem Ξ  is called 𝑁𝑃 βˆ’easy if there exists a Ξ β€² ∈ 𝑁𝑃 such
that Ξ  ∝ 𝑇 Ξ β€²
( search problem Ξ  is no harder than 𝑁𝑃 βˆ’complete problems.
Recall (0-1 IP OPT) ∝ 𝑇 (0-1 IP FEAS) )
Integer Programming 2015
37
 A search problem Ξ  is called 𝑁𝑃 βˆ’equivalent if both 𝑁𝑃 βˆ’hard and
𝑁𝑃 βˆ’easy. (has the same degree of difficulty as an 𝑁𝑃 βˆ’complete
problem in terms of polynomial time solvability.)
To show that an optimization problem is difficult to solve (𝑁𝑃 βˆ’hard), it
is enough to show that the corresponding feasibility problem is
𝑁𝑃 βˆ’complete and the optimization problem is Turing reducible from the
feasibility problem (usually trivial).
Some people use the term 𝑁𝑃 βˆ’complete for optimization problems too.
Integer Programming 2015
38
Optimization and Separation
 Relates the complexity of a class of optimization problem over certain
polyhedra with the separation problem for the polyhedra.
 Optimization, separation trivial if 𝐴: π‘š × π‘› is given explicitly. But if
polyhedron is given as conv(𝑋) where 𝑋 is set of feasible solutions, the story
is different.
ex) π‘₯ βˆ— ∈ conv 𝑋 ? for node packing is nontrivial if π‘₯ βˆ— is fractional.
 Separation problem:
Given π‘₯ βˆ— ∈ 𝑅𝑛 , is π‘₯ βˆ— ∈ conv 𝑋 ? If not, find an inequality πœ‹π‘₯ ≀ πœ‹0 satisfied
by all points in 𝑋, but violated by the point π‘₯ βˆ— .
Integer Programming 2015
39
 Thm: Optimization problem over a class of polyhedra is polynomially
solvable if and only if the separation problem for the polyhedra is
polynomiallly solvable.
Integer Programming 2015
40