cs3102: theory of computation class 27: np-complete desserts (dna, rsa, bqp, nsa) spring 2010...
TRANSCRIPT
cs3102: Theory of Computation
Class 27: NP-Complete Desserts(DNA, RSA, BQP, NSA)
Spring 2010University of VirginiaDavid Evans
Reminders
Tuesday: PS7 DueOptional Presentation. If you would like to present or perform your artifact in class on May 4, send me an email by 5:00pm on Monday, May 3 explaining what you would like to do and how much time you think you need for this.
You’ll get a handout that will help you prepare for the final Tuesday.
Check your scores are recorded correctly in Collab
Cost of Synthesizing1990: Human Genome Project starts, estimate $3B to sequence one genome ($0.50/base)
2000: Human Genome Project declared success, cost ~$300M
June 2010: Complete Genomics will start offering full-genome sequencing for $5000 ($0.00000083/base)
Last class
Today
Genomes Computing
Solving HAMPATH with DNA
Make up a two random k-nucleotide sequences for each node: (for example, k = 4)
Based on Fred Hapgood’s notes on Adelman’s talk
A: A1 = ACTT A2 =
gcagB: B1 = TCGG B2 =
actgC: C1 = GGCT C2 =
atgtD: D1 = GATC D2 =
tcca
A
B
C
D
Upper and lowercase letters are the same, just written this way for clarity.
Encoding the ProblemA: A1 = ACTT A2 = gcagB: B1 = TCGG B2 = actgC: C1 = GGCT C2 = atgtD: D1 = GATC D2 = tcca
If there is a link between two nodes (XY), create a nucleotide sequence: X2Y1
A
B
C
D
For each node, create a complement sequence X1X2
(replace A T, G C):
Encoding the ProblemA: A1 = ACTT A2 = gcagB: B1 = TCGG B2 = actgC: C1 = GGCT C2 = atgtD: D1 = GATC D2 = tcca
If there is a link between two nodes (XY), create a nucleotide sequence: X2Y1
A
B
C
D
AB gcagTCGGAC gcagGGCTBC actgGGCTBD actgGATCCD atgtGATC
For each node, create a complement sequence X1X2
(replace A T, G C):
A’ TGAAcgtcB’ AGCCtgacC’ CCGAtacaD’ CTAGaggt
Solving The ProblemMix up all the link and complement DNA strands
AB gcagTCGGAC gcagGGCTBC actgGGCTBD actgGATCCD atgtGATC
A’ TGAAcgtcB’ AGCCtgacC’ CCGAtacaD’ CTAGaggt
TGAAcgtc AGCCtgac
gcagGGCT
TGAAcgtc TGAAcgtcactgGGCT
CTAGaggtCCGAtaca
CCGAtaca
actgGATC
actgGATC
atgtGATC
Shake it Up!
TGAAcgtc
AGCCtgac
gcagGGCT
TGAAcgtc TGAAcgtc
actgGGCT
CTAGaggt
CCGAtaca
CCGAtaca
actgGATC
actgGATC
atgtGATC
Path Binding
A
B
C
D
ACTTgcag
TCGGactg
GATCtcca
GGCTatgt
A’TGAAcgtc
gcagGGCTAB
B’CCGAtaca
atgtTCGG BC
C’AGCCtgac
D’CTAGaggt
actgGATC CD
Getting the SolutionShake up all the DNA to get it to bindExtract strands that start with A and end with D
Can do this with chemical binding on start/end tags: remove all strands that do not start with A, and then remove all strands that do not end with D
Weigh remaining strands to find ones with the right weight (7 * 8 nucleotides)
Select one of these and read its sequence
Is Church-Turing Thesis Wrong?!?
• Time to solve problem with DNA computer doesn’t scale with input size– Can shake up any amount of DNA in the same
amount of time!• Can DNA computers solve undecidable
problems?• Is TM model robust enough for P to be the
same for DNA computer?
No (at least not like this). Can simulate everything (including mixing) with TM.
No: DNA computer can solve NP-Hard problems in constant time! Volume of DNA needed grows exponentially with input size.
DNA-Enhanced PC
To solve HAMPATH for 45 vertices, you need ~20M gallons
Conclusions. For thousands of years, humans have tried to enhance their inherent computational abilities using manufactured devices. Mechanical devices such as the abacus, the adding machine, and the tabulating machine were important advances. But it was only with the advent of electronic devices and, in particular, the electronic computer some 60 years ago that a qualitative threshold seems to have been passed and problems of considerable difficulty could be solved. It appears that a molecular device has now been used to pass this qualitative threshold for a second time.
Len Adleman
“A Breakthrough of Gaussian
Proportions”
Worth A+++++ on PS7!
What Sneakers is really about...
If P = NP all* cryptography is (in theory) broken!
*Not quite all. All cryptography where there are less key bits than total message bits. Information-theoretic crypto (one-time pad) is still perfectly secure.
what would happen if P = NP.
CryptosystemEncryption Decryption
For security, it should be hard to invert c without kd.
For efficiency, it should be easy to invert c with kd.
Cryptosystem
For security, it should be hard to invert c without kd.
For efficiency, it should be easy to invert c with kd.
Is BREAK in NP?
So, what if P = NP?
Would this really mean all cryptography is broken?
Moore’s/Kurzweil’s/Tyson’s law
Science’s Endless Golden Age by Neil DeGrasse
(Almost) everything improves
exponentially
2 3 4 5 6 7 8 9 10111213141516171819201
100000000000000
1E+028
1E+042
1E+056
1E+070
1E+084
1E+098
1E+112
1E+126
1E+140
2^nn^100
2 9 16 23 30 37 44 51 58 65 72 79 86 93100
1
1E+020
1E+040
1E+060
1E+080
1E+100
1E+120
1E+140
1E+160
1E+180
1E+200
2^nn^100
2 77 1522273023774525276026777528279029771
1E+031
1E+062
1E+093
1E+124
1E+155
1E+186
1E+217
1E+248
1E+279
2^nn^100
01E+3072E+3073E+3074E+3075E+3076E+3077E+3078E+3079E+3071E+308 Same graph, non-log scale
In practice, if P=NP and computing power continues to improveexponentially, all cryptosystems are eventually broken!
Point where Excel blows up
What about actual cryptosystems?
“There’s an unwritten rule in astrophysics: your computer simulation must end before you die.”
Neil deGrasse Tyson
RSA Public-Key Cryptosystem 1978
Ron RivestLen Adelman
Adi Shamir
RSA [Rivest, Shamir, Adelman 78]
CS588 Spring 2005 28
RSA in Perl
print pack"C*", split/\D+/, `echo "16iII*o\U@{$/=$z; [(pop,pop,unpack"H*",<>)]} \EsMsKsN0[lN*1lK[d2%Sa2/d0 <X+d*lMLa^*lN%0]dsXx++lMlN /dsM0<J]dsJxp"|dc`(by Adam Back)
Until 1997 – Illegal to show
this slide to non-US citizens!
Until Jan 2000: can export RSA, but only with 512 bit keysNow: can export RSA except to embargoed destinations
RSA
E(M) = Me mod nD(C) = Cd mod n
n = pq p, q are primed is relatively prime to (p – 1)(q –
1)ed 1 (mod (p – 1)(q – 1))
Key property: if you know p and q, it is easy to compute d.
Public key: (e, n)Private key: (d, n)
Security of RSAGiven n, how much work is it to find p and q where n = pq?
Largest challenge factored so far (Jan 2010): b=768 (232 digits) RSA-7682000-computing years
General Number Field Sieve (fastest known factoring algorithm) is in
Factoring Might Be Hard
PNP
NP-Complete
Assuming P NP
Factoring?
Known to be in NPNot known to be in P Not known to be NP-CKnown to be in BQP
Complexity Class BQP
P = Polynomial time: languages that can be decided by a deterministic TM in (Nk) steps.
NP = Nondeterministic Polynomial time: languages that can be decided by a nondeterministic TM in (Nk) steps.
BQP = Bounded Quantum Polynomial time: languages that can be decided by a quantum TM in (Nk) steps with at most 1/3 probability of error
Quantum Physics for Dummies
Light behaves like both a wave and a particle at the same time
A single photon is in many states at once but can’t “observe” its state without forcing it into one state
Schrödinger’s CatPut a live cat in a box with cyanide vial that opens depending on quantum state
Cat is both dead and alive at the same time until you open the box
Quantum ComputingRegular bit: either a 0 or a 1
7 bits can represent any one of 27 different states
Quantum bit (qubit): in 2 possible states at once7 qubits represent 27 different states (at once!)
Computation on qubits: try all possible values at once!
Richard Feynman, 1982
If you could do regular TM operations with a Quantum TM, this would make QP = NP. But you can’t! Actual operations are strange.
What is Known Today
What is Unknown Today
NP BQP NPBQP NPBQPAny of thesecould be true!
Most “Likely” Universe
NPPBQP
NP-Complete
Quantum Computers Today
Handful of quantum algorithmsShor’s algorithm: factoring in P using a quantum computerGrover’s algorithm: searching N unsorted entries in O( N)
15 (= 5 * 3)Actual quantum computers5-qubit computer built by IBM (2001)
Implemented Shor’s algorithm to factor 15 (probably 5 * 3)
Los Alamos: 7-qubit computerTo exceed practical normal computing need > 30 qubits
Adding another qubit is more than twice as hard
Charge
• Our P and NP complexity classes are robust– But, not to very strange definitions of a “step”– DNA and Quantum Computers can modify an
unbounded amount of state in one time step• The universe is a very strange place indeed
If BQP=NP it is an even stranger strange place!