Quantum and Non-deterministic computers facing NP-completeness Thibaut University of Vienna Dept. of Business Administration Austria Vienna January 29th, 2013 Some pictures come from Wikipedia
Introduction Slide 2 / 21
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 for 3 kinds of computers How a Deterministic computer solves SAT How a Quantum computer solves SAT How a DNA computer solves SAT Slide 3 / 21
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(n 1.7 3 n ) 4 O(n 3 ) 5 O(n) 3 SAT N P-C O(2 n ) 1 O( 2 n ) 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
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( 2 n ) = O(2 n/2 ) All NP-complete problems might remain intractable Slide 5 / 21
Basics of Complexity Theory Slide 6 / 21
Complexity Theory Definitions The Turing Machine Slide 7 / 21
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
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 : Slide 9 / 21
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
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. Slide 11 / 21
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
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
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
for 3 kinds of computers Slide 13 / 21
On deterministic computers Exploration The worst case of the best algorithms is equivalent to trying both values for all variables Slide 14 / 21
On quantum computers Implementing the instance First, build the quantum circuit of the instance, it takes (x 1,..., x n ) and gives f(x) = 1 iff all clauses are satisfied Slide 15 / 21
On quantum computers Making the solution emerge Use the Grover s search algorithm with f(xα) as certifier. α x 0 1 2 x {0... 2 n 1} xα 1 2 n 1 x α x 2 n x=0 for k = 1 to 2 n do 2 n 1 xα ( 1) f(xα) x α x xα x=0 2 n 1 x (2α α x ) x=0 Slide 16 / 21
On quantum computers Making the solution emerge Repeat the Grover s iteration 2 n times : Slide 17 / 21
On quantum computers Making the solution emerge Repeat the Grover s iteration 2 n times : Slide 17 / 21
On quantum computers Making the solution emerge Repeat the Grover s iteration 2 n times : Slide 17 / 21
On quantum computers Making the solution emerge Repeat the Grover s iteration 2 n times : Slide 17 / 21
On DNA computers Biochemistry basics : DNA, Genes Slide 18 / 21
On DNA computers Biochemistry basics : Separation, Hybridization Slide 18 / 21
On DNA computers Biochemistry basics : Electrophoresis A voltage makes molecules move The lightest ones go far Slide 18 / 21
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
On DNA computers Generation of all solutions O(2 n ) solutions are generated in n steps : Slide 19 / 21
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
On DNA computers Extraction of feasible solutions Solutions move to the right The right layer catches DNA matching at least one variable Slide 20 / 21
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
On DNA computers Extraction of feasible solutions Solutions move to the right The right layer catches DNA matching at least one variable Slide 20 / 21
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
On DNA computers Extraction of feasible solutions Solutions move to the right The right layer catches DNA matching at least one variable Slide 20 / 21
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(2 n ) 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(2 n ) The size of the Universe becomes our limit, instead of its lifetime Slide 21 / 21