|
| CMPSCI 601: Office Hours, Spring 2011 | |
| Neil Immerman, CompSci Bldg 374, immerman@cs.umass.edu | M 3-4, Tu 3-4, and by appointment. |
| Reductions | |||
| Homework 5 | Homework 3 | Homework 2 | Homework 1 |
| Q1:
I have a quick question about problem 3 on the homework. It says the index tape contains ceiling(log
n) bits, where n is the length of the input. Should this be floor(log n) + 1 bits? For example,
if the input has length 8, then 8 = binary(1000), and floor(log 8) + 1 = 4 = length(1000). Or,
if the input has length 15, then 15 = binary(1111), and floor(log 15) + 1 = 4 = length(1000). Am
I mistaken? (I suspect this detail doesn't really affect the proof.) Thanks! |
| A1: Yes, you are right, I should have said 1 + floor(log n). Thank you very much for the correction. |
| Q1: In question 1a, I'm confused about how to reduce K-bar to IP because the programs in IP must be total, so how could we we simply map w to f(w) such that (M(w) ≠ 1) ⇔ (f(w) ∈ IP)? In particular, if M(w) diverges then we want the f(w) ∈ IP. |
| A1: Good question. My hint is that the property of n being in IP depends on all the inputs to Mn, not just one as in sets we've looked at like K and A0,17. If and only M(w) ≠ 1, you want f(w) to be a program that is in IP, i.e., Mf(w)(x) should converge to a value in {0,1} in polynomial time for all inputs x. |
| Q2: In question 2b, I don't see how to use the Hierarchy Theorem to construct a counter-example. |
| A2: You are trying to prove that DTIME[n2] is not downward closed under reductions. That is you are trying to find a pair of problems A ≤ B such that B is in DTIME[n2] but A is not. My hint is that the Time Hierarchy Theorem tells you how to construct a problem A that is not in DTIME[n2]. However, reductions can blow up the size of an input by a polynomial. The idea is to use padding. Look for example back at the problem MATH from hw2. Note that the NP complete problem MATH is a problem that has been padded by a string of 1's to allow more time to work on it. For example, the problem UNPADDED-MATH = { ϕ | ZFC ⊢ ϕ} is much harder than MATH. (In fact UNPADDED-MATH is r.e. complete.) |
| Q1: I wonder if you could address this question: Why is the first step of a Karp reduction (say, to show that some language L is NP-hard) to show that L is in NP? It seems to me that if you can come up with a function that maps every member of L to some L' (which is known to be NP-hard), then that should suffice to show that L ≤ L'. But this is clearly not the case. I ran into the same problem in HW1 where I failed to show that my sets were r.e. before attempting to show that they were r.e.-complete. But it looks like logspace reductions are different: Lemma 4.17, part 2 on page 88 [AB] says If B ≤ C and C in L then B in L. Why the difference? |
| A1:
Here's what we know: 1. If A ≤ B then if B is easy, e.g,. in r.e., in NP, in P, etc., then so is A. Thus for example since we know that SAT is in NP, if we show that A ≤ SAT, then we know that A is in NP. 2. A set S is complete for a complexity class C iff the following two conditions hold:
     a. S is in C Condition 2b above is called "S is C-hard". Thus, to prove that S is C complete we must show that S is in C and S is C-hard. One way to prove that S is C-hard is to show that R ≤ S where R is already known to be C-hard. Your confusion is that you say that to show that L is C-hard you should show L ≤ L' where L' is C-hard, but that's backwards: you have to show L' ≤ L. That is we know L' is hard and we show that L' ≤ L, i.e, the difficulty of L' is less than or equal to the difficulty of L. Thus L is hard as well. |
| Q1: I am most confused by problem 1. Isn't every logical statement a mathematical statement? |
| A1: Good question: we haven't made it clear what the exact form of a mathematical statement is, but yes, you can certainly talk about boolean formulas, so I think that you are going in the right direction here. |
| Q2: In problem 2, should we also use that TAUT ≤ SAT as they state in the book? |
| A2: Use it if you must, but all that is needed is one direction, e.g., SAT ≤ TAUT. |
| Q3: Problem 4 seems to be solved in the slides you linked to on the class webpage. |
| A3: Yes, my bad. Thanks for pointing this out. Given this, what I'd like everyone to do is to read those two slides which sketch the proof, understand the idea, and write a clear proof in your own words that fills in the details so that it is coherent and easy to understand. |
| Q1:
I wonder if you could address a question I have about some of the problem definitions in homework
#1 tomorrow in class. Alternately, if you think it would be better for me to come to your office
hours tomorrow afternoon, I'd be happy to do so. I think I have a grasp on how to show whether a set is in one of the complexity classes we talked about, and also how reductions work and what they mean. What is unclear to me is precisely what set you're defining when you say something like in 1a: Sa = {n | 0 in Wn} In particular, I'm not sure what "Wn" stands for. I've interpreted it to mean "the set of strings recognized by a TM encoded by the string n", or "the set of inputs accepted by programs defined by strings n". Is this correct? So the above definition would read "the set S containing strings n such that the TMs Mn accept 0"? If I'm way off track here, please let me know. |
| A1:
That's exactly right. We have encoded all the programs of Turing machines as binary strings, and
binary strings are in 1:1 correspondence with natural numbers, so all the programs for Turing
machines can be thought of as: 0, 1, 2, 3, 4, … We write Mi for the Turing machine that runs program i. We defined Wi as the set recognized by Mi, i.e., Wi = { w | Mi(w) = 1} Thus, Sa = { n | 0 ∈ Wn} = { n | Mn(0) = 1} I'll be happy to answer other questions about the homework in class Monday morning. |
| Q2: For question 2, do you have any hints about how to prove that every r.e. set is Σ1? |
| A2: For proving that every r.e. set is Σ1, I suggest you use the fact about the COMP predicate, i.e., take the definition of being r.e. and rewrite it using the COMP predicate. |