facing NP-completeness
Thibaut Barthelemy
University of Vienna Dept. of Business Administration
Austria
Vienna January 29th, 2013
Some pictures come from Wikipedia
Introduction
Slide 2 / 21 Barthelemy
Introduction
Contents
Introduction
Complexity of some problems for some computers
Do NP-hard problems become polynomial on a quantum computer ?
Basics of Complexity Theory
Deterministic and Non-deterministic Turing machines Definition of class NP
Definition of NP-completeness
SAT complexity for 3 kinds of computers
How a Deterministic computer solves SAT How a Quantum computer solves SAT How a DNA computer solves SAT
Introduction
Overview
Complexity of some problems for some computers
Class Deterministic Quantum Non deterministic
Search P O(n)1 O(√
n)2 O(log n)3 Factorization N P O(n1.7√3n)4 O(n3)5 O(n)3
SAT N P-C O(2n)1 O(√
2n)2 O(n)6
1. Enumeration 2. Grover’s algorithm
3. Recursively search both half-parts in parallel 4. General Number Field Sieve algorithm 5. Shor’s algorithm
6. Recursive enumeration of variables for both values in parallel
Slide 4 / 21 Barthelemy
Introduction
Quantum power
Gain for factorization
Factorizing a huge integer is
exponential on classical computers, cubic on quantum computers.
But this problem is specific :
it can be solved by means of quantum Fourier transform, which is very fast ;
it has never been proven to be NP-hard.
Gain for NP-hard problems ?
No polynomial algorithm has been found for any NP-complete problem : SAT, although simple, remains intractable : O(√
2n) = O(2n/2) All NP-complete problems might remain intractable
Basics of
Complexity Theory
Slide 6 / 21 Barthelemy
Complexity Theory
Definitions
The Turing Machine
Complexity Theory
Definitions
Church-Turing thesis (20th century)
Roughly,
a Turing Machine can compute every problem for which we know a solving way ;
equivalently, every algorithm can be translated into a TM transition table.
Slide 8 / 21 Barthelemy
Complexity Theory
Definitions
The Deterministic Turing Machine
Deterministic means both
it cannot guess the right choice, it is in one state at once.
So the solution tree of Hamiltonian Cycle is explored branch by branch :
Complexity Theory
Definitions
The Non-deterministic Turing Machine
Non-deterministic means either it can be in several states at once, or it can guess the right choice.
So, at a given level, either
for every node, in parallel, it deploys its branches ; from the correct node, it chooses the next correct node.
Slide 10 / 21 Barthelemy
Complexity Theory
Theorem
Cook-Levin theorem
This theorem says, equivalently
every problem in NP can be reduced to SAT in polynomial time, SAT is NP-complete.
Decision problems. Whenever the name evokes an optimization problem, its decision variant is considered.
Complexity Theory
Theorem
Cook-Levin theorem : proof sketch
1. SAT is in NP (means Polynomial on a Non-deterministic machine).
2. Given the transition table of any problem of size n in NP, the corresponding behavior of the Turing Machine can be translated into a SAT problem whose the size is polynomial with respect to n, 3. so SAT can solve any problem of NP.
Slide 11 / 21 Barthelemy
Complexity Theory
NP-completeness
Other NP-complete problems
Many problems are also NP-complete, because
they can be used to solve SAT (SAT is reducible to them in polynomial time).
Complexity Theory
NP-completeness
Other NP-complete problems
Many problems are also NP-complete, because
they can be used to solve SAT (SAT is reducible to them in polynomial time).
Slide 12 / 21 Barthelemy
SAT complexity
for 3 kinds of computers
SAT complexity
On deterministic computers
Exploration
The worst case of the best algorithms is equivalent to trying both values for all variables
Slide 14 / 21 Barthelemy
SAT complexity
On quantum computers
Implementing the instance
First,
build the quantum circuit of the instance,
it takes (x1, . . . , xn) and gives f (x) = 1 iff all clauses are satisfied
SAT complexity
On quantum computers
Making the solution emerge
Use the Grover’s search algorithm with f (xα) as certifier.
αx← |0i − |1i
√2 ∀x ∈ {0 . . . 2n− 1}
xα ← 1
√2n
2n−1
X
x=0
|xiαx
for k = 1 to√ 2n do xα ←
2n−1
X
x=0
(−1)f (xα)|xiαx
xα ←
2n−1
X
x=0
|xi(2α − αx)
Slide 16 / 21 Barthelemy
SAT complexity
On quantum computers
Making the solution emerge
Repeat the Grover’s iteration√
2n times :
SAT complexity
On quantum computers
Making the solution emerge
Repeat the Grover’s iteration√
2n times :
Slide 17 / 21 Barthelemy
SAT complexity
On quantum computers
Making the solution emerge
Repeat the Grover’s iteration√
2n times :
SAT complexity
On quantum computers
Making the solution emerge
Repeat the Grover’s iteration√
2n times :
Slide 17 / 21 Barthelemy
SAT complexity
On DNA computers
Biochemistry basics : DNA, Genes
SAT complexity
On DNA computers
Biochemistry basics : Separation, Hybridization
Slide 18 / 21 Barthelemy
SAT complexity
On DNA computers
Biochemistry basics : Electrophoresis
A voltage makes molecules move The lightest ones go far
SAT complexity
On DNA computers
Encoding
Any 15-bases sequence is a variable
The sequence is unique for each variable and value
Braich, Chelyapov, Johnson, Rothemund, Adleman
Solution of a 20-Variable 3-SAT Problem on a DNA Computer Science Vol. 296 no. 5567 (2002)
Slide 19 / 21 Barthelemy
SAT complexity
On DNA computers
Generation of all solutions
O(2n) solutions are generated in n steps :
SAT complexity
On DNA computers
Extraction of feasible solutions
Solutions are poured on the left layer
Base-complements of Clause 1 variables are stuck on the right
Slide 20 / 21 Barthelemy
SAT complexity
On DNA computers
Extraction of feasible solutions
Solutions move to the right
The right layer catches DNA matching at least one variable
SAT complexity
On DNA computers
Extraction of feasible solutions
The left layer is replaced by the right layer
Base-complements of Clause 2 variables are stuck on the right
Slide 20 / 21 Barthelemy
SAT complexity
On DNA computers
Extraction of feasible solutions
Solutions move to the right
The right layer catches DNA matching at least one variable
SAT complexity
On DNA computers
Extraction of feasible solutions
The left layer is replaced by the right layer
Base-complements of Clause 3 variables are stuck on the right
Slide 20 / 21 Barthelemy
SAT complexity
On DNA computers
Extraction of feasible solutions
Solutions move to the right
The right layer catches DNA matching at least one variable
SAT complexity
On DNA computers
Complexity of that algorithm
There are m iterations during search, but
after each iteration, one may need to duplicate the remaining strands ;
a chemical procedure called PCR makes O(2n) duplicates in O(n).
Thus the overall complexity is O(mn).
Drawbacks
Non-deterministic computing swaps time and space complexities : Very fast : O(mn)
Matter-consuming : O(2n)
The size of the Universe becomes our limit, instead of its lifetime
Slide 21 / 21 Barthelemy