SLIDE 1
computability and complexity theory CSE P531 Instructor: Prof. - - PowerPoint PPT Presentation
computability and complexity theory CSE P531 Instructor: Prof. - - PowerPoint PPT Presentation
computability and complexity theory CSE P531 Instructor: Prof. James R. Lee Spring 2016 TA: Jeffrey Hon Course web page: http://www.cs.washington.edu/csep531 Sign up for the mailing list! Textbooks: Computational Complexity: A Modern
SLIDE 2
SLIDE 3
aliens who play chess
Suppose an alien came to earth and claimed it could play perfect chess. Before admitting defeat as the inferior species, is there any way we could test his/her/its claim?
- Yes. In complexity theory, this is the theorem that IP = PSPACE.
We wouldn’t need to spend billions of years playing against the alien
- ver and over. Instead, we would engage in a short conversation
about the sums of certain polynomials over a finite field.
SLIDE 4
proofs and computational problems
The Riemann hypothesis This is considered by some to be the most important unsolved problem in mathematics. ($1M Clay Math prize) 3D Bin Packing is NP-complete There is a finite set of (a billion, say) of rectangular boxes of different sizes such that if you knew how to pack these boxes into the trunk
- f your car, you would also know a proof of the
Riemann hypothesis. (A conjecture about the zeros of the Riemann zeta function.) (Indeed, proofs of the Riemann hypothesis with at most a million symbols are in 1-1 correspondence with ways to pack the boxes into your car.)
SLIDE 5
zero-knowledge proofs
Suppose you manage to prove the Riemann Hypothesis. (Good work. This should get you at least a B+ in the course!) But you signed an NDA. Your company won’t let you publish it. Can you still win the $1M prize? Yes! There is a way to convince someone that you know a proof without revealing anything other than the fact that you proved it.
SLIDE 6
probabilistically checkable proofs
PCP Theorem: There is a way to write down the proof so that its validity can be checked by someone who picks 5 random words. Proof correct? Proof wrong? The verifier says “I agree.” Then 99/100 times, the verifier will say “Wait! I found a bug.”
SLIDE 7
“Hello world.”
First assignment for freshman CSE students: Write a Java program that prints “Hello world.” on the screen and then exits. Efficiency is not an issue. No partial credit. TA staff is annoyed: OK, let’s write an autograder script. If should take a Java program 𝑄 as input and
- PASS if 𝑄 prints “Hello world.” and halts
- FAIL otherwise
How would such a script work? Need to handle code like this:
SLIDE 8
“Hello world.”
First assignment for freshman CSE students: Write a Java program that prints “Hello world.” on the screen and then exits. Efficiency is not an issue. No partial credit. This seems mean: This program passes if and only if the Riemann Hypothesis is false. Writing this autograder seems like a nightmare.
SLIDE 9
“Hello world.”
First assignment for freshman CSE students: Write a Java program that prints “Hello world.” on the screen and then exits. Efficiency is not an issue. No partial credit.
Despite the simplicity of the assignment, there is NO PROGRAM that can grade it correctly. (We’ll prove it.)
SLIDE 10
cardinality
What does it mean that two sets have the same size?
SLIDE 11
cardinality
What does it mean that two sets have the same size?
SLIDE 12
cardinality
Definition: Two sets 𝐵 and 𝐶 have the same cardinality if there is a
- ne-to-one correspondence between the elements of 𝐵 and those of 𝐶.
More precisely, if there is a 1-1 and onto function 𝑔 ∶ 𝐵 → 𝐶.
𝐵 𝐶
a b c d e 1 2 3 4 5 6 f
The definition also makes sense for infinite sets!
SLIDE 13
cardinality
Do the natural numbers and the even natural numbers have the same cardinality? Yes!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 4 6 8 10 12 14 16 18 20 22 24 26 28
What’s the map 𝑔 ∶ ℕ → 2ℕ ? 𝑔 𝑜 = 2𝑜
SLIDE 14
countable sets
Definition: A set is countably infinite iff it has the same cardinality as ℕ. A set is countable if it is finite or countably infinite. Equivalent: A set 𝑇 is countably infinite iff there is an 1-1 and onto function ∶ ℕ → 𝑇 Equivalent: A set 𝑇 is countably infinite iff we can order the elements 𝑇 = {𝑦0, 𝑦1, 𝑦2, 𝑦3, … } Question: If ∶ ℕ → 𝑇 is just onto, do we still know that 𝑇 is countably infinite?
SLIDE 15
the set ℤ of all integers
SLIDE 16
the set ℚ of rational numbers
We can’t do the same thing we did for the integers. Between any two rational numbers there are an infinite number of others.
SLIDE 17
the set of positive rational numbers
1/1 1/2 1/3 1/4 1/5 1/6 1/7 1/8 ... 2/1 2/2 2/3 2/4 2/5 2/6 2/7 2/8 ... 3/1 3/2 3/3 3/4 3/5 3/6 3/7 3/8 ... 4/1 4/2 4/3 4/4 4/5 4/6 4/7 4/8 ... 5/1 5/2 5/3 5/4 5/5 5/6 5/7 ... 6/1 6/2 6/3 6/4 6/5 6/6 ... 7/1 7/2 7/3 7/4 7/5 .... ... ... ... ... ...
SLIDE 18
the set of positive rational numbers
The set of all positive rational numbers is countable.
ℚ+ = 1/1, 2/1, 1/2, 3/1, 2/2,1/3, 4/1, 2/3, 3/2, 1/4, 5/1, 4/2, 3/3, 2/4, 1/5, …
List elements in order of numerator+denominator, breaking ties according to denominator. Only 𝑙 numbers have total of sum of 𝑙 + 1, so every positive rational number comes up some point. Technique is called “dovetailing.” Notice that repeats are OK because we can skip over them. Formal statement: A set 𝑇 is countable iff there is an onto map ∶ ℕ → 𝑇.
SLIDE 19
the set ℚ of rational numbers
SLIDE 20
Claim: Σ∗ is countable for every finite alphabet Σ
SLIDE 21
the set of all Java programs is countable
SLIDE 22
are the real numbers countable?
Theorem [Cantor]: The set of real numbers between 0 and 1 is not countable. Proof will be by contradiction. Uses a new method called diagonalization.
SLIDE 23
real numbers between 0 and 1: [0,1)
Every number between 0 and 1 has an infinite decimal expansion:
1/2 = 0.50000000000000000000000... 1/3 = 0.33333333333333333333333... 1/7 = 0.14285714285714285714285... 𝜌-3 = 0.14159265358979323846264... 1/5 = 0.19999999999999999999999... = 0.20000000000000000000000...
Representation is unique except for the cases that the decimal expansion ends in all 0’s or all 9’s.
SLIDE 24
proof that [0,1) is uncountable
Suppose, for the sake of contradiction, that there is a list of them: 1 2 3 4 5 6 7 8 9 ... r1 0. 5 ... ... r2 0. 3 3 3 3 3 3 3 3 ... ... r3 0. 1 4 2 8 5 7 1 4 ... ... r4 0. 1 4 1 5 9 2 6 5 ... ... r5 0. 1 2 1 2 2 1 2 2 ... ... r6 0. 2 5 ... ... r7 0. 7 1 8 2 8 1 8 2 ... ... r8 0. 6 1 8 3 3 9 4 ... ... ... .... ... .... .... ... ... ... ... ... ...
SLIDE 25
proof that [0,1) is uncountable
Suppose, for the sake of contradiction, that there is a list of them: 1 2 3 4 5 6 7 8 9 ... r1 0. 5 ... ... r2 0. 3 3 3 3 3 3 3 3 ... ... r3 0. 1 4 2 8 5 7 1 4 ... ... r4 0. 1 4 1 5 9 2 6 5 ... ... r5 0. 1 2 1 2 2 1 2 2 ... ... r6 0. 2 5 ... ... r7 0. 7 1 8 2 8 1 8 2 ... ... r8 0. 6 1 8 3 3 9 4 ... ... ... .... ... .... .... ... ... ... ... ... ...
SLIDE 26
proof that [0,1) is uncountable
Suppose, for the sake of contradiction, that there is a list of them: 1 2 3 4 5 6 7 8 9 ... r1 0. 5 ... ... r2 0. 3 3 3 3 3 3 3 3 ... ... r3 0. 1 4 2 8 5 7 1 4 ... ... r4 0. 1 4 1 5 9 2 6 5 ... ... r5 0. 1 2 1 2 2 1 2 2 ... ... r6 0. 2 5 ... ... r7 0. 7 1 8 2 8 1 8 2 ... ... r8 0. 6 1 8 3 3 9 4 ... ... ... .... ... .... .... ... ... ... ... ... ...
Flipping rule: If digit is 5, make it 1. If digit is not 5, make it 5.
1 5 5 5 5 5 1 5
SLIDE 27
proof that [0,1) is uncountable
Suppose, for the sake of contradiction, that there is a list of them: 1 2 3 4 5 6 7 8 9 ... r1 0. 5 ... ... r2 0. 3 3 3 3 3 3 3 3 ... ... r3 0. 1 4 2 8 5 7 1 4 ... ... r4 0. 1 4 1 5 9 2 6 5 ... ... r5 0. 1 2 1 2 2 1 2 2 ... ... r6 0. 2 5 ... ... r7 0. 7 1 8 2 8 1 8 2 ... ... r8 0. 6 1 8 3 3 9 4 ... ... ... .... ... .... .... ... ... ... ... ... ...
Flipping rule: If digit is 5, make it 1. If digit is not 5, make it 5.
1 5 5 5 5 5 1 5
If diagonal element is 0. 𝑦11𝑦22𝑦33𝑦44𝑦55 ⋯ then let’s called the flipped number 0. 𝑦11 𝑦22 𝑦33 𝑦44 𝑦55 ⋯ It cannot appear anywhere on the list!
SLIDE 28
proof that [0,1) is uncountable
Suppose, for the sake of contradiction, that there is a list of them: 1 2 3 4 5 6 7 8 9 ... r1 0. 5 ... ... r2 0. 3 3 3 3 3 3 3 3 ... ... r3 0. 1 4 2 8 5 7 1 4 ... ... r4 0. 1 4 1 5 9 2 6 5 ... ... r5 0. 1 2 1 2 2 1 2 2 ... ... r6 0. 2 5 ... ... r7 0. 7 1 8 2 8 1 8 2 ... ... r8 0. 6 1 8 3 3 9 4 ... ... ... .... ... .... .... ... ... ... ... ... ...
Flipping rule: If digit is 5, make it 1. If digit is not 5, make it 5.
1 5 5 5 5 5 1 5
If diagonal element is 0. 𝑦11𝑦22𝑦33𝑦44𝑦55 ⋯ then let’s called the flipped number 0. 𝑦11 𝑦22 𝑦33 𝑦44 𝑦55 ⋯ It cannot appear anywhere on the list!
For every 𝑜 ≥ 1:
𝑠
𝑜 ≠ 0.
𝑦11 𝑦22 𝑦33 𝑦44 𝑦55 ⋯
because the numbers differ on the 𝑜th digit!
SLIDE 29
proof that [0,1) is uncountable
Suppose, for the sake of contradiction, that there is a list of them: 1 2 3 4 5 6 7 8 9 ... r1 0. 5 ... ... r2 0. 3 3 3 3 3 3 3 3 ... ... r3 0. 1 4 2 8 5 7 1 4 ... ... r4 0. 1 4 1 5 9 2 6 5 ... ... r5 0. 1 2 1 2 2 1 2 2 ... ... r6 0. 2 5 ... ... r7 0. 7 1 8 2 8 1 8 2 ... ... r8 0. 6 1 8 3 3 9 4 ... ... ... .... ... .... .... ... ... ... ... ... ...
Flipping rule: If digit is 5, make it 1. If digit is not 5, make it 5.
1 5 5 5 5 5 1 5
So the list is incomplete, which is a contradiction. Thus the real numbers between 0 and 1 are uncountable.
For every 𝑜 ≥ 1:
𝑠
𝑜 ≠ 0.
𝑦11 𝑦22 𝑦33 𝑦44 𝑦55 ⋯
because the numbers differ on the 𝑜th digit!
SLIDE 30
the set of all functions 𝑔 ∶ ℕ → {0, … , 9} is uncountable
SLIDE 31